Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
Stanford CoreNLP provides a set of natural language analysis tools which can take raw English language text input and give the base forms of words, their parts of speech, whether they are names of companies, people, etc., normalize dates, times, and numeric quantities, mark up the structure of sentences in terms of phrases and word dependencies, and indicate which noun phrases refer to the same entities. It provides the foundational building blocks for higher level text understanding applications.
* If Collinization has not been performed prior to evaluation, then
* it is customary (for reporting results) to pass in a filter that rejects
* dependencies with punctuation dependents.
*
* @author Spence Green
*
*/
public class UnlabeledAttachmentEval extends AbstractEval {
/** A logger for this class */
private static Redwood.RedwoodChannels log = Redwood.channels(UnlabeledAttachmentEval.class);
private final HeadFinder headFinder;
private final Predicate punctRejectWordFilter;
private final Predicate> punctRejectFilter;
/**
* @param headFinder If a headFinder is provided, then head percolation will be done
* for trees. Otherwise, it must be called separately.
*/
public UnlabeledAttachmentEval(String str, boolean runningAverages, HeadFinder headFinder) {
this(str, runningAverages, headFinder, Filters.acceptFilter());
}
public UnlabeledAttachmentEval(String str, boolean runningAverages, HeadFinder headFinder, Predicate punctRejectFilter) {
super(str, runningAverages);
this.headFinder = headFinder;
this.punctRejectWordFilter = punctRejectFilter;
this.punctRejectFilter = new Predicate>() {
private static final long serialVersionUID = 649358302237611081L;
// Semantics of this method are weird. If accept() returns true, then the dependent is
// *not* a punctuation item. This filter thus accepts everything except punctuation
// dependencies.
public boolean test(Dependency