elm.ords.extraction.ordinance.OrdinanceExtractor

class OrdinanceExtractor(llm_caller)[source]

Bases: object

Extract succinct ordinance text from input

Parameters:

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

Methods

check_for_correct_size(text_chunks)

Extract ordinance text from input text chunks for large WES.

check_for_restrictions(text_chunks)

Extract restriction ordinance text from input text chunks.

Attributes

MODEL_INSTRUCTIONS_RESTRICTIONS

MODEL_INSTRUCTIONS_SIZE

SYSTEM_MESSAGE

async check_for_restrictions(text_chunks)[source]

Extract restriction ordinance 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 check_for_correct_size(text_chunks)[source]

Extract ordinance text from input text chunks for large WES.

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.