Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f76dbac commit 2ba989aCopy full SHA for 2ba989a
usage/5118/analysis.py
@@ -29,7 +29,7 @@ def cache(func):
29
30
@wraps(func)
31
def wrapper(*args):
32
- key = str(str(x) for x in args)
+ key = "".join(str(x) for x in args)
33
if key not in values:
34
values[key] = func(*args)
35
return values[key]
@@ -117,7 +117,6 @@ def get_counter(words: str):
117
return Counter(cut_word(words))
118
119
120
-@cache
121
def build_vector(first: str, second: str):
122
""" 为两个短语构建向量 """
123
f_counter, s_counter = get_counter(first), get_counter(second)
0 commit comments