uk.ac.man.entitytagger.matching.matchers
Class AutomatonMatcher

java.lang.Object
  extended by uk.ac.man.entitytagger.matching.Matcher
      extended by uk.ac.man.entitytagger.matching.matchers.AutomatonMatcher

public class AutomatonMatcher
extends Matcher

Class for matching using an automaton

Author:
Martin

Nested Class Summary
 
Nested classes/interfaces inherited from class uk.ac.man.entitytagger.matching.Matcher
Matcher.Disambiguation
 
Field Summary
private  CustomRunAutomaton[] automatons
           
private  boolean ignoreCase
           
 
Constructor Summary
AutomatonMatcher(CustomRunAutomaton[] automatons, boolean ignoreCase)
          Will create an automaton matcher, given a set of automatons and some settings
 
Method Summary
 CustomRunAutomaton[] getAutomatons()
           
static AutomatonMatcher loadMatcher(java.io.File file)
          Will load an automaton binary file, and return a created automaton matcher.
static AutomatonMatcher[] loadMatchers(java.io.File[] files)
           
 java.util.List<Mention> match(java.lang.String text, Document doc)
          Performs matching
 int size()
           
 void store(java.io.File file)
          Will store the automatons in the automaton matcher to a file
 
Methods inherited from class uk.ac.man.entitytagger.matching.Matcher
combineMatches, detectEnumerations, disambiguate, isValidMatch, match, match, match, performAcronymResolution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

automatons

private CustomRunAutomaton[] automatons

ignoreCase

private boolean ignoreCase
Constructor Detail

AutomatonMatcher

public AutomatonMatcher(CustomRunAutomaton[] automatons,
                        boolean ignoreCase)
Will create an automaton matcher, given a set of automatons and some settings

Parameters:
automatons - the automatons used for matching
ignoreCase - whether to ignore case or not
Method Detail

loadMatcher

public static AutomatonMatcher loadMatcher(java.io.File file)
Will load an automaton binary file, and return a created automaton matcher.

Parameters:
file -
ignoreCase2 -
Returns:
the automaton matcher

loadMatchers

public static AutomatonMatcher[] loadMatchers(java.io.File[] files)

store

public void store(java.io.File file)
Will store the automatons in the automaton matcher to a file

Parameters:
file -

match

public java.util.List<Mention> match(java.lang.String text,
                                     Document doc)
Performs matching

Specified by:
match in class Matcher
doc - the document associated to the text, may be null
Returns:
the mentions found by the matcher in the text

size

public int size()
Overrides:
size in class Matcher

getAutomatons

public CustomRunAutomaton[] getAutomatons()
Returns:
the automatons