c3acdf6c12
Port the reference vocabulary and priority order into NOTE_WORDS triples. Match prefixes at word starts and words at both boundaries, normalize ñ to n after the existing accent normalization, and reject whole-word closing notes. Keep note_intervals, window_note, mask, EXCLUDED and MASKED unchanged. Ported 32 logic cases: 22 recognized texts, nine negative texts and the closing-note interval case. Did not port test_igual_que_la_libreria_eeg, as explicitly required: it imports and compares against the external eeg library rather than testing the local logic. The interval case omits the am.MODULE.version assertion because this implementation has no annotation library MODULE or corresponding version API. Internal choices: - Keep the existing next-with-default expression for first-match selection. - Use the reference ordered list and END, _pattern and PATTERNS structure, compiling one expression per state at module import. - Use Ruff's multiline formatting for the vocabulary and invented fixtures. - Adapt interval fixtures to the existing tuple input/output shapes and calculate the asserted interval end as onset plus duration. Validation from the worktree root with the main checkout's virtualenv: - ruff check models: passed. - ruff format --check models: passed, 54 files already formatted. - lint-imports: passed, two contracts kept and none broken. - pytest models/tests/test_tea_notes.py: 32 passed. - pytest test_eeg_reasons.py, test_tea_training_source.py, test_tea_job.py and test_tea_preview.py under models/tests: 24 passed, seven warnings. This regression run used flock heavy.lock and nice -n 10. - Reference vocabulary and unchanged interval/masking AST checks: passed. - git diff --check: passed. Python checks used PYTHONPATH=Core:Persistance:models:WebApi:synthetic to resolve this worktree instead of the virtualenv's editable main checkout.