MCPcopy Create free account
hub / github.com/MachineLP/TextMatch / test_semantic_match

Function test_semantic_match

tests/core_test/qa_match_test.py:39–45  ·  view source on GitHub ↗
(testword,words_dict=test_dict)

Source from the content-addressed store, hash-verified

37
38
39def 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

Callers 1

qa_match_test.pyFile · 0.85

Calls 2

predictMethod · 0.95
SemanticMatchClass · 0.90

Tested by

no test coverage detected