Package org.maltparserx.parser.history.action

Examples of org.maltparserx.parser.history.action.GuideUserAction


    parserState.initialize(parseDependencyGraph);
    currentParserConfiguration = parserState.getConfiguration();
    parseCount++;
    TransitionSystem ts = parserState.getTransitionSystem();
    while (!parserState.isTerminalState()) {
      GuideUserAction action = ts.getDeterministicAction(parserState.getHistory(), currentParserConfiguration);
      if (action == null) {
        action = predict();
      }
      parserState.apply(action);
    }
View Full Code Here


    parseCount++;
    if (diagnostics == true) {
      writeToDiaFile(parseCount + "");
    }
    while (!parserState.isTerminalState()) {
      GuideUserAction action = parserState.getTransitionSystem().getDeterministicAction(parserState.getHistory(), currentParserConfiguration);
      if (action == null) {
        action = predict();
      } else if (diagnostics == true) {
        writeToDiaFile(" *");
      }
 
View Full Code Here

    return parseDependencyGraph;
  }
 
 
  private GuideUserAction predict() throws MaltChainedException {
    GuideUserAction currentAction = parserState.getHistory().getEmptyGuideUserAction();
    try {
      classifierGuide.predict((GuideDecision)currentAction);
      while (!parserState.permissible(currentAction)) {
        if (classifierGuide.predictFromKBestList((GuideDecision)currentAction) == false) {
          currentAction = getParserState().getTransitionSystem().defaultAction(parserState.getHistory(), currentParserConfiguration);
View Full Code Here

    ttable.addTransition(RIGHTARC, "RA", true, null);
    ttable.addTransition(LEFTARC, "LA", true, null);
  }
 
  protected void initWithDefaultTransitions(GuideUserHistory history) throws MaltChainedException {
    GuideUserAction currentAction = new ComplexDecisionAction((History)history);
   
    transActionContainer.setAction(SHIFT);
    transActionContainer.setAction(REDUCE);
    for (int i = 0; i < arcLabelActionContainers.length; i++) {
      arcLabelActionContainers[i].setAction(-1);
    }
    currentAction.addAction(actionContainers);
  }
View Full Code Here

    ttable.addTransition(RIGHTARC, "RA", true, null);
    ttable.addTransition(LEFTARC, "LA", true, null);
  }
 
  protected void initWithDefaultTransitions(GuideUserHistory history) throws MaltChainedException {
    GuideUserAction currentAction = new ComplexDecisionAction((History)history);
   
    transActionContainer.setAction(SHIFT);
    transActionContainer.setAction(REDUCE);
    transActionContainer.setAction(SWITCH); //TODO it seems like a good idea to do this, but I don't know what it actually does
    transActionContainer.setAction(REDUCEBOTH); //TODO same as above
    for (int i = 0; i < arcLabelActionContainers.length; i++) {
      arcLabelActionContainers[i].setAction(-1);
    }
    currentAction.addAction(actionContainers);
  }
View Full Code Here

TOP

Related Classes of org.maltparserx.parser.history.action.GuideUserAction

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.