opennlp.tools.coref.mention
Class AbstractMentionFinder

java.lang.Object
  extended by opennlp.tools.coref.mention.AbstractMentionFinder
All Implemented Interfaces:
MentionFinder
Direct Known Subclasses:
PTBMentionFinder, ShallowParseMentionFinder

public abstract class AbstractMentionFinder
extends Object
implements MentionFinder

Provides default implementation of many of the methods in the MentionFinder interface.


Constructor Summary
AbstractMentionFinder()
           
 
Method Summary
 Mention[] getMentions(Parse p)
          Returns an array of mentions.
 List<Parse> getNamedEntities(Parse p)
          Return all noun phrases which are contained by p.
 boolean isCoordinatedNounPhraseCollection()
          Returns whether this mention finder collects coordinated noun phrases as mentions.
 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.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractMentionFinder

public AbstractMentionFinder()
Method Detail

isPrenominalNamedEntityCollection

public boolean isPrenominalNamedEntityCollection()
Description copied from interface: MentionFinder
Returns whether this mention finder collects pre-nominal named-entities as mentions.

Specified by:
isPrenominalNamedEntityCollection in interface MentionFinder
Returns:
true if this mention finder collects pre-nominal named-entities as mentions

setPrenominalNamedEntityCollection

public void setPrenominalNamedEntityCollection(boolean b)
Description copied from interface: MentionFinder
Specifies whether pre-nominal named-entities should be collected as mentions.

Specified by:
setPrenominalNamedEntityCollection in interface MentionFinder
Parameters:
b - true if pre-nominal named-entities should be collected; false otherwise.

getNamedEntities

public List<Parse> getNamedEntities(Parse p)
Return all noun phrases which are contained by p.

Parameters:
p - The parse in which to find the noun phrases.
Returns:
A list of Parse objects which are noun phrases contained by p.

getMentions

public Mention[] getMentions(Parse p)
Description copied from interface: MentionFinder
Returns an array of mentions.

Specified by:
getMentions in interface MentionFinder
Parameters:
p - A top level parse from which mentions are gathered.
Returns:
an array of mentions which implement the Extent interface.

isCoordinatedNounPhraseCollection

public boolean isCoordinatedNounPhraseCollection()
Description copied from interface: MentionFinder
Returns whether this mention finder collects coordinated noun phrases as mentions.

Specified by:
isCoordinatedNounPhraseCollection in interface MentionFinder
Returns:
true if this mention finder collects coordinated noun phrases as mentions; false otherwise.

setCoordinatedNounPhraseCollection

public void setCoordinatedNounPhraseCollection(boolean b)
Description copied from interface: MentionFinder
Specifies whether coordinated noun phrases should be collected as mentions.

Specified by:
setCoordinatedNounPhraseCollection in interface MentionFinder
Parameters:
b - true if coordinated noun phrases should be collected; false otherwise.


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.