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

All Samples(2)  |  Call(1)  |  Derive(0)  |  Import(1)

src/a/i/AINews-HEAD/CorpusExport.py   AINews(Download)
from AINewsConfig import paths
from AINewsCorpus import AINewsCorpus
from AINewsCentroidClassifier import AINewsCentroidClassifier
 
aicorpus = AINewsCorpus()
    corpus = aicorpus.load_corpus(ident, 1.0)[0]
 
    centroid = AINewsCentroidClassifier(aicorpus)
    for category in aicorpus.categories:
        centroid.train_centroid(category, corpus, 'centroid_eval', True)