class_docstr: 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`.
class_docstr_tok: ["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","`","."]
docstr: Convert line in Blei LDA-C format to document (BoW representation).
  
  Parameters
  ----------
  line : str
      Line in Blei's LDA-C format.
  
  Returns
  -------
  list of (int, float)
      Document's BoW representation.
docstr_tok: ["Convert","line","in","Blei","LDA-C","format","to","document","(","BoW","representation",")",".","Parameters","--","--","--","--","--","line",":","str","Line","in","Blei","'s","LDA-C","format",".","Returns","--","--","--","-","list","of","(","int",",","float",")","Document","'s","BoW","representation","."]
code: def line2doc(self, line):
      """Convert line in Blei LDA-C format to document (BoW representation).
  
      Parameters
      ----------
      line : str
          Line in Blei's LDA-C format.
  
      Returns
      -------
      list of (int, float)
          Document's BoW representation.
  
      """
      parts = utils.to_unicode(line).split()
      if int(parts[0]) != len(parts) - 1:
          raise ValueError(
              "invalid format in %s: %s" % (self.fname, repr(line))
          )
      doc = [part.rsplit(":", 1) for part in parts[1:]]
      doc = [(int(p1), float(p2)) for p1, p2 in doc]
      return doc
  
file_path: gensim/gensim/corpora/bleicorpus.py
imports: from __future__ import with_statement
  from os import path
  import logging
  from gensim import utils
  from gensim.corpora import IndexedCorpus
label_desc: Use image node_id 3 for calling the BleiCorpus obj's underlying member method code with example usage: obj.line2doc(line) and returns: doc