Spelling correction

This commit is contained in:
mxr612 2024-05-15 22:10:34 +08:00
parent 594ebf9409
commit 2f758ba5db
2 changed files with 7 additions and 5 deletions

View File

@ -86,7 +86,7 @@ def make_data():
with open("data.csv","w") as data:
data.write(s)
def corelation():
def correlation():
data = pandas.read_csv("Work/data.csv")
rev=reverse_list()
print(rev)

10
main.py
View File

@ -8,18 +8,20 @@ import numpy
# file_load.make_data()
similarity = file_load.similarity()
corelation = file_load.corelation()
correlation = file_load.correlation()
x=[]
y=[]
s="similarity, corelation\n"
s="similarity, correlation\n"
for i in similarity:
try:
s+=str(i["similarity"])+','+str(corelation[i["from"],i["to"]])+'\n'
s+=str(i["similarity"])+','+str(correlation[i["from"],i["to"]])+'\n'
x.append(i["similarity"])
y.append(corelation[i["from"],i["to"]])
y.append(correlation[i["from"],i["to"]])
if(i['similarity']>0.5 and correlation[i['from'],i['to']]<-0.5):
print(i,correlation[i['from'],i['to']])
except:
pass