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

Acronyms for WECS that we want to capture

GOOD_TECH_KEYWORDS

Words that indicate we should keep a chunk for analysis

GOOD_TECH_PHRASES

Phrases that indicate text is about WECS

NOT_TECH_WORDS

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:
  • text (str) – Input text that may or may not mention the technology of interest.

  • match_count_threshold (int, optional) – Number of keywords that must match for the text to pass this heuristic check. Count must be strictly greater than this value. By default, 1.

Returns:

boolTrue if the number of keywords/acronyms/phrases detected exceeds the match_count_threshold.