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

Function test_a_match

tests/core_test/qa_match_test.py:30–36  ·  view source on GitHub ↗
(testword)

Source from the content-addressed store, hash-verified

28 return q_match_pre
29
30def test_a_match(testword):
31 # AMatch
32 a_match = AMatch( a_dict=test_dict, match_models=['bow', 'tfidf', 'ngram_tfidf'])
33 a_match_pre = a_match.predict(testword, ['id0', 'id1'], match_strategy='score', vote_threshold=0.5, key_weight = {'bow': 1, 'tfidf': 1, 'ngram_tfidf': 1})
34 print ('a_match_pre>>>>>', a_match_pre )
35 # a_match_pre>>>>> {'id0': 1.0, 'id1': 0.0}
36 return a_match_pre
37
38
39def test_semantic_match(testword,words_dict=test_dict):

Callers 1

qa_match_test.pyFile · 0.85

Calls 2

predictMethod · 0.95
AMatchClass · 0.90

Tested by

no test coverage detected