All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.nlp.parser.common.ParserQuery Maven / Gradle / Ivy

Go to download

Stanford Parser processes raw text in English, Chinese, German, Arabic, and French, and extracts constituency parse trees.

There is a newer version: 3.9.2
Show newest version
package edu.stanford.nlp.parser.common;

import java.io.PrintWriter;
import java.util.List;

import edu.stanford.nlp.ling.HasWord;
import edu.stanford.nlp.parser.KBestViterbiParser;
import edu.stanford.nlp.trees.Tree;
import edu.stanford.nlp.util.ScoredObject;

public interface ParserQuery {
  boolean parse(List sentence);
  
  boolean parseAndReport(List sentence, PrintWriter pwErr);

  double getPCFGScore();

  Tree getBestParse();

  Tree getBestPCFGParse();

  Tree getBestDependencyParse(boolean debinarize);

  Tree getBestFactoredParse();

  List> getBestPCFGParses();

  void restoreOriginalWords(Tree tree);

  boolean hasFactoredParse();

  List> getKBestPCFGParses(int kbestPCFG);

  List> getKGoodFactoredParses(int kbest);

  KBestViterbiParser getPCFGParser();

  KBestViterbiParser getFactoredParser();

  KBestViterbiParser getDependencyParser();

  void setConstraints(List constraints);

  boolean saidMemMessage();

  /**
   * Parsing succeeded without any horrible errors or fallback
   */
  boolean parseSucceeded();

  /**
   * The sentence was skipped, probably because it was too long or of length 0
   */
  boolean parseSkipped();

  /**
   * The model had to fall back to a simpler model on the previous parse
   */
  boolean parseFallback();

  /**
   * The model ran out of memory on the most recent parse
   */
  boolean parseNoMemory();

  /**
   * The model could not parse the most recent sentence for some reason
   */
  boolean parseUnparsable();

  List originalSentence();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy