Package org.maltparserx.parser.history.container

Examples of org.maltparserx.parser.history.container.TableContainer


    actionTables = new ArrayList<TableContainer>();
    this.decisionSettings = decisionSettings;
    int start = 0;
    int k = 0;
    char prevDecisionSeparator = ' ';
    TableContainer tmp = null;
    final StringBuilder sbTableHandler = new StringBuilder();
    final StringBuilder sbTable = new StringBuilder();
    int state = 0;
    for (int i = 0; i < decisionSettings.length(); i++) {
      switch (decisionSettings.charAt(i)) {
      case '.':
        if (state != 0) {
          //error
        }
        state = 1;
        break;
      case '+':
        tmp = new TableContainer(tableHandlers.get(sbTableHandler.toString()).getSymbolTable(sbTable.toString()), sbTableHandler.toString()+"."+sbTable.toString(), '+');
        actionTables.add(tmp);
        k++;
        sbTableHandler.setLength(0);
        sbTable.setLength(0);
        state = 0;
        break;
      case '#':
        state = 2;
        break;
      case ';':
        state = 2;
        break;
      case ',':
        state = 2;
        break;
      default:
        if (state == 0) {
          sbTableHandler.append(decisionSettings.charAt(i));
        } else if (state == 1) {
          sbTable.append(decisionSettings.charAt(i));
        }
      }
      if (state == 2 || i == decisionSettings.length()-1) {
        char decisionSeparator = decisionSettings.charAt(i);
        if (i == decisionSettings.length()-1) {
          //decisionSeparator = ' ';
          decisionSeparator = prevDecisionSeparator;
        }
        tmp = new TableContainer(tableHandlers.get(sbTableHandler.toString()).getSymbolTable(sbTable.toString()), sbTableHandler.toString()+"."+sbTable.toString(), decisionSeparator);
        actionTables.add(tmp);
        k++;
        if (k-start > 1) {
          decisionTables.add(new CombinedTableContainer(getTableHandler("A"), separator, actionTables.subList(start, k), decisionSeparator));
        } else {
View Full Code Here

TOP

Related Classes of org.maltparserx.parser.history.container.TableContainer

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.