Examples of ParserType


Examples of opennlp.tools.parser.ParserType

   
    return mdict;
  }
 
  static ParserType parseParserType(String typeAsString) {
    ParserType type = null;
    if(typeAsString != null && typeAsString.length() > 0) {
      type = ParserType.parse(typeAsString);
      if(type == null) {
        System.err.println("ParserType training parameter is invalid!");
        throw new TerminateToolException(-1);
View Full Code Here

Examples of opennlp.tools.parser.ParserType

     
      HeadRules rules = new opennlp.tools.parser.lang.en.HeadRules(
          new InputStreamReader(new FileInputStream(params.getHeadRules()),
              params.getEncoding()));
     
      ParserType type = parseParserType(params.getParserType());
     
      if (mlParams == null) {
        if (ParserType.CHUNKING.equals(type)) {
          model = opennlp.tools.parser.chunking.Parser.train(
              params.getLang(), sampleStream, rules,
View Full Code Here

Examples of opennlp.tools.parser.ParserType

   
    return mdict;
  }
 
  static ParserType parseParserType(String typeAsString) {
    ParserType type = null;
    if(typeAsString != null && typeAsString.length() > 0) {
      type = ParserType.parse(typeAsString);
      if(type == null) {
        throw new TerminateToolException(1, "ParserType training parameter '" + typeAsString +
            "' is invalid!");
View Full Code Here

Examples of opennlp.tools.parser.ParserType

      // TODO hard-coded language reference
      HeadRules rules = new opennlp.tools.parser.lang.en.HeadRules(
          new InputStreamReader(new FileInputStream(params.getHeadRules()),
              params.getEncoding()));
     
      ParserType type = parseParserType(params.getParserType());
      if(params.getFun()){
        Parse.useFunctionTags(true);
      }
     
      if (ParserType.CHUNKING.equals(type)) {
View Full Code Here

Examples of opennlp.tools.parser.ParserType

    return mdict;
  }

  static ParserType parseParserType(String typeAsString) {
    ParserType type = null;
    if(typeAsString != null && typeAsString.length() > 0) {
      type = ParserType.parse(typeAsString);
      if(type == null) {
        throw new TerminateToolException(1, "ParserType training parameter '" + typeAsString +
            "' is invalid!");
View Full Code Here

Examples of opennlp.tools.parser.ParserType

    ParserModel model;
    try {
      HeadRules rules = creaeHeadRules(params);

      ParserType type = parseParserType(params.getParserType());
      if(params.getFun()){
        Parse.useFunctionTags(true);
      }

      if (ParserType.CHUNKING.equals(type)) {
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.