Package org.maltparserx.core.flow

Examples of org.maltparserx.core.flow.FlowChartInstance


        OptionManager.instance().overloadOptionValue(optionContainerIndex, "config", "flowchart", flowChartName);
      } else {
        flowChartName = OptionManager.instance().getOptionValue(optionContainerIndex, "config", "flowchart").toString();
      }
    }
    FlowChartInstance flowChartInstance = flowChartManager.initialize(optionContainerIndex, flowChartName);
    flowChartInstances.put(optionContainerIndex, flowChartInstance);
    return flowChartInstance;
  }
View Full Code Here


    flowChartInstances.put(optionContainerIndex, flowChartInstance);
    return flowChartInstance;
  }
 
  public void process(int optionContainerIndex) throws MaltChainedException {
    FlowChartInstance flowChartInstance = flowChartInstances.get(optionContainerIndex);
    if (flowChartInstance.hasPreProcessChartItems()) {
      flowChartInstance.preprocess();
    }
    if (flowChartInstance.hasProcessChartItems()) {
      int signal = ChartItem.CONTINUE;
      int tic = 0;
      int sentenceCounter = 0;
      int nIteration = 1;
      flowChartInstance.setEngineRegistry("iterations", nIteration);
      System.gc();
      while (signal != ChartItem.TERMINATE) {
        signal = flowChartInstance.process();
        if (signal == ChartItem.CONTINUE) {
          sentenceCounter++;
        } else if (signal == ChartItem.NEWITERATION) {
          SystemLogger.logger().info("\n=== END ITERATION "+nIteration+" ===\n");
          nIteration++;
          flowChartInstance.setEngineRegistry("iterations", nIteration);
        }
        if (sentenceCounter < 101 && sentenceCounter == 1 || sentenceCounter == 10 || sentenceCounter == 100) {
          Util.startTicer(SystemLogger.logger(), startTime, 10, sentenceCounter);
        }
        if (sentenceCounter%100 == 0) {
          tic = Util.simpleTicer(SystemLogger.logger(), startTime, 10, tic, sentenceCounter);
        }
      }
      Util.endTicer(SystemLogger.logger(), startTime, 10, tic, sentenceCounter);
    }
    if (flowChartInstance.hasPostProcessChartItems()) {
      flowChartInstance.postprocess();
    }
  }
View Full Code Here

TOP

Related Classes of org.maltparserx.core.flow.FlowChartInstance

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.