Skip to main content

train(train_file,test_file,vocab_intent_file,vocab_slot_file)

Project description

Intent and Slot Filling Bi-Model

train(train_file = "data/train_dev", test_file = "data/test", vocab_intent_file = "data/vocab.intent", vocab_slot_file = "data/vocab.slot", device = torch.device("cuda" if torch.cuda.is_available() else "cpu"), total_epoch = 50, max_len = 50, batch = 16, learning_rate = 0.001, DROPOUT = 0.2, embedding_size = 300, lstm_hidden_size = 200)

5 files would be generated after training: model_intent_best.pt model_slot_best.pt word_dict.pickle slot_dict.pickle intent_dict.pickle

predict(sentence="find nonstop flights from salt lake city to new york on saturday april ninth.", data_path="/Users/chenzichu/Desktop/slot-filling/package/slot_ZC", device = torch.device("cuda" if torch.cuda.is_available() else "cpu"), max_len = 50, batch = 16, DROPOUT = 0.2, embedding_size = 300, lstm_hidden_size = 200)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

slot-filling-ZC-0.2.4.tar.gz (10.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

slot_filling_ZC-0.2.4-py3-none-any.whl (130.4 kB view details)

Uploaded Python 3

File details

Details for the file slot-filling-ZC-0.2.4.tar.gz.

File metadata

  • Download URL: slot-filling-ZC-0.2.4.tar.gz
  • Upload date:
  • Size: 10.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for slot-filling-ZC-0.2.4.tar.gz
Algorithm Hash digest
SHA256 3fdcdf7314a11ed1d45976aea0d641a564e398a6380a167af7442201324dd356
MD5 198c5bca10727f5dfb99d3e07e00cdd3
BLAKE2b-256 f11e6dbe23920dbfd7146f35eccdc32ba1a1e8f6c6b7b6fda4ca31c69017b8f2

See more details on using hashes here.

File details

Details for the file slot_filling_ZC-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: slot_filling_ZC-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 130.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.3 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for slot_filling_ZC-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 98712bd9f62283e427ece7d27c938e5e5613c7802f272bbd92d0037ae0ffe494
MD5 3d4c0c87f2e5d1176661f96b67bb8e5e
BLAKE2b-256 761c05ada66ec6453a1d59ec9422208f77ec8468a4497f2db9996ce3220cd878

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page