Download tests/test_parser.py from yahyoha/omnidiag: direct link, hf CLI and curl.
- Browser
- Download file 756 Bytes
-
https://huggingface.co/spaces/yahyoha/omnidiag/resolve/main/tests/test_parser.py
- Command line
-
hf download hf://spaces/yahyoha/omnidiag/tests/test_parser.py
-
curl -L -o test_parser.py https://huggingface.co/spaces/yahyoha/omnidiag/resolve/main/tests/test_parser.py
756 Bytes
| """Age extraction: the spaCy matcher must not mistake a duration for an age.""" | |
| import pytest | |
| from backend.nlp.notes_parser import parse_clinical_note | |
| def test_age_extracted(note, age): | |
| assert parse_clinical_note(note, use_bert=False)["age"] == age | |
| def test_no_age_invented(note): | |
| assert "age" not in parse_clinical_note(note, use_bert=False) | |