Package opennlp.tools.tokenize

Examples of opennlp.tools.tokenize.TokenizerEvaluator.evaluate()


    ObjectStream<TokenSample> sampleStream = TokenizerTrainerTool
        .openSampleData("Test", testData, encoding);

    try {
      evaluator.evaluate(sampleStream);
    } catch (IOException e) {
      System.err.println("failed");
      System.err.println("Reading test data error " + e.getMessage());
      throw new TerminateToolException(-1);
    } finally {
View Full Code Here


        new opennlp.tools.tokenize.TokenizerME(model), misclassifiedListener);

    System.out.print("Evaluating ... ");

    try {
      evaluator.evaluate(sampleStream);
    } catch (IOException e) {
      System.err.println("failed");
      throw new TerminateToolException(-1, "IO error while reading test data: " + e.getMessage(), e);
    } finally {
      try {
View Full Code Here

        new opennlp.tools.tokenize.TokenizerME(model), misclassifiedListener);

    System.out.print("Evaluating ... ");

    try {
      evaluator.evaluate(sampleStream);
    } catch (IOException e) {
      System.err.println("failed");
      throw new TerminateToolException(-1, "IO error while reading test data: " + e.getMessage(), e);
    } finally {
      try {
View Full Code Here

    ObjectStream<TokenSample> sampleStream = TokenizerTrainerTool.openSampleData(
        "Test", new File(CmdLineUtil.getParameter("-data", args)), encoding);

    try {
      evaluator.evaluate(sampleStream);
    } catch (IOException e) {
      System.err.println("failed");
      System.err.println("Reading test data error " + e.getMessage());
      throw new TerminateToolException(-1);
    } finally {
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.