|
|
@ -29,8 +29,7 @@ def findfrecuency(txt_path,keywords,outpath):
|
|
|
|
elif keyword in line:
|
|
|
|
elif keyword in line:
|
|
|
|
keyword_count[keyword] += 1
|
|
|
|
keyword_count[keyword] += 1
|
|
|
|
resultword.append(line)
|
|
|
|
resultword.append(line)
|
|
|
|
resultword1 = list(set(resultword))
|
|
|
|
writeintxt(resultword,outpath)
|
|
|
|
writeintxt(resultword1,outpath) #去重
|
|
|
|
|
|
|
|
return keyword_count#返回字典
|
|
|
|
return keyword_count#返回字典
|
|
|
|
else:
|
|
|
|
else:
|
|
|
|
print("文件不存在\n")
|
|
|
|
print("文件不存在\n")
|
|
|
|