Spelling correction
This commit is contained in:
parent
594ebf9409
commit
2f758ba5db
@ -86,7 +86,7 @@ def make_data():
|
|||||||
with open("data.csv","w") as data:
|
with open("data.csv","w") as data:
|
||||||
data.write(s)
|
data.write(s)
|
||||||
|
|
||||||
def corelation():
|
def correlation():
|
||||||
data = pandas.read_csv("Work/data.csv")
|
data = pandas.read_csv("Work/data.csv")
|
||||||
rev=reverse_list()
|
rev=reverse_list()
|
||||||
print(rev)
|
print(rev)
|
||||||
|
10
main.py
10
main.py
@ -8,18 +8,20 @@ import numpy
|
|||||||
# file_load.make_data()
|
# file_load.make_data()
|
||||||
|
|
||||||
similarity = file_load.similarity()
|
similarity = file_load.similarity()
|
||||||
corelation = file_load.corelation()
|
correlation = file_load.correlation()
|
||||||
|
|
||||||
x=[]
|
x=[]
|
||||||
y=[]
|
y=[]
|
||||||
|
|
||||||
s="similarity, corelation\n"
|
s="similarity, correlation\n"
|
||||||
|
|
||||||
for i in similarity:
|
for i in similarity:
|
||||||
try:
|
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"])
|
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:
|
except:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user