Package org.maltparserx.parser

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


    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

    } 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

    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

    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

    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

    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

    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

    update((PlanarConfig)parsingAlgorithm.getCurrentParserConfiguration());
  }
 
  public void update(Object[] arguments) throws MaltChainedException {
    if (arguments.length != 1 || !(arguments[0] instanceof PlanarConfig)) {
      throw new ParsingException("Arguments to the planar address function is not correct. ");
    }
    update((PlanarConfig)arguments[0]);
  }
View Full Code Here

    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

TOP

Related Classes of org.maltparserx.parser.ParsingException

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.