Package redempt.redlex.processing
Interface TokenFilter
public interface TokenFilter
Filters Tokens to remove them from a tree
-
Method Summary
Modifier and TypeMethodDescriptionstatic TokenFilter
byName
(CullStrategy strategy, String... names) static TokenFilter
flatten()
static TokenFilter
static TokenFilter
static TokenFilter
removeUnnamed
(CullStrategy strategy)
-
Method Details
-
removeEmpty
- Returns:
- A token filter that removes all empty tokens
-
flatten
- Returns:
- A token filter that removes all tokens which are only containers, lifting their children out to flatten the tree a bit
-
removeStringLiterals
- Returns:
- A token filter that removes all string literal tokens
-
byName
- Parameters:
strategy
- The strategy to use to delete all tokens matching one of the given namesnames
- The token names to process- Returns:
- A token filter to delete tokens with the given names
-
removeUnnamed
- Parameters:
strategy
- The strategy to use to delete all tokens which are unnamed- Returns:
- A token filter to delete all unnamed tokens
-
test
-