def main(argv): query = reduce(lambda x, y: x + " " + y ,argv[1:]) results = bossapiv2.search(query, 20) if len(results) == 0: print "0 results" else: wordlist,wordvectors = bosstextproc.textprocess(results) clusts = cluster.hcluster(rows=wordvectors, distance=distance.pearson, threshold=1.15) clusts = cluster.sortBySmallestId(clusts) cluster.printclusters(clusts, results, wordlist)
def main(argv): query = reduce(lambda x, y: x + " " + y ,argv[1:]) results = bossapiv2.search(query, 20) if len(results) == 0: print "0 results" else: wordlist,wordvectors = bosstextproc.textprocess(results) clusts = cluster.hcluster(rows=wordvectors) clusts = cluster.divide(clusts[0], threshold=1.15) cluster.printclusters_eval(clusts, results, wordlist)