EnvironmentFilter¶
- class corpustools.corpus.classes.lexicon.EnvironmentFilter(middle_segments, lhs=None, rhs=None, zeroPositions=None)[source]¶
Filter to use for searching words to generate Environments that match
- Parameters
- middle_segmentsset
Set of segments to center environments
- lhslist, optional
List of set of segments on the left of the middle
- rhslist, optional
List of set of segments on the right of the middle
Methods
__init__
(middle_segments[, lhs, rhs, ...])compile_re_pattern
()generate_regular_expression
()is_applicable
(sequence)Check whether the Environment filter is applicable to the sequence (i.e., the sequence must be greater or equal in length to the EnvironmentFilter)
lhs_count
()Get the number of elements on the left hand side
rhs_count
()Get the number of elements on the right hand side
set_lhs
(lhs)set_rhs
(rhs)without_zero_positions
()without_zeroes_contains
(sequence)