Package opennlp.ccg.parse.supertagger.io

Examples of opennlp.ccg.parse.supertagger.io.XMLPOSDictionaryReader


      String posdictPath = opts.get("posdict");
      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)
        hypertagger.dictK = Integer.parseInt(kstring);
View Full Code Here


                Logger.getLogger(WordAndPOSDictionaryLabellingStrategy.class.getName()).log(Level.SEVERE, null, ex);
            }
        }
        STFex fex = new STFex(priorM);
        STTaggerWordDictionary wD = (wDictS != null) ? new XMLWordDictionaryReader(new File(wDictS)).read() : null;       
        STTaggerPOSDictionary pD = (pDictS != null) ? new XMLPOSDictionaryReader(new File(pDictS)).read() : null;
        int kay = (opts.get("firstk") == null) ? 20 : Integer.parseInt(opts.get("firstk")), firstK, lastK;
        firstK = (opts.get("firstk") == null) ? 20 : Integer.parseInt(opts.get("firstk"));
        lastK = (opts.get("lastk") == null) ? 100 : Integer.parseInt(opts.get("lastk"));
        double[] betaz = new double[betasS.split("\\s+").length];
        int cursor = 0;
View Full Code Here

TOP

Related Classes of opennlp.ccg.parse.supertagger.io.XMLPOSDictionaryReader

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.