Package opennlp.tools.parser
Interface Parser
- All Known Implementing Classes:
AbstractBottomUpParser
,Parser
,Parser
public interface Parser
Defines common methods for full-syntactic parsers.
-
Method Summary
-
Method Details
-
parse
Returns the specified number of parses or fewer for the specified tokens.Note: The nodes within the returned parses are shared with other parses and therefore their parent node references will not be consistent with their child node reference.
Parse.setParent(Parse)
can be used to make the parents consistent with a particular parse, but subsequent calls tosetParents
can invalidate the results of earlier calls. -
parse
- Parameters:
tokens
- The root node of a flat parse containing only tokens.- Returns:
- A full parse of the specified tokens or the flat chunks of the tokens if a full parse could not be found.
-