compass.extraction.wind.ordinance.WindHeuristic#
- class WindHeuristic[source]#
Bases:
HeuristicPerform 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
Acronyms for WECS that we want to capture
Words that indicate we should keep a chunk for analysis
Phrases that indicate text is about WECS
Words and phrases that indicate text is NOT about WECS
- NOT_TECH_WORDS = ['micro wecs', 'small wecs', 'mini wecs', 'private wecs', 'personal wecs', 'pwecs', 'rewind', 'small wind', 'micro wind', 'mini wind', 'private wind', 'personal wind', 'swecs', 'windbreak', 'windiest', 'winds', 'windshield', 'window', 'windy', 'wind attribute', 'wind blow', 'wind break', 'wind current', 'wind damage', 'wind data', 'wind direction', 'wind draft', 'wind erosion', 'wind energy resource atlas', 'wind load', 'wind movement', 'wind orient', 'wind resource', 'wind runway', 'prevailing wind', 'downwind']#
Words and phrases that indicate text is NOT about WECS
- GOOD_TECH_KEYWORDS = ['wind', 'setback']#
Words that indicate we should keep a chunk for analysis
- GOOD_TECH_ACRONYMS = ['wecs', 'wes', 'lwet', 'uwet', 'wef']#
Acronyms for WECS that we want to capture
- GOOD_TECH_PHRASES = ['wind energy conversion', 'wind turbine', 'wind tower', 'wind farm', 'wind energy system', 'wind energy farm', 'utility wind energy system']#
Phrases that indicate text is about WECS
- 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–Trueif the number of keywords/acronyms/phrases detected exceeds the match_count_threshold.