uk.ac.man.entitytagger.matching.matchers
Class ACIDMatcher
java.lang.Object
uk.ac.man.entitytagger.matching.Matcher
uk.ac.man.entitytagger.matching.matchers.ACIDMatcher
public class ACIDMatcher
- extends Matcher
Field Summary |
private java.util.HashMap<java.lang.String,java.lang.Integer> |
groups
|
private java.util.HashMap<java.lang.String,java.util.regex.Pattern> |
patterns
|
Constructor Summary |
ACIDMatcher(java.io.File patternFile)
|
Method Summary |
static Tuple<java.util.HashMap<java.lang.String,java.util.regex.Pattern>,java.util.HashMap<java.lang.String,java.lang.Integer>> |
loadPatterns(java.io.File patternFile)
|
java.util.List<Mention> |
match(java.lang.String text,
Document doc)
Search a given text for mentions |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
patterns
private java.util.HashMap<java.lang.String,java.util.regex.Pattern> patterns
groups
private java.util.HashMap<java.lang.String,java.lang.Integer> groups
ACIDMatcher
public ACIDMatcher(java.io.File patternFile)
match
public java.util.List<Mention> match(java.lang.String text,
Document doc)
- Description copied from class:
Matcher
- Search a given text for mentions
- 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
loadPatterns
public static Tuple<java.util.HashMap<java.lang.String,java.util.regex.Pattern>,java.util.HashMap<java.lang.String,java.lang.Integer>> loadPatterns(java.io.File patternFile)