public class PatternFactory extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
PatternFactory.PatternType |
| Modifier and Type | Field and Description |
|---|---|
static List<String> |
fillerWords |
static Pattern |
ignoreWordRegex
by default doesn't ignore anything.
|
static int |
numWordsCompound |
static boolean |
useLemmaContextTokens
Use lemma instead of words for the context tokens
|
static boolean |
useStopWordsBeforeTerm
allow to match stop words before a target term.
|
static boolean |
useTargetNERRestriction
Add NER restriction to the target phrase in the patterns
|
| Constructor and Description |
|---|
PatternFactory() |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
doNotUse(String word,
Set<CandidatePhrase> stopWords) |
static Map<Integer,Set> |
getPatternsAroundTokens(PatternFactory.PatternType patternType,
DataInstance sent,
Set<CandidatePhrase> stopWords) |
static void |
setUp(Properties props,
PatternFactory.PatternType patternType) |
@Execution.Option(name="useStopWordsBeforeTerm") public static boolean useStopWordsBeforeTerm
@Execution.Option(name="useTargetNERRestriction") public static boolean useTargetNERRestriction
@Execution.Option(name="numWordsCompound") public static int numWordsCompound
@Execution.Option(name="useLemmaContextTokens") public static boolean useLemmaContextTokens
public static Pattern ignoreWordRegex
public static void setUp(Properties props, PatternFactory.PatternType patternType)
public static boolean doNotUse(String word, Set<CandidatePhrase> stopWords)
public static Map<Integer,Set> getPatternsAroundTokens(PatternFactory.PatternType patternType, DataInstance sent, Set<CandidatePhrase> stopWords)