elm.ords.extraction.ngrams

ELM Ordinance ngram text validation

This check helps validate that the LLM extracted text from the original document and did not make it up itself.

Functions

convert_text_to_sentence_ngrams(text, n)

Convert input text to a list of ngrams.

sentence_ngram_containment(original, test, n)

Fraction of sentence ngrams from the test text found in the original.