opennlp.tools.coref.sim
Class Context

java.lang.Object
  extended by opennlp.tools.coref.mention.Mention
      extended by opennlp.tools.coref.sim.Context
All Implemented Interfaces:
Comparable<Mention>
Direct Known Subclasses:
MentionContext

public class Context
extends Mention

Specifies the context of a mention for computing gender, number, and semantic compatibility.


Constructor Summary
Context(Mention mention, HeadFinder headFinder)
           
Context(Object[] tokens, String headToken, String headTag, String neType)
           
Context(Span span, Span headSpan, int entityId, Parse parse, String extentType, String nameType, HeadFinder headFinder)
           
 
Method Summary
static Context[] constructContexts(Mention[] mentions, HeadFinder headFinder)
           
 int getHeadTokenIndex()
          Returns the token index into the mention for the head word.
 String getHeadTokenTag()
           
 String getHeadTokenText()
           
 Set<String> getSynsets()
           
 Object[] getTokens()
           
static Context parseContext(String word)
           
 String toString()
           
 
Methods inherited from class opennlp.tools.coref.mention.Mention
compareTo, getHeadSpan, getId, getNameType, getParse, getSpan, setId, setParse
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Context

public Context(Span span,
               Span headSpan,
               int entityId,
               Parse parse,
               String extentType,
               String nameType,
               HeadFinder headFinder)

Context

public Context(Object[] tokens,
               String headToken,
               String headTag,
               String neType)

Context

public Context(Mention mention,
               HeadFinder headFinder)
Method Detail

constructContexts

public static Context[] constructContexts(Mention[] mentions,
                                          HeadFinder headFinder)

toString

public String toString()
Overrides:
toString in class Mention

getTokens

public Object[] getTokens()

getHeadTokenText

public String getHeadTokenText()

getHeadTokenTag

public String getHeadTokenTag()

getSynsets

public Set<String> getSynsets()

parseContext

public static Context parseContext(String word)

getHeadTokenIndex

public int getHeadTokenIndex()
Returns the token index into the mention for the head word.

Returns:
the token index into the mention for the head word.


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