Package joshua.decoder.segment_file

Examples of joshua.decoder.segment_file.TypeCheckingException


    this.rules  = new LinkedList<SAXConstraintRule>();
  }
 
 
  private TypeCheckingException illegalIndexesException() {
    return new TypeCheckingException(
      "Illegal indexes in <span start=\""
      + this.start + "\" end=\"" + this.end + "\">");
  }
View Full Code Here


      }
    } else if (null != this.rhs) {
      if (null == this.features) {
        tempType = ConstraintRule.Type.RHS;
      } else {
        throw new TypeCheckingException(
          "Invalid ConstraintRule: Can only specify features attribute on <rhs> if there is a <lhs>");
      }
    }
    if (null == tempType) {
      throw new TypeCheckingException("Invalid ConstraintRule");
    }
   
   
    final ConstraintRule.Type type = tempType;
    final float[] features   = this.features;
View Full Code Here

      if (span.isHard()) {
        if (hardSpans.get(span.start(),span.end()).isEmpty()) {
          hardSpans.set(span.start(),span.end());
        } else {
          // TODO: give a better error message. Line/column info can be provided by the caller; we'd want to provide info about the segment id, which spans overlap, the index range of overlap, etc. We'll need more than a bit-vector to figure some of that out though...
          throw new TypeCheckingException("Overlapping hard spans in segment " + id + ", approximately in the range of " + span.start() + " to " + span.end());
        }
      }
    }
   
    return new Segment() {
View Full Code Here

TOP

Related Classes of joshua.decoder.segment_file.TypeCheckingException

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.