代码

```
import time, threading
from CHlikelihood.likelihood import Likelihood

def check(file, fileOut):
print(file)
a = Likelihood()
fi=open(file,'r')
txt=fi.readlines()
_长尾词a = []
for w in txt:
w=w.replace('\n','')
_长尾词a.append(w)
_长尾词b = _长尾词a
_结果 = []
for a词 in _长尾词a:
print (time.strftime("%H:%M:%S", time.localtime()))
_结果.append("----------------------------------------------------\n")
for b词 in _长尾词b:
if a.likelihood(a词,b词) > 0.8:
_结果.append(b词)
with open(fileOut,"a") as f:
for y in range(len(_结果)):
f.write(_结果[y]+"\n")

arr = [
['/PATH/1.txt', '/PATH/1o.txt'],
['/PATH/2.txt', '/PATH/2o.txt'],
['/PATH/3.txt', '/PATH/3o.txt']
]
for a in arr:
t = threading.Thread(target=check, args=a)
t.start()
#t.join()
```


Thank you for using 苹果树. | 粤ICP备18042975号-1