Package opennlp.ccg.synsem

Examples of opennlp.ccg.synsem.LF


      int numParses = Math.min(nbestListSize, parser.getResult().size());
      for (int i=0; i < numParses; i++) {
          Sign thisParse = parser.getResult().get(i);
          // convert lf
          Category cat = thisParse.getCategory();
          LF convertedLF = null;
          String predInfo = null;
          if (cat.getLF() != null) {
        // convert LF
        LF flatLF = cat.getLF();
        cat = cat.copy();
        Nominal index = cat.getIndexNominal();
        convertedLF = HyloHelper.compactAndConvertNominals(flatLF, index, thisParse);
        // get pred info
        predInfoMap.clear();
View Full Code Here


        skipped++;
        continue;
      }
      // mww: added try-catch block
      try {
        LF lf = Realizer.getLfFromElt(itemLFElt);
        LF flatLF = HyloHelper.flattenLF(lf);
        lfs.offer(new LFInfo(flatLF, predInfo, lfNum));
      }
      catch (Exception exc) {
        System.err.println("Skipping lf #" + n + " (info: " + lfNum + ") in file " + lfFile + ", uncaught exception:");
        System.err.println(exc.getMessage());
View Full Code Here

      t = new TagExtract(tex);
    }
    t.setOutput(output);
    while(lfs.hasNext()) {
        LFInfo lfi = lfs.next();
        LF lf = lfi.getLF();
        try {
          //lfNum++;
          t.extract(lf, lfi.getFullWords());
          //lfcount++;
          //debug("LFs extracted:       " + lfcount + "\r");
View Full Code Here

TOP

Related Classes of opennlp.ccg.synsem.LF

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.