Package opennlp.tools.util

Examples of opennlp.tools.util.NumberedSet


  public Dictionary(String dictionaryFile) throws IOException {
    DataInputStream input = new DataInputStream(new GZIPInputStream(new FileInputStream(new File(dictionaryFile))));
    input.readUTF();
    int numWords = input.readInt();
    //System.err.println("Reading: "+numWords+" words");
    wordMap = new NumberedSet(numWords);
    for (int wi=0;wi<numWords;wi++) {
      String word = input.readUTF();
      int index = input.readInt();
      wordMap.setIndex(word,index);
    }
View Full Code Here

TOP

Related Classes of opennlp.tools.util.NumberedSet

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.