|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.stanford.nlp.trees.tregex.TregexPatternCompiler
public class TregexPatternCompiler
A class for compiling TregexPatterns with specific HeadFinders and or basicCategoryFunctions.
| Field Summary | |
|---|---|
static TregexPatternCompiler |
defaultCompiler
|
| Constructor Summary | |
|---|---|
TregexPatternCompiler()
|
|
TregexPatternCompiler(Function<java.lang.String,java.lang.String> basicCatFunction)
A compiler that uses this basicCatFunction and the default HeadFinder. |
|
TregexPatternCompiler(HeadFinder headFinder)
A compiler that uses this HeadFinder and the default basicCategoryFunction |
|
TregexPatternCompiler(HeadFinder headFinder,
Function<java.lang.String,java.lang.String> basicCatFunction)
A compiler that uses this HeadFinder and this basicCategoryFunction |
|
| Method Summary | |
|---|---|
void |
addMacro(java.lang.String original,
java.lang.String replacement)
|
TregexPattern |
compile(java.lang.String tregex)
Create a TregexPattern from this tregex string using the headFinder and basicCat function this TregexPatternCompiler was created with. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final TregexPatternCompiler defaultCompiler
| Constructor Detail |
|---|
public TregexPatternCompiler()
public TregexPatternCompiler(Function<java.lang.String,java.lang.String> basicCatFunction)
basicCatFunction - the function mapping Strings to Stringspublic TregexPatternCompiler(HeadFinder headFinder)
headFinder - the HeadFinder
public TregexPatternCompiler(HeadFinder headFinder,
Function<java.lang.String,java.lang.String> basicCatFunction)
headFinder - the HeadFinderbasicCatFunction - The function mapping Strings to Strings| Method Detail |
|---|
public void addMacro(java.lang.String original,
java.lang.String replacement)
public TregexPattern compile(java.lang.String tregex)
tregex - The pattern to parse
TregexParseException - If the expression is syntactically invalid
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||