public class CorefUtils
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.function.Predicate<Pair<CorefChain.CorefMention,java.util.List<CoreLabel>>> |
filterCustomerAbstractPronouns |
Constructor and Description |
---|
CorefUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
checkForInterrupt() |
static boolean |
filterClustersWithMentionSpans(CorefCluster cluster,
java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> spans) |
static boolean |
filterCorefChainWithMentionSpans(CorefChain chain,
java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> spans) |
static java.util.List<java.util.List<Mention>> |
filterXmlTagsFromMentions(java.util.List<java.util.List<Mention>> mentions) |
static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,java.lang.Boolean> |
getLabeledMentionPairs(Document document) |
static java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> |
getMatchingMentionsSpans(Annotation annotation,
java.util.Collection<CorefChain> chains,
java.util.function.Predicate<Pair<CorefChain.CorefMention,java.util.List<CoreLabel>>> matcher,
boolean includeAllMentionsInChain) |
static java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> |
getMatchingSpans(Annotation annotation) |
static java.util.List<Pair<java.lang.Integer,java.lang.Integer>> |
getMentionPairs(Document document) |
static java.util.List<Mention> |
getSortedMentions(Document document) |
static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,java.lang.Boolean> |
getUnlabeledMentionPairs(Document document) |
static java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> |
heuristicFilter(java.util.List<Mention> sortedMentions,
int maxMentionDistance,
int maxMentionDistanceWithStringMatch) |
static void |
mergeCoreferenceClusters(Pair<java.lang.Integer,java.lang.Integer> mentionPair,
Document document) |
static void |
mergePronounsBasedOnSpeaker(Document document,
java.util.List<Mention> mentions) |
static void |
printHumanReadableCoref(Document document) |
static void |
removeSingletonClusters(Document document) |
public static java.util.function.Predicate<Pair<CorefChain.CorefMention,java.util.List<CoreLabel>>> filterCustomerAbstractPronouns
public static java.util.List<Pair<java.lang.Integer,java.lang.Integer>> getMentionPairs(Document document)
public static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,java.lang.Boolean> getUnlabeledMentionPairs(Document document)
public static java.util.Map<Pair<java.lang.Integer,java.lang.Integer>,java.lang.Boolean> getLabeledMentionPairs(Document document)
public static void mergeCoreferenceClusters(Pair<java.lang.Integer,java.lang.Integer> mentionPair, Document document)
public static void removeSingletonClusters(Document document)
public static void mergePronounsBasedOnSpeaker(Document document, java.util.List<Mention> mentions)
public static void checkForInterrupt()
public static java.util.Map<java.lang.Integer,java.util.List<java.lang.Integer>> heuristicFilter(java.util.List<Mention> sortedMentions, int maxMentionDistance, int maxMentionDistanceWithStringMatch)
public static void printHumanReadableCoref(Document document)
public static java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> getMatchingSpans(Annotation annotation)
public static java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> getMatchingMentionsSpans(Annotation annotation, java.util.Collection<CorefChain> chains, java.util.function.Predicate<Pair<CorefChain.CorefMention,java.util.List<CoreLabel>>> matcher, boolean includeAllMentionsInChain)
public static boolean filterCorefChainWithMentionSpans(CorefChain chain, java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> spans)
public static boolean filterClustersWithMentionSpans(CorefCluster cluster, java.util.Set<Triple<java.lang.Integer,java.lang.Integer,java.lang.Integer>> spans)