public void dumpFeatures() throws IOException { FeatureExtractor fe = new FeatureExtractor(model, true); fe.dumpMode = true; for (Sentence lSent : lSentences) { ModelSentence mSent = new ModelSentence(lSent.T()); fe.computeFeatures(lSent, mSent); } }
public void extractFeatures() throws IOException { System.out.println("Extracting features"); FeatureExtractor fe = new FeatureExtractor(model, true); for (Sentence lSent : lSentences) { ModelSentence mSent = new ModelSentence(lSent.T()); fe.computeFeatures(lSent, mSent); mSentences.add(mSent); } }
public void readTrainingSentences(String filename) throws IOException { lSentences = CoNLLReader.readFile(filename); for (Sentence sent : lSentences) numTokens += sent.T(); }