public class CreatePatterns extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
CreatePatterns.CreatePatternsThread |
| Modifier and Type | Field and Description |
|---|---|
boolean |
addPatWithoutPOS
Add patterns without POS restriction as well: One of this and
usePOS4Pattern has to be true. |
int |
maxWindow4Pattern
Consider contexts less than or equal to these many tokens -- total of left
and right contexts be can double of this.
|
int |
minWindow4Pattern
Consider contexts longer or equal to these many tokens.
|
int |
numMinStopWordsToAdd
If the whole (either left or right) context is just stop words, add the
pattern only if number of tokens is equal or more than this.
|
boolean |
useFillerWordsInPat
Ignore words like "a", "an", "the" when matching a pattern.
|
boolean |
useNextContext
Consider contexts on the right of a token.
|
boolean |
usePOS4Pattern
Use POS tag restriction in the target term: One of this and
addPatWithoutPOS has to be true. |
boolean |
usePreviousContext
Consider contexts on the left of a token.
|
boolean |
useStopWordsBeforeTerm
allow to match stop words before a target term.
|
| Constructor and Description |
|---|
CreatePatterns(Properties props,
ConstantsAndVariables constVars) |
| Modifier and Type | Method and Description |
|---|---|
Map<String,Map<Integer,Triple<Set<SurfacePattern>,Set<SurfacePattern>,Set<SurfacePattern>>>> |
getAllPatterns(String label,
Map<String,List<CoreLabel>> sents) |
Triple<Set<SurfacePattern>,Set<SurfacePattern>,Set<SurfacePattern>> |
getContext(List<CoreLabel> sent,
int i) |
static boolean |
isASCII(String text) |
@Execution.Option(name="usePOS4Pattern") public boolean usePOS4Pattern
addPatWithoutPOS has to be true.@Execution.Option(name="addPatWithoutPOS") public boolean addPatWithoutPOS
usePOS4Pattern has to be true.@Execution.Option(name="minWindow4Pattern") public int minWindow4Pattern
@Execution.Option(name="maxWindow4Pattern") public int maxWindow4Pattern
@Execution.Option(name="usePreviousContext") public boolean usePreviousContext
@Execution.Option(name="useNextContext") public boolean useNextContext
@Execution.Option(name="numMinStopWordsToAdd") public int numMinStopWordsToAdd
@Execution.Option(name="useFillerWordsInPat") public boolean useFillerWordsInPat
@Execution.Option(name="useStopWordsBeforeTerm") public boolean useStopWordsBeforeTerm
public CreatePatterns(Properties props, ConstantsAndVariables constVars) throws IOException
IOExceptionpublic Triple<Set<SurfacePattern>,Set<SurfacePattern>,Set<SurfacePattern>> getContext(List<CoreLabel> sent, int i)
public static boolean isASCII(String text)
public Map<String,Map<Integer,Triple<Set<SurfacePattern>,Set<SurfacePattern>,Set<SurfacePattern>>>> getAllPatterns(String label, Map<String,List<CoreLabel>> sents) throws InterruptedException, ExecutionException