(testword,words_dict=test_dict)
| 37 | |
| 38 | |
| 39 | def test_semantic_match(testword,words_dict=test_dict): |
| 40 | # SemanticMatch |
| 41 | s_match = SemanticMatch( words_dict=words_dict, match_models=['bow', 'tfidf', 'ngram_tfidf'] ) |
| 42 | s_match_pre = s_match.predict(testword, ['id0','id1', "id5"], match_strategy='score', vote_threshold=0.5, key_weight = {'bow': 1, 'tfidf': 1, 'ngram_tfidf': 1}) |
| 43 | print ('s_match_pre>>>>>', s_match_pre ) |
| 44 | # s_match_pre>>>>> {'id0': 1.0, 'id1': 0.0} |
| 45 | return s_match_pre |
| 46 | |
| 47 | |
| 48 |
no test coverage detected