Interface IParser

Namespace
NOpenNLP.Tools.Parser
Assembly
NOpenNLP.Tools.dll

Interface for full-syntactic parsers.

public interface IParser

Methods

Parse(Parse)

Returns a parse for the specified parse of tokens.

Parse Parse(Parse tokens)

Parameters

tokens Parse

The root node of a flat parse containing only tokens.

Returns

Parse

A full parse of the specified tokens or the flat chunks of the tokens if a full parse could not be found.

Parse(Parse, int)

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. Parent can be used to make the parents consistent with a particular parse, but subsequent calls to SetParents(Parse) can invalidate the results of earlier calls.
Parse[] Parse(Parse tokens, int numParses)

Parameters

tokens Parse

A parse containing the tokens with a single parent node.

numParses int

The number of parses desired.

Returns

Parse[]

the specified number of parses for the specified tokens.