opennlp.tools.coref.sim
Class Context
java.lang.Object
opennlp.tools.coref.mention.Mention
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)
|
headTokenText
protected String headTokenText
headTokenTag
protected String headTokenTag
synsets
protected Set<String> synsets
tokens
protected Object[] tokens
headTokenIndex
protected int headTokenIndex
- The token index in of the head word of this mention.
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)
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 © 2010. All Rights Reserved.