Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/MachineLP/TextMatch
/ _normalize
Method
_normalize
textmatch/core/qa_match.py:29–30 ·
view source on GitHub ↗
(self, x, key_weight)
Source
from the content-addressed store, hash-verified
27
pass
28
29
def
_normalize(self, x, key_weight):
30
return
x / float(np.sum( list(key_weight.values()) ))
31
32
def
vote(self, res, vote_threshold=0.75, key_weight = {
'bow'
: 1,
'tfidf'
: 1,
'ngram_tfidf'
: 1}):
33
qa_hit = {}
Callers
2
vote
Method · 0.95
score
Method · 0.95
Calls
no outgoing calls
Tested by
no test coverage detected