Example #1
0
 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);
   }
 }
Example #2
0
  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);
    }
  }
Example #3
0
 public void readTrainingSentences(String filename) throws IOException {
   lSentences = CoNLLReader.readFile(filename);
   for (Sentence sent : lSentences) numTokens += sent.T();
 }