infineac.process_text.keyword_threshold_search_include_mod#

infineac.process_text.keyword_threshold_search_include_mod(string: str, keywords: list[str] = [], modifier_words: list[str] = ['disregarding', 'except', 'excluding', 'ignoring', 'leaving out', 'not including', 'omitting']) bool[source]#

Checks if a string contains one of the keywords and contains a modifier_word preceding the keyword. Used to obtain the sentences, that are filtered out by keyword_search_exclude_threshold().

Parameters:
  • string (str) – The string to be searched.

  • keywords (list[str], default: []) – List of keywords to be searched for in the text and to extract the

  • modifier_words (list[str], default: MODIFIER_WORDS) – List of modifier_words, which must precede the keyword.

Returns:

True if the text contains a keyword and a modifier word preceding it. False otherwise.

Return type:

bool