Ejemplo n.º 1
0
  /**
   * Parses a sentence, using the parser. The private ArrayList of currentParses is filled with the
   * ParsedSentences.
   */
  private Sentence parseSentence(String sentence) {
    if (sentence == null) return null;

    Sentence sent = null;
    if (sentence.length() < DEFAULT_MAX_SENTENCE_LENGTH) {
      sent = parser.parse(sentence);
    } else {
      System.err.println("Sentence too long, len=" + sentence.length() + " : " + sentence);
      sent = new Sentence();
    }
    return sent;
  }