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

edu.stanford.nlp.parser.Parser Maven / Gradle / Ivy

Go to download

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.

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

import java.util.List;

import edu.stanford.nlp.ling.HasWord;


/**
 * The interface for parser objects.  The only responsibility of a
 * parser is to return the parsability of input sentences.  That is,
 * parsers need only actually be recognizers/acceptors.
 * 

* Specification of the grammar or model * parameters is meant to be done by implementing classes' constructors. * If there is no specification of a goal, then this will also be determined * by the grammar or implementing class. * * @author Dan Klein * @author Christopher Manning */ public interface Parser { /** * Parses the given sentence. For any words in the sentence which * implement HasTag, the tag will be believed. The return value * will be false if the sentence is not parseable. Acceptance is with * respect to some goal category, which may be specified by the grammar, * or may be a parser default (for instance, S). * * @param sentence A List<HasWord> to be parsed * @return true iff the sentence is recognized * @throws UnsupportedOperationException This will be thrown if for * any reason the parser can't complete parsing this sentence, for * example if the sentence is too long */ public boolean parse(List sentence); }





© 2015 - 2024 Weber Informatics LLC | Privacy Policy