public abstract class AbstractMentionFinder extends Object implements MentionFinder
MentionFinder interface.| Modifier and Type | Field and Description |
|---|---|
protected boolean |
collectCoordinatedNounPhrases |
protected boolean |
collectPrenominalNamedEntities |
protected HeadFinder |
headFinder |
| Constructor and Description |
|---|
AbstractMentionFinder() |
| Modifier and Type | Method and Description |
|---|---|
protected Map<Parse,Parse> |
constructHeadMap(List<Parse> nps)
Assigns head relations between noun phrases and the child np
which is their head.
|
Mention[] |
getMentions(Parse p)
Returns an array of mentions.
|
List<Parse> |
getNamedEntities(Parse p)
Return all noun phrases which are contained by
p. |
protected boolean |
isBasalNounPhrase(Parse np) |
protected boolean |
isConjoinedBasal(Parse np) |
boolean |
isCoordinatedNounPhraseCollection()
Returns whether this mention finder collects coordinated noun phrases as mentions.
|
protected boolean |
isOfPrepPhrase(Parse np) |
protected boolean |
isPossessive(Parse np) |
boolean |
isPrenominalNamedEntityCollection()
Returns whether this mention finder collects pre-nominal named-entities as mentions.
|
void |
setCoordinatedNounPhraseCollection(boolean b)
Specifies whether coordinated noun phrases should be collected as mentions.
|
void |
setPrenominalNamedEntityCollection(boolean b)
Specifies whether pre-nominal named-entities should be collected as mentions.
|
protected HeadFinder headFinder
protected boolean collectPrenominalNamedEntities
protected boolean collectCoordinatedNounPhrases
protected Map<Parse,Parse> constructHeadMap(List<Parse> nps)
nps - List of valid nps for this mention finder.public boolean isPrenominalNamedEntityCollection()
MentionFinderisPrenominalNamedEntityCollection in interface MentionFinderpublic void setPrenominalNamedEntityCollection(boolean b)
MentionFindersetPrenominalNamedEntityCollection in interface MentionFinderb - true if pre-nominal named-entities should be collected; false otherwise.protected boolean isBasalNounPhrase(Parse np)
protected boolean isPossessive(Parse np)
protected boolean isOfPrepPhrase(Parse np)
protected boolean isConjoinedBasal(Parse np)
public List<Parse> getNamedEntities(Parse p)
p.p - The parse in which to find the noun phrases.Parse objects which are noun phrases contained by p.public Mention[] getMentions(Parse p)
MentionFindergetMentions in interface MentionFinderp - A top level parse from which mentions are gathered.Extent interface.public boolean isCoordinatedNounPhraseCollection()
MentionFinderisCoordinatedNounPhraseCollection in interface MentionFinderpublic void setCoordinatedNounPhraseCollection(boolean b)
MentionFindersetCoordinatedNounPhraseCollection in interface MentionFinderb - true if coordinated noun phrases should be collected; false otherwise.Copyright © 2019 The Apache Software Foundation. All rights reserved.