Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/a/i/AINews-HEAD/CorpusExport.py   AINews(Download)
def dissim(tfidf1, tfidf2, category = None):
    d = 1.0 - aicorpus.cos_sim(tfidf1, tfidf2, category)
    if d < 0.1E-10: d = 0.0
    return d
 

src/a/i/AINews-HEAD/AINewsDupExperiment.py   AINews(Download)
        for j in range(i+1, N):
            key = (urlids[i], urlids[j])
            val = corpus.cos_sim(articles[urlids[i]]['tfidf'],
                    articles[urlids[j]]['tfidf'])
            total += 1
            key = (urlids[i], urlids[j])
            if key in notduplist_stored: continue
            val = corpus.cos_sim(articles[urlids[i]]['tfidf'],
                    articles[urlids[j]]['tfidf'])
            if key not in checklist and val >= (best_cutoff*0.01):