Package edu.stanford.nlp.tagger.io

Examples of edu.stanford.nlp.tagger.io.TaggedFileReader


  void countTrainingTags(TaggedFileRecord file)
    throws IOException
  {
    int sentences = countSentences(file);
    int trainSentences = (int) (sentences * trainingRatio);
    TaggedFileReader reader = file.reader();
    List<TaggedWord> line;
    for (int i = 0; i < trainSentences && reader.hasNext(); ++i) {
      line = reader.next();
      addTaggedWords(line, trainingWords);
      addTaggedWords(line, allWords);
    }
    while (reader.hasNext()) {
      line = reader.next();
      addTaggedWords(line, allWords);
    }
  }
View Full Code Here

TOP

Related Classes of edu.stanford.nlp.tagger.io.TaggedFileReader

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.