Skip to main content
Version: 0.93

templates.KeywordContextTemplateSchema

class templates.KeywordContextTemplateSchema(*args, **kwargs)

Keyword Context template

Label data points if a pattern appears within the specified proximity of the other pattern in a specific data field.

Parameters:
  • field (str) – Field

  • regex_pattern_1 (str) – Regex pattern

  • regex_pattern_2 (str) – Other regex pattern

  • window_size (int) – Window size

  • window_unit ({"CHARACTERS", "WORDS"}) – Window unit

  • match_direction ({"left", "right", "left or right"}) – Match direction

  • case_sensitive (bool, default False) – Case sensitive or not

  • tokenize (bool, default True) – Tokenize or not

  • regex (bool, default True) – If True, patterns are treated as regex