compass.extraction.wind.ordinance.WindPermittedUseDistrictsTextExtractor#

class WindPermittedUseDistrictsTextExtractor(llm_caller)[source]#

Bases: BaseTextExtractor

Extract succinct ordinance text from input

Purpose:

Extract relevant ordinance text from document.

Responsibilities:
  1. Extract portions from chunked document text relevant to particular ordinance type (e.g. wind zoning for utility-scale systems).

Key Relationships:

Uses a StructuredLLMCaller for LLM queries.

Parameters:

llm_caller (compass.llm.LLMCaller) – LLM Caller instance used to extract ordinance info with.

Methods

extract_permitted_uses(text_chunks)

Extract permitted uses text from input text chunks

extract_wes_permitted_uses(text_chunks)

Extract permitted uses text for large WES from input text

Attributes

PERMITTED_USES_FILTER_PROMPT

SYSTEM_MESSAGE

WES_PERMITTED_USES_FILTER_PROMPT

parsers

Iterable of parsers provided by this extractor

async extract_permitted_uses(text_chunks)[source]#

Extract permitted uses text from input text chunks

Parameters:

text_chunks (list of str) – List of strings, each of which represent a chunk of text. The order of the strings should be the order of the text chunks.

Returns:

str – Ordinance text extracted from text chunks.

async extract_wes_permitted_uses(text_chunks)[source]#

Extract permitted uses text for large WES from input text

Parameters:

text_chunks (list of str) – List of strings, each of which represent a chunk of text. The order of the strings should be the order of the text chunks.

Returns:

str – Ordinance text extracted from text chunks.

property parsers#

Iterable of parsers provided by this extractor

Yields:
  • name (str) – Name describing the type of text output by the parser.

  • parser – Parser that takes a text_chunks input and outputs parsed text.