uk.ac.man.entitytagger.matching.matchers
Class AutomatonMatcher
java.lang.Object
uk.ac.man.entitytagger.matching.Matcher
uk.ac.man.entitytagger.matching.matchers.AutomatonMatcher
public class AutomatonMatcher
- extends Matcher
Class for matching using an automaton
- Author:
- Martin
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
automatons
private CustomRunAutomaton[] automatons
ignoreCase
private boolean ignoreCase
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 matchingignoreCase
- whether to ignore case or not
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