public class PatternCollection extends Object
| Modifier and Type | Field and Description |
|---|---|
Vector |
patternNames |
Hashtable |
patterns |
Vector |
patternSetNames |
Hashtable |
patternSets |
| Constructor and Description |
|---|
PatternCollection()
creates an empty PatternCollection
|
| Modifier and Type | Method and Description |
|---|---|
void |
apply(String patternSetName,
Document doc)
applies the rules in the named PatternSet to the document.
|
void |
apply(String patternSetName,
Document doc,
Span span)
applies the rules in the named PatternSet to the specified span.
|
PatternElement |
dereference(String patternName)
returns pattern named patternName, or null if no
such pattern exists (alias for getPattern)
|
PatternElement |
getPattern(String patternName)
returns pattern named patternName, or null if no
such pattern exists
|
PatternSet |
getPatternSet(String patternSetName)
returns pattern set named patternSetName, or null if no
such pattern set exists
|
void |
makePatternGraph()
converts the set of rules in all pattern sets of this pattern
collection into pattern graphs.
|
void |
readPatternCollection(Reader reader)
reads a file of pattern statements using reader and
builds (or augments) a PatternCollection in the form of
patterns and rules.
|
public Hashtable patterns
public Hashtable patternSets
public Vector patternNames
public Vector patternSetNames
public void readPatternCollection(Reader reader) throws IOException
IOExceptionpublic PatternElement getPattern(String patternName)
public PatternElement dereference(String patternName)
public PatternSet getPatternSet(String patternSetName)
public void makePatternGraph()
public void apply(String patternSetName, Document doc)
Copyright © 2016 New York University. All rights reserved.