Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2ba989a

Browse files
committed
fix(analysis): remove unnecessary cache
1 parent f76dbac commit 2ba989a

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

usage/5118/analysis.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def cache(func):
2929

3030
@wraps(func)
3131
def wrapper(*args):
32-
key = str(str(x) for x in args)
32+
key = "".join(str(x) for x in args)
3333
if key not in values:
3434
values[key] = func(*args)
3535
return values[key]
@@ -117,7 +117,6 @@ def get_counter(words: str):
117117
return Counter(cut_word(words))
118118

119119

120-
@cache
121120
def build_vector(first: str, second: str):
122121
""" 为两个短语构建向量 """
123122
f_counter, s_counter = get_counter(first), get_counter(second)

0 commit comments

Comments
 (0)