794bd558da80b65713b51a964ec61e7ef36d4bf2,examples/intent_extraction/interactive.py,,,#,34

Before Change


args = parser.parse_args()

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)

After Change


    ds = SNIPS(path=args.dataset_path)
    nlp = SpacyInstance(disable=["tagger", "ner", "parser", "vectors", "textcat"])

    emb_vectors = None
    if args.embedding_model is not None:
        print("Loading external word embedding model")
        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)
Italian Trulli
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: shenweichen/DeepCTR
Commit Name: bd5dc215e1c21bf12e6b5297d10f293c45e16c77
Time: 2019-01-02
Author: wcshen1994@163.com
File Name: examples/run_classification_criteo.py
Class Name:
Method Name:


Project Name: shenweichen/DeepCTR
Commit Name: bd5dc215e1c21bf12e6b5297d10f293c45e16c77
Time: 2019-01-02
Author: wcshen1994@163.com
File Name: examples/run_regression_movielens.py
Class Name:
Method Name: