# Changelog ## 3.12.1 - Treat an apostrophe as ending a word, so elided articles match when they attach directly to the next word: "nell'ingresso" (it), "l'entrée" (fr), "l'aigua" (ca) ([#281](https://github.com/OHF-Voice/hassil/pull/281)) - Sentence templates put a literal space after the article, which previously made the spaced form the only one that matched ([OHF-Voice/intents#4183](https://github.com/OHF-Voice/intents/issues/4183)) - Normalize text before removing punctuation when matching, so a typographic apostrophe at the end of a word ("nell’ ingresso") folds to the ASCII form templates use instead of being stripped ([#282](https://github.com/OHF-Voice/hassil/pull/282)) - Strip em/en dashes, horizontal bars, and ellipses from the start/end of words and input text, so a transcript like "we are going to bed—" still matches ([home-assistant/core#181789](https://github.com/home-assistant/core/issues/181789)) - The ASCII hyphen and minus sign are unaffected: they appear inside words and in front of negative numbers ## 3.12.0 - Replace the regex sentence pre-filter with a filter on the literal text a template requires - Sound: only skips templates that provably cannot match, so it needs no "nothing matched, try everything" fallback and works with `allow_unmatched_entities` - The old filter could drop templates that *would* have matched (inputs using `-`/`_`, or a skip word that is part of a template), which is why several languages disabled it - `filter_with_regex` is now parsed but ignored, and `Sentence.compile` is no longer used - Index `TextSlotList` values in a prefix trie so matching no longer scales with the number of values - Skip the break-words fallback when the text contains no `-` or `_` - Report `text_span` in original text coordinates instead of the punctuation/skip-word-stripped text used for matching, and stop including a wildcard's trailing whitespace - Ignore `TextSlotList` values with empty input text, which previously matched at any position and produced an entity with no text - Fix multi-digit numbers being truncated when a range list follows an open wildcard (`INTEGER_ANYWHERE` only matched one digit) - Fix an open wildcard accumulating text from other candidates when a range list matched several number words - Fix `words_match` never being set, which reported a matched number word as an unmatched entity - `Expression` is no longer an `ABC`, which makes `isinstance` dispatch in the matcher considerably faster ## 3.11.0 - Only strip whitespace between CJK characters when `ignore_whitespace` is set, preserving spaces in non-CJK wildcard captures such as `Taylor Swift` ([#276](https://github.com/OHF-Voice/hassil/issues/276)) - Break ties in `recognize_best` with intent name ## 3.10.0 - Add `filter_intents` to scope an `Intents` object to available domains/supported intents ## 3.9.0 - Remove ngram fuzzy matcher ## 3.8.2 - Fix text span with range numbers ## 3.8.1 - Fix trailing initialisms ## 3.8.0 - Cache regex in match utils - Break ties in `recognize_best` in favor of list values versus wildcards ## 3.7.0 - Try text without skip words removed first ## 3.6.0 - Add inline range lists (`{start..stop,[step]:slot_name}`) - Don't remove skip words from start if sentence starts with a wildcard - Don't remove skip words from end if sentence ends with a wildcard - Don't remove skip words at all if the entire sentence is a wildcard ## 3.5.0 - Add `text_span` to matched entities so they can be mapped back to the original input text - Bump dev dependencies - Add intent name to initial FST arcs ## 3.4.1 - Ignore case when matching number words ## 3.4.0 - Filter intent slot combinations using context area - Fall back to language family for number words ## 3.3.0 - Add context area to fuzzy matcher ## 3.2.1 - Normalize apostrophe `’` to `'` ## 3.2.0 - Add capture syntax (`{list_name:@capture_name}` and `{@list_name}`) - Only available in responses, not entities/slots - `{@list_name}` is the same as `{list_name:@list_name}` - Close sqlite3 connection in fuzzy matching ## 3.1.0 - Add fuzzy n-gram matcher (beta) - Add word boundary option to trie ## 3.0.1 - Use faster permutation iteration ## 3.0.0 - Rename `Sequence` to `Group` - Remove `SequenceType` and instead of types for each `Group`: - `Sequence` for `(a b c)` - `Alternative` for `(a|b|c)` - `Permutation` for `(a;b;c)` - `Sentence` now contains an `expression` field with the parsed expression - `Permutation` is represented explicitly instead of being expanded internally into an alternative - Everything used by downstream projects has been moved into a top-level import (`from hassil import Intents`). The internal structure of of hassil (e.g., `hassil.intents` or `hassil.util`) should be expected to change. - Drop support for Python 3.8 (EOL October 7, 2024) ## 2.2.3 - Fix behavior with wildcards inside and outside words ## 2.2.2 - Allow "," as a decimal separator for fractional ranges ## 2.2.1 - Allow list values with "in" but no "out" ## 2.2.0 - Add "fractions" to number ranges with halves and tenths - Don't remove punctuation within words in `text_clean` (e.g., "2.5") ## 2.1.1 - Allow number ranges to have the same start/stop (single number) ## 2.1.0 - Upgrade to `unicode-rbnf` 2.2 - Transition to pyproject.toml ## 2.0.4 - Trie values are accumulated on `insert` instead of being overwritten ## 2.0.3 - Make trie more restrictive (`two` will not match `t|wo`) ## 2.0.2 - Require `unicode-rbnf>=2.1` which includes important bugfixes ## 2.0.1 - Count stripped text in `text_chunks_matched` ## 2.0.0 - Allow wildcards to be followed by expansion rules and lists - Use regular expressions to filter sentence templates - Add `filter_with_regex` to intent settings and intent data (`false` disables regex filtering) - Filter text slot list values by required/excluded context during matching - Use a trie to filter range slot list values based on remaining text to be matched - Add `required_keywords` section to intent data to skip sentences without specific keywords - Preserve case during matching - Strip punctuation before text processing - Remove extraneous whitespace from the end of wildcards - Refactor string matching code into `string_matcher.py` ## 1.8.0 - Bump `unicode-rbnf` to 2.0.0 - Use multiple texts for numbers, e.g. for German 1 `ein`, `eins`, etc. - Remove `words_ruleset` for ranges ## 1.7.4 - Loosen `unicode-rbnf` version ## 1.7.3 - Cache number words ## 1.7.2 - Add apostrophe to punctuation list ## 1.7.1 - Fix `is_wildcard` in match entities - Fix `wildcard_text` initialization - Bump pylint to 3.1.0 ## 1.7.0 - Add multiplier to range ## 1.6.1 - Allow context values to be dicts ## 1.6.0 - Add metadata to sentences - Add metadata to list items ## 1.5.3 - Restrict unmatched entities to contiguous blocks of non-literal text - Automatically use intents language for number words if supported ## 1.5.2 - Add local slots (under data sentences) - Add literal text chunk count and matched sentence template to results ## 1.5.1 - Expand `requires_context` to allow copying value to a slot ## 1.5.0 - Add fuzzy matching using edit distance ## 1.4.0 - Sort wildcard sentences so they are processed by most literal text chunks first ## 1.3.0 - Add number to word generation using [unicode-rbnf](https://github.com/rhasspy/unicode-rbnf) for range lists ## 1.2.5 - Fix degenerate wildcard case