Package opennlp.ccg.parse

Examples of opennlp.ccg.parse.Supertagger


        } catch (Exception exc) {
            throw (RuntimeException) new RuntimeException().initCause(exc);
        }
        // instantiate supertagger
        try {
          Supertagger supertagger;
          if (supertaggerClass != null) {
                System.out.println("Instantiating supertagger from class: " + supertaggerClass);
                supertagger = (Supertagger) Class.forName(supertaggerClass).newInstance();
          }
          else {
View Full Code Here


            // also turn on parse stats if doing n-best output
            if (tester.nbestparsefile != null) tester.showParseStats = true;
            // instantiate supertagger, if any
            if (supertaggerClass != null || stconfig != null) {
                try {
                  Supertagger supertagger;
                  if (supertaggerClass != null) {
                      System.out.println("Instantiating supertagger from class: " + supertaggerClass);
                      supertagger = (Supertagger) Class.forName(supertaggerClass).newInstance();
                  }
                  else {
                    System.out.println("Instantiating supertagger from config file: " + stconfig);
                    supertagger = WordAndPOSDictionaryLabellingStrategy.supertaggerFactory(stconfig);
                  }
                    tester.parser.setSupertagger(supertagger);
                    if (tester.eventfile != null) {
                      supertagger.setIncludeGold(true); // use gold tags during training
                      tester.parser.setSupertaggerMostToLeastRestrictiveDirection(false); // reverse direction to start with least restrictive setting
                    }
                    System.out.println();
                } catch (Exception exc) {
                    throw (RuntimeException) new RuntimeException().initCause(exc);
View Full Code Here

TOP

Related Classes of opennlp.ccg.parse.Supertagger

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.