Esempio n. 1
0
]
testpair = (("kiwis", "N"), ("zealanders", "N"))


# simcache=False #whether file currently contains valid sims
k = 1000
kdisplay = 10

print(sys.argv)
Thesaurus.byblo = byblo  # take command line argument as to whether this is a byblo file or not
if metric == "cosine":
    compress = True
else:
    compress = False
mythes = Thesaurus(vectorfilename, simcachefile, simcache, windows, k, adja, adjb, compress)
mythes.readvectors()
# if simcache:
#    check=True
# else:
#    for wordA in words:
#        for wordB in words:
#            mythes.outputsim(wordA,wordB,metric)


(word1, word2) = testpair
if simcache == False:
    mythes.outputsim(word1, word2, metric)

mythes.allpairssims(metric)

if simcache: