|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.stanford.nlp.util.ArrayStringFilter
public class ArrayStringFilter
Filters Strings based on whether they exactly match any string in the array it is initially onstructed with. Saves some time over using regexes if the array of strings is small enough. No specific experiments exist for how long the array can be before performance is worse than a regex, but the English dependencies code was helped by replacing disjunction regexes of 6 words or fewer with this.
Constructor Summary | |
---|---|
ArrayStringFilter(java.lang.String... words)
|
Method Summary | |
---|---|
boolean |
accept(java.lang.String input)
Checks if the given object passes the filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ArrayStringFilter(java.lang.String... words)
Method Detail |
---|
public boolean accept(java.lang.String input)
Filter
accept
in interface Filter<java.lang.String>
input
- an object to test
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |