Module Expr Str ImportFrom alias ImportFrom alias Import alias ImportFrom alias alias ImportFrom alias ImportFrom alias Assign NameStore Call AttributeLoad NameLoad attr Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad If CompareIs NameLoad NameLoad body Assign TupleStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad For NameStore ListLoad BinOpAdd NameLoad Str BinOpAdd NameLoad Str BinOpAdd NameLoad Str BinOpAdd NameLoad Str body If Call AttributeLoad NameLoad attr NameLoad body Break orelse Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad With Call AttributeLoad NameLoad attr NameLoad NameStore body Assign NameStore ListComp Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr comprehension NameStore NameLoad Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad NameLoad Assign AttributeStore NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore Num With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameStore body For TupleStore NameStore NameStore Call NameLoad NameLoad body Expr Yield Call AttributeLoad NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd NameLoad Num decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr NameLoad attr If CompareNotEq Call NameLoad SubscriptLoad NameLoad Index Num BinOpSub Call NameLoad NameLoad Num body Raise Call NameLoad BinOpMod Str TupleLoad AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore ListComp Call AttributeLoad NameLoad attr Str Num comprehension NameStore SubscriptLoad NameLoad Slice Num Assign NameStore ListComp TupleLoad Call NameLoad NameLoad Call NameLoad NameLoad comprehension TupleStore NameStore NameStore NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad NameLoad orelse Assign NameStore BinOpAdd Num Call NameLoad BinOpAdd ListLoad Num Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr BinOpMod Str NameLoad With Call AttributeLoad NameLoad attr NameLoad Str NameStore body Assign NameStore ListLoad For NameStore NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Assign NameStore ListComp BinOpMod Str NameLoad comprehension NameStore NameLoad CompareGt Call NameLoad SubscriptLoad NameLoad Index Num Num Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad Call NameLoad NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore BinOpAdd NameLoad Str Expr Call AttributeLoad NameLoad attr BinOpMod Str TupleLoad NameLoad NameLoad With Call AttributeLoad NameLoad attr NameLoad Str NameStore body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr BinOpMod Str Call AttributeLoad NameLoad attr NameLoad Str Return NameLoad decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str With Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameStore body Expr Call AttributeLoad NameLoad attr NameLoad Return Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr decorator_list decorator_list
N/A N/A 
Blei's LDA-C format.
 __future__ with_statement os path N/A logging gensim interfaces utils gensim.corpora IndexedCorpus six.moves xrange N/A logger N/A N/A logging getLogger gensim.corpora.bleicorpus BleiCorpus N/A IndexedCorpus N/A N/A 
    Corpus in Blei's LDA-C format.

    The corpus is represented as two files: one describing the documents, and another
    describing the mapping between words and their ids.

    Each document is one line::

      N fieldId1:fieldValue1 fieldId2:fieldValue2 ... fieldIdN:fieldValueN

    The vocabulary is a file with words, one word per line; word at line K has an
    implicit ``id=K``.
     __init__ N/A N/A self fname fname_vocab N/A None N/A N/A 
        Initialize the corpus from a file.

        `fname_vocab` is the file with vocabulary; if not specified, it defaults to
        `fname.vocab`.
         N/A N/A N/A IndexedCorpus __init__ self fname N/A N/A N/A logger info N/A loading corpus from %s fname N/A N/A fname_vocab None N/A N/A N/A fname_base _ N/A N/A path splitext fname N/A fname_dir N/A N/A path dirname fname N/A fname_vocab N/A N/A fname .vocab N/A fname /vocab.txt N/A fname_base .vocab N/A fname_dir /vocab.txt N/A N/A N/A N/A path exists fname_vocab N/A N/A N/A N/A N/A IOError BleiCorpus: could not find vocabulary file N/A N/A self fname fname N/A N/A N/A utils smart_open fname_vocab fin N/A N/A words N/A N/A N/A N/A N/A utils to_unicode word rstrip N/A word fin N/A N/A self id2word N/A dict N/A enumerate words N/A N/A self length 0 N/A __iter__ N/A N/A self N/A N/A N/A 
        Iterate over the corpus, returning one sparse vector at a time.
         N/A lineno -1 N/A N/A N/A utils smart_open N/A self fname fin N/A N/A N/A lineno line N/A enumerate fin N/A N/A N/A N/A N/A self line2doc line N/A N/A self length N/A lineno 1 N/A line2doc N/A N/A self line N/A N/A N/A parts N/A N/A N/A N/A utils to_unicode line split N/A N/A N/A int N/A parts N/A 0 N/A N/A len parts 1 N/A N/A N/A ValueError N/A invalid format in %s: %s N/A N/A self fname N/A repr line N/A doc N/A N/A N/A part rsplit : 1 N/A part N/A parts N/A 1 N/A doc N/A N/A N/A int p1 N/A float p2 N/A N/A p1 p2 doc N/A doc N/A save_corpus N/A N/A fname corpus id2word metadata N/A None False N/A N/A 
        Save a corpus in the LDA-C format.

        There are actually two files saved: `fname` and `fname.vocab`, where
        `fname.vocab` is the vocabulary file.

        This function is automatically called by `BleiCorpus.serialize`; don't
        call it directly, call `serialize` instead.
         N/A N/A id2word None N/A N/A N/A N/A logger info no word id mapping provided; initializing from corpus N/A id2word N/A N/A utils dict_from_corpus corpus N/A num_terms N/A len id2word N/A N/A num_terms N/A 1 N/A max N/A N/A -1 N/A N/A id2word keys N/A N/A N/A logger info N/A storing corpus in Blei's LDA-C format into %s fname N/A N/A N/A utils smart_open fname wb fout N/A N/A offsets N/A N/A doc corpus N/A N/A doc N/A list doc N/A N/A N/A offsets append N/A N/A fout tell N/A parts N/A N/A %i:%s p N/A p doc N/A N/A abs N/A p N/A 1 1e-07 N/A N/A N/A fout write N/A N/A utils to_utf8 N/A %i %s
 N/A N/A len doc N/A N/A join parts N/A fname_vocab N/A fname .vocab N/A N/A N/A logger info N/A saving vocabulary of %i words to %s N/A num_terms fname_vocab N/A N/A N/A utils smart_open fname_vocab wb fout N/A N/A featureid N/A xrange num_terms N/A N/A N/A N/A fout write N/A N/A utils to_utf8 N/A %s
 N/A N/A id2word get featureid --- N/A offsets N/A staticmethod docbyoffset N/A N/A self offset N/A N/A N/A 
        Return the document stored at file position `offset`.
         N/A N/A N/A utils smart_open N/A self fname f N/A N/A N/A N/A f seek offset N/A N/A N/A self line2doc N/A N/A f readline N/A N/A