public class CRFFeatureExporter<IN extends CoreMap>
extends java.lang.Object
Constructor and Description |
---|
CRFFeatureExporter(CRFClassifier<IN> classifier) |
Modifier and Type | Method and Description |
---|---|
static void |
main(java.lang.String[] args) |
void |
printFeatures(java.lang.String exportFile,
java.util.Collection<java.util.List<IN>> documents)
Output features from a collection of documents to a file
Format is with one line per token using the following format
word label feat1 feat2 ...
|
void |
printFeatures(java.lang.String exportFile,
int[][][][] docsData,
int[][] labels)
Output features that have already been converted into features
(using documentToDataAndLabels) in format suitable for CRFSuite.
|
public CRFFeatureExporter(CRFClassifier<IN> classifier)
public void printFeatures(java.lang.String exportFile, int[][][][] docsData, int[][] labels)
exportFile
- file to export the features todocsData
- array of document featureslabels
- correct labels indexed by document, and position within documentpublic void printFeatures(java.lang.String exportFile, java.util.Collection<java.util.List<IN>> documents)
exportFile
- file to export the features todocuments
- input collection of documentspublic static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception