class_docstr: Corpus in SVMlight format.
  
  Quoting http://svmlight.joachims.org/:
  The input file contains the training examples. The first lines  may contain comments and are ignored
  if they start with #. Each of the following lines represents one training example
  and is of the following format::
  
      <line> .=. <target> <feature>:<value> <feature>:<value> ... <feature>:<value> # <info>
      <target> .=. +1 | -1 | 0 | <float>
      <feature> .=. <integer> | "qid"
      <value> .=. <float>
      <info> .=. <string>
  
  The "qid" feature (used for SVMlight ranking), if present, is ignored.
  
  Notes
  -----
  Although not mentioned in the specification above, SVMlight also expect its feature ids to be 1-based
  (counting starts at 1). We convert features to 0-base internally by decrementing all ids when loading a SVMlight
  input file, and increment them again when saving as SVMlight.
class_docstr_tok: ["Corpus","in","SVMlight","format",".","Quoting","http",":","\/\/svmlight.joachims.org\/",":","The","input","file","contains","the","training","examples",".","The","first","lines","may","contain","comments","and","are","ignored","if","they","start","with","#",".","Each","of","the","following","lines","represents","one","training","example","and","is","of","the","following","format",":",":","<","line",">",".=",".","<","target",">","<","feature",">",":","<","value",">","<","feature",">",":","<","value",">","...","<","feature",">",":","<","value",">","#","<","info",">","<","target",">",".=",".","+1","|","-1","|","0","|","<","float",">","<","feature",">",".=",".","<","integer",">","|","``","qid","''","<","value",">",".=",".","<","float",">","<","info",">",".=",".","<","string",">","The","``","qid","''","feature","(","used","for","SVMlight","ranking",")",",","if","present",",","is","ignored",".","Notes","--","--","-","Although","not","mentioned","in","the","specification","above",",","SVMlight","also","expect","its","feature","ids","to","be","1-based","(","counting","starts","at","1",")",".","We","convert","features","to","0-base","internally","by","decrementing","all","ids","when","loading","a","SVMlight","input","file",",","and","increment","them","again","when","saving","as","SVMlight","."]
docstr: Parameters
  ----------
  fname: str
      Path to corpus.
  store_labels : bool, optional
      Whether to store labels (~SVM target class). They currently have no application but stored
      in `self.labels` for convenience by default.
docstr_tok: ["Parameters","--","--","--","--","--","fname",":","str","Path","to","corpus",".","store_labels",":","bool",",","optional","Whether","to","store","labels","(","~SVM","target","class",")",".","They","currently","have","no","application","but","stored","in","`","self.labels","`","for","convenience","by","default","."]
code: def __init__(self, fname, store_labels=True):
      """
  
      Parameters
      ----------
      fname: str
          Path to corpus.
      store_labels : bool, optional
          Whether to store labels (~SVM target class). They currently have no application but stored
          in `self.labels` for convenience by default.
  
      """
      IndexedCorpus.__init__(self, fname)
      logger.info("loading corpus from %s", fname)
  
      self.fname = fname  # input file, see class doc for format
      self.length = None
      self.store_labels = store_labels
      self.labels = []
  
file_path: gensim/gensim/corpora/svmlightcorpus.py
imports: from __future__ import with_statement
  import logging
  from gensim import utils
  from gensim.corpora import IndexedCorpus
label_desc: Use image node_id 1 to create a new SvmLightCorpus object from inherited base classes: IndexedCorpus with example: obj = SvmLightCorpus(fname, store_labels)