Examples of STTaggerWordDictionary


Examples of opennlp.ccg.parse.supertagger.util.STTaggerWordDictionary

      if(posdictPath == null) {
        throw new IOException("You must specify both a word-level dict and a POS dict.");
      }
      XMLWordDictionaryReader wdr = new XMLWordDictionaryReader(new File(wdictPath));
      XMLPOSDictionaryReader pdr = new XMLPOSDictionaryReader(new File(posdictPath));
      STTaggerWordDictionary wdict = wdr.read();
      STTaggerPOSDictionary posdict = pdr.read();
      hypertagger.wdict = wdict;
      hypertagger.posdict = posdict;
      String kstring = opts.get("dictk");
      if(kstring != null)
View Full Code Here

Examples of opennlp.ccg.parse.supertagger.util.STTaggerWordDictionary

            reader.setContentHandler(new wdContentHandler());
            reader.parse(this.dictFile.toURI().toString());
        } catch(Exception e) {
            e.printStackTrace();
        }       
        return new STTaggerWordDictionary(this.dict);
    }
View Full Code Here

Examples of opennlp.ccg.parse.supertagger.util.STTaggerWordDictionary

    public static void main(String[] args) {
        // This is just to verify that the XML doc read in is the one
        // spit out.
        String fname = args[0];
        XMLWordDictionaryReader rdr = new XMLWordDictionaryReader(new File(fname));
        STTaggerWordDictionary dct = rdr.read();
        Iterator<Pair<String, Pair<Integer, Collection<String>>>> it = dct.getMappings()
        Pair<String, Pair<Integer, Collection<String>>> tempP = null;
        System.out.println("<wdict>");       
        while(it.hasNext()) {
         
            tempP = it.next();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.