uk.ac.man.entitytagger.matching
Class Matcher

java.lang.Object
  extended by uk.ac.man.entitytagger.matching.Matcher
Direct Known Subclasses:
ACIDMatcher, AutomatonMatcher, DuplicationMatcher, IntersectionMatcher, MatchPostProcessor, PrecomputedMatcher, RegexpMatcher, SentenceMatcher, SimpleClientMatcher, TaxonGrabMatcher, UnionMatcher, VariantDictionaryMatcher

public abstract class Matcher
extends java.lang.Object

Abstract class describing a matcher, and providing common methods for the available matchers

Author:
Martin

Nested Class Summary
static class Matcher.Disambiguation
          OFF: No disambiguation is performed ON_EARLIER: Disambiguation is performed by looking at earlier contents in the document ON_WHOLE: Disambiguation is performed by looking in the whole document
 
Constructor Summary
Matcher()
           
 
Method Summary
static java.util.List<Mention> combineMatches(java.util.List<Mention> matches)
           
static void detectEnumerations(java.util.List<Mention> mentions, java.lang.String text)
           
static java.util.List<Mention> disambiguate(java.lang.String text, java.util.List<Mention> matches, Matcher.Disambiguation mode)
           
protected static boolean isValidMatch(java.lang.String text, Mention match)
           
 java.util.List<Mention> match(Document d)
           
 java.util.List<Mention> match(java.lang.String text)
           
abstract  java.util.List<Mention> match(java.lang.String text, Document doc)
          Search a given text for mentions
 java.util.List<Mention> match(java.lang.String text, java.lang.String documentID)
           
protected static void performAcronymResolution(Document doc, java.lang.String text, java.util.List<Mention> matches)
           
 int size()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Matcher

public Matcher()
Method Detail

match

public abstract java.util.List<Mention> match(java.lang.String text,
                                              Document doc)
Search a given text for mentions

Parameters:
text -
doc - the document associated to the text, may be null
Returns:
the mentions found by the matcher in the text

size

public int size()

isValidMatch

protected static boolean isValidMatch(java.lang.String text,
                                      Mention match)

disambiguate

public static java.util.List<Mention> disambiguate(java.lang.String text,
                                                   java.util.List<Mention> matches,
                                                   Matcher.Disambiguation mode)

combineMatches

public static java.util.List<Mention> combineMatches(java.util.List<Mention> matches)

match

public java.util.List<Mention> match(java.lang.String text)

match

public java.util.List<Mention> match(java.lang.String text,
                                     java.lang.String documentID)

performAcronymResolution

protected static void performAcronymResolution(Document doc,
                                               java.lang.String text,
                                               java.util.List<Mention> matches)

detectEnumerations

public static void detectEnumerations(java.util.List<Mention> mentions,
                                      java.lang.String text)

match

public java.util.List<Mention> match(Document d)