Examples of ParsingException


Examples of org.maltparserx.parser.ParsingException

    return input.isEmpty();
  }
 
  public DependencyNode getStackNode(int index) throws MaltChainedException {
    if (index < 0) {
      throw new ParsingException("Stack index must be non-negative in feature specification. ");
    }
    if (stack.size()-index > 0) {
      return stack.get(stack.size()-1-index);
    }
    return null;
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    return null;
  }
 
  public DependencyNode getInputNode(int index) throws MaltChainedException {
    if (index < 0) {
      throw new ParsingException("Input index must be non-negative in feature specification. ");
    }
    if (input.size()-index > 0) {
      return input.get(input.size()-1-index);
   
    return null;
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    setAlgorithm(parsingAlgorithm);
  }
 
  public void initialize(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": number of arguments are not correct. ");
    }
    if (!(arguments[0] instanceof Integer)) {
      throw new ParsingException("Could not initialize "+this.getClass().getName()+": the first argument is not an integer. ");
    }
   
    setIndex(((Integer)arguments[0]).intValue());
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    return input.isEmpty();
  }
 
  public DependencyNode getStackNode(int index) throws MaltChainedException {
    if (index < 0) {
      throw new ParsingException("Stack index must be non-negative in feature specification. ");
    }
    if (stack.size()-index > 0) {
      return stack.get(stack.size()-1-index);
    }
    return null;
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    return null;
  }
 
  public DependencyNode getInputNode(int index) throws MaltChainedException {
    if (index < 0) {
      throw new ParsingException("Input index must be non-negative in feature specification. ");
    }
    if (input.size()-index > 0) {
      return input.get(input.size()-1-index);
   
    return null;
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    } else if (conn.equalsIgnoreCase("reduceonly")) {
      connectedness = REDUCE_ONLY;
    } else if (conn.equalsIgnoreCase("full")) {
      connectedness = FULL_CONNECTEDNESS;
    } else {
      throw new ParsingException("The connectedness constraint option '"+conn+"' is unknown");
    }
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    if (rh.equalsIgnoreCase("relaxed")) {
      rootHandling = RELAXED;
    } else if (rh.equalsIgnoreCase("normal")) {
      rootHandling = NORMAL;
    } else {
      throw new ParsingException("The root handling '"+rh+"' is unknown");
    }
  }
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    return input.isEmpty();
  }
 
  private DependencyNode getStackNode(Stack<DependencyNode> stack , int index) throws MaltChainedException {
    if (index < 0) {
      throw new ParsingException("Stack index must be non-negative in feature specification. ");
    }
    if (stack.size()-index > 0) {
      return stack.get(stack.size()-1-index);
    }
    return null;
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    return getStackNode ( getInactiveStack() , index );
  }
 
  public DependencyNode getInputNode(int index) throws MaltChainedException {
    if (index < 0) {
      throw new ParsingException("Input index must be non-negative in feature specification. ");
    }
    if (input.size()-index > 0) {
      return input.get(input.size()-1-index);
   
    return null;
View Full Code Here

Examples of org.maltparserx.parser.ParsingException

    if (rh.equalsIgnoreCase("relaxed")) {
      rootHandling = RELAXED;
    } else if (rh.equalsIgnoreCase("normal")) {
      rootHandling = NORMAL;
    } else {
      throw new ParsingException("The root handling '"+rh+"' is unknown");
    }
  }
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.