compass.utilities.parsing#

COMPASS Ordinances parsing utilities.

Functions

clean_backticks_from_llm_response(content)

Remove markdown-style backticks from an LLM response

extract_ord_year_from_doc_attrs(doc_attrs)

Extract year corresponding to the ordinance from doc instance

llm_response_as_json(content)

LLM response to JSON

merge_overlapping_texts(text_chunks[, n])

Merge chunks of text by removing any overlap.

num_ordinances_dataframe(data)

Count number of ordinances found in DataFrame

num_ordinances_in_doc(doc)

Count number of ordinances found in document