def setUp(self): from vsm.corpus.util.corpusbuilders import random_corpus from vsm.model.tf import TfSeq c = random_corpus(1000, 50, 0, 20, context_type='document', metadata=True) m = TfSeq(c, 'document') m.train() self.v = TfViewer(c, m)
def setUp(self): from vsm.corpus.util.corpusbuilders import random_corpus from vsm.model.tf import TfSeq from vsm.model.tfidf import TfIdf c = random_corpus(1000, 50, 0, 10, context_type='document', metadata=True) tf = TfSeq(c, 'document') tf.train() m = TfIdf.from_tf(tf) m.train() self.v = TfIdfViewer(c, m)