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
Built Distribution
Hashes for slot_filling_ZC-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 24bdd1e8115cfb68e8497a2d16e18d3cc4b9d026d8060a063f1e2e57dba56604 |
|
MD5 | 2782078acb7f93b6e3949ca006c7c4c6 |
|
BLAKE2b-256 | cdfeff6808aac2033b014d689bafc7d55e9742c4d87ae27b3478a597063c8767 |