compass.extraction.wind.ordinance.WindHeuristic#
- class WindHeuristic[source]#
Bases:
Heuristic
Perform a heuristic check for mention of wind turbines in text
Methods
check
(text[, match_count_threshold])Check for mention of a tech in text
Attributes
GOOD_TECH_ACRONYMS
GOOD_TECH_KEYWORDS
GOOD_TECH_PHRASES
NOT_TECH_WORDS
- check(text, match_count_threshold=1)#
Check for mention of a tech in text
This check first strips the text of any tech “look-alike” words (e.g. “window”, “windshield”, etc for “wind” technology). Then, it checks for particular keywords, acronyms, and phrases that pertain to the tech in the text. If enough keywords are mentions (as dictated by match_count_threshold), this check returns
True
.- Parameters:
- Returns:
bool
–True
if the number of keywords/acronyms/phrases detected exceeds the match_count_threshold.