794bd558da80b65713b51a964ec61e7ef36d4bf2,examples/intent_extraction/interactive.py,,,#,34
Before Change
if not os.path.exists(args.model_path):
print("model_path does not exist")
sys.exit(0)
if not os.path.exists(args.dataset_path):
print("dataset_path does not exist")
sys.exit(0)
if args.embedding_model is not None and not os.path.exists(args.embedding_model):
print("word embedding model file was not found")
sys.exit(0)
After Change
emb_vectors, emb_size = load_word_embeddings(args.embedding_model)
while True:
text = input(">> ")
tokens = process_text(text)
enc_sent = encode_sentence(tokens, emb_vectors)
predictions = model.predict(enc_sent)
display_results(tokens, predictions)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 7
Instances
Project Name: NervanaSystems/nlp-architect
Commit Name: 794bd558da80b65713b51a964ec61e7ef36d4bf2
Time: 2018-05-14
Author: peteriz@users.noreply.github.com
File Name: examples/intent_extraction/interactive.py
Class Name:
Method Name:
Project Name: apachecn/AiLearning
Commit Name: 6955df04b36426ed7da330755e39aeaa8012a45c
Time: 2019-12-09
Author: jiang-s@163.com
File Name: src/py3.x/tensorflow2.x/text_Emotion.py
Class Name:
Method Name:
Project Name: TheAlgorithms/Python
Commit Name: f5abc04176b9635da963ca701f643acde5da24dc
Time: 2019-05-19
Author: andy1970635726@gmail.com
File Name: sorts/bucket_sort.py
Class Name:
Method Name: