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

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

src/c/a/cablemap-HEAD/cablemap.nlp/cablemap/nlp/defaultcorpus.py   cablemap(Download)
from gensim.corpora.mmcorpus import MmCorpus
from cablemap.core import handle_source, predicates as pred
from cablemap.nlp.handler import NLPFilter, DictionaryHandler, CorpusHandler
 
_DEFAULT_KEEP_WORDS=10000
    dct.save(wordid_filename)
    # 2. Reiterate through the cables and create the vector space
    corpus_handler = CorpusHandler(out_dir, dct=dct, allow_dict_updates=False)
    handler = create_filter(corpus_handler)
    handle_source(src, handler, predicate)

src/c/a/cablemap-HEAD/helpers/generate_corpus.py   cablemap(Download)
from cablemap.core import handle_source, predicates as pred
from cablemap.core.handler import DefaultMetadataOnlyFilter, TeeCableHandler
from cablemap.nlp.handler import CorpusHandler
 
def generate_corpus(src):
    handler = TeeCableHandler(DefaultMetadataOnlyFilter(CorpusHandler('./', prefix='german_cables_metadata_')),
                              CorpusHandler('./', prefix='german_cables_'))