Corpus in SVMlight format.
Corpus in SVMlight format.
Quoting http://svmlight.joachims.org/: The input file example_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.
Initialize the corpus from a file.
Save a corpus in the SVMlight format.
The SVMlight <target> class tag is set to 0 for all documents.