public class DefaultParse extends AbstractParse
| Modifier and Type | Field and Description |
|---|---|
static String[] |
NAME_TYPES |
| Constructor and Description |
|---|
DefaultParse(Parse parse,
int sentenceNumber)
Initializes the current instance.
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(Parse p) |
boolean |
equals(Object o) |
List<Parse> |
getChildren()
Returns a list of the children to this object.
|
int |
getEntityId()
Returns an entity id associated with this parse and coreferent parses.
|
String |
getEntityType()
Returns the named-entity type of this node.
|
List<Parse> |
getNamedEntities()
Returns a list of all the named entities
contained by this parse.
|
Parse |
getNextToken()
Returns the next token which is not a child of this parse.
|
Parse |
getParent()
Returns the parent parse of this parse node.
|
Parse |
getParse()
Retrieves the
Parse. |
Parse |
getPreviousToken()
Returns the first token which is not a child of this parse.
|
int |
getSentenceNumber()
Returns the index of the sentence which contains this parse.
|
Span |
getSpan()
Returns the character offsets of this parse node.
|
List<Parse> |
getSyntacticChildren()
Returns a list of the children to this object which are constituents or tokens.
|
String |
getSyntacticType()
Returns the syntactic type of this node.
|
List<Parse> |
getTokens()
Returns a list of the tokens contained by this object.
|
int |
hashCode() |
boolean |
isNamedEntity()
Specifies whether this parse is a named-entity.
|
boolean |
isNounPhrase()
Specifies whether this parse is a noun phrase.
|
boolean |
isParentNAC()
Determines whether this has an ancestor of type NAC.
|
boolean |
isSentence()
Specifies whether this parse is a sentence.
|
boolean |
isToken()
Specifies whether this parse is a token.
|
String |
toString() |
getNounPhrases, isCoordinatedNounPhrasepublic static String[] NAME_TYPES
public DefaultParse(Parse parse, int sentenceNumber)
parse - sentenceNumber - public int getSentenceNumber()
Parsepublic List<Parse> getNamedEntities()
ParseParse interface.public List<Parse> getChildren()
ParseParse interface
.public List<Parse> getSyntacticChildren()
ParseParse interface. This allows
implementations which contain addition nodes for things such as semantic categories to
hide those nodes from the components which only care about syntactic nodes.public List<Parse> getTokens()
ParseParse interface.public String getSyntacticType()
Parsepublic String getEntityType()
Parsepublic boolean isParentNAC()
Parsepublic Parse getParent()
Parsepublic boolean isNamedEntity()
Parsepublic boolean isNounPhrase()
Parsepublic boolean isSentence()
Parsepublic boolean isToken()
Parsepublic int getEntityId()
Parsepublic Span getSpan()
Parsepublic int compareTo(Parse p)
public String toString()
public Parse getPreviousToken()
Parsepublic Parse getNextToken()
ParseCopyright © 2019 The Apache Software Foundation. All rights reserved.