Package opennlp.tools.namefind

Examples of opennlp.tools.namefind.NameFinderME


     
      log.info("Loading model {}", modelFile);
      InputStream modelStream = new FileInputStream(modelFile);
      TokenNameFinderModel model = //<co id="nfe.modelreader"/>
          new PooledTokenNameFinderModel(modelStream);
      finders[fi] = new NameFinderME(model);
     
    }

    /*<calloutlist>
      <callout arearefs="nfe.findmodels">Find Models</callout>
View Full Code Here


        UimaUtil.BEAM_SIZE_PARAMETER);

    if (beamSize == null)
      beamSize = NameFinderME.DEFAULT_BEAM_SIZE;
   
    mNameFinder = new NameFinderME(model, beamSize);
  }
View Full Code Here

public class TokenChunker {

  private NameFinderME nameFinder;

  public TokenChunker(String modelName) throws IOException {
  nameFinder = new NameFinderME(new SuffixSensitiveGISModelReader(
      new File(modelName)).getModel());
  }
View Full Code Here

    if (args.length == 0) {
      System.out.println(getHelp());
      throw new TerminateToolException(1);
    }
   
    NameFinderME nameFinders[] = new NameFinderME[args.length];
   
    for (int i = 0; i < nameFinders.length; i++) {
      TokenNameFinderModel model = new TokenNameFinderModelLoader().load(new File(args[i]));
      nameFinders[i] = new NameFinderME(model);
    }
   
    ObjectStream<String> untokenizedLineStream =
        new PlainTextByLineStream(new InputStreamReader(System.in));
   
View Full Code Here

      detailedFListener = new TokenNameFinderDetailedFMeasureListener();
      listeners.add(detailedFListener);
    }

    TokenNameFinderEvaluator evaluator = new TokenNameFinderEvaluator(
        new NameFinderME(model),
        listeners.toArray(new TokenNameFinderEvaluationMonitor[listeners.size()]));

    final ObjectStream<NameSample> sampleStream = TokenNameFinderTrainerTool.openSampleData("Test",
        testData, encoding);
View Full Code Here

        UimaUtil.BEAM_SIZE_PARAMETER);

    if (beamSize == null)
      beamSize = NameFinderME.DEFAULT_BEAM_SIZE;
   
    mNameFinder = new NameFinderME(model, beamSize);
  }
View Full Code Here

 
  /** Creates an English name finder using the specified model.
   * @param mod The model used for finding names.
   */
  public TreebankNameFinder(TokenNameFinderModel mod) {
    nameFinder = new NameFinderME(mod);
  }
View Full Code Here

public class TokenChunker {

  private NameFinderME nameFinder;

  public TokenChunker(String modelName) throws IOException {
  nameFinder = new NameFinderME(new SuffixSensitiveGISModelReader(
      new File(modelName)).getModel());
  }
View Full Code Here

      detailedFListener = new TokenNameFinderDetailedFMeasureListener();
      listeners.add(detailedFListener);
    }

    TokenNameFinderEvaluator evaluator = new TokenNameFinderEvaluator(
        new NameFinderME(model),
        listeners.toArray(new TokenNameFinderEvaluationMonitor[listeners.size()]));

    final PerformanceMonitor monitor = new PerformanceMonitor("sent");

    ObjectStream<NameSample> measuredSampleStream = new ObjectStream<NameSample>() {
View Full Code Here

   
    if (args.length == 0) {
      System.out.println(getHelp());
    } else {
   
      NameFinderME nameFinders[] = new NameFinderME[args.length];

      for (int i = 0; i < nameFinders.length; i++) {
        TokenNameFinderModel model = new TokenNameFinderModelLoader().load(new File(args[i]));
        nameFinders[i] = new NameFinderME(model);
      }

      ObjectStream<String> untokenizedLineStream =
          new PlainTextByLineStream(new InputStreamReader(System.in));
View Full Code Here

TOP

Related Classes of opennlp.tools.namefind.NameFinderME

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.