compass.extraction.common#

Common ordinance extraction components

Functions

empty_output(feature)

Empty output for a feature (not found in text)

found_ord(messages)

Check messages from the base graph to see if ordinance was found

llm_response_does_not_start_with_no(response)

Check if LLM response does not start with "no" (case-insensitive)

llm_response_starts_with_no(response)

Check if LLM response begins with "no" (case-insensitive)

llm_response_starts_with_yes(response)

Check if LLM response begins with "yes" (case-insensitive)

run_async_tree(tree[, response_as_json])

Run Async Decision Tree and return output as dict

run_async_tree_with_bm(tree, base_messages)

Run Async Decision Tree from base messages; return dict output

setup_async_decision_tree(graph_setup_func, ...)

Setup Async Decision tree for ordinance extraction

setup_base_setback_graph(**kwargs)

Setup graph to get setback ordinance text for a given feature

setup_graph_extra_restriction([is_numerical])

Setup Graph to extract non-setback ordinance values from text

setup_graph_no_nodes(**kwargs)

Setup a graph with no nodes

setup_graph_permitted_use_districts(**kwargs)

Setup graph to extract permitted use districts for technology

setup_participating_owner(**kwargs)

Setup graph to check for "participating" setbacks for a feature

Classes

BaseTextExtractor(llm_caller)

Base implementation for a text extractor