You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

45 lines
1.3 KiB

  1. import pickle
  2. # zz = torch.stack([z.repeat(50,1).transpose(0,1)])
  3. # GetWeather
  4. getWeather = ['state', 'city', 'timeRange', 'geographic_poi', 'country', 'facility']
  5. # PlayMusic
  6. playMusic = ['artist', 'album', 'playlist', 'service', 'rating_value', 'best_rating', 'music_item', 'track', 'playlist_owner', 'year', 'genre', 'rating_unit']
  7. # AddToPlaylist
  8. addToPlaylist = ['artist', 'album', 'playlist', 'service', 'rating_value', 'best_rating', 'music_item', 'track', 'playlist_owner', 'year', 'genre', 'rating_unit']
  9. # RateBook
  10. ## I don't care
  11. # SearchScreeningEvent
  12. ## I don't care
  13. # BookRestaurant
  14. ## I don't care
  15. # SearchCreativeWork
  16. ## I don't care
  17. generic = ['O', 'B-entity_name', 'B-object_name', 'B-object_type', 'I-entity_name', 'I-object_name', 'I-object_type']
  18. getWeatherOut = generic[:]
  19. for i in getWeather:
  20. getWeatherOut.append('B-{}'.format(i))
  21. getWeatherOut.append('I-{}'.format(i))
  22. playMusicOut = generic[:]
  23. for i in playMusic:
  24. playMusicOut.append('B-{}'.format(i))
  25. playMusicOut.append('I-{}'.format(i))
  26. addToPlaylistOut = generic[:]
  27. for i in addToPlaylist:
  28. addToPlaylistOut.append('B-{}'.format(i))
  29. addToPlaylistOut.append('I-{}'.format(i))
  30. out = {"GetWeather": getWeatherOut,
  31. "PlayMusic": playMusicOut,
  32. "AddToPlaylist": addToPlaylist}
  33. pickle.dump(out, open("slot_filters.pkl", "wb"))