Skip to content

Commit 59a7f1e

Browse files
committed
docs: fix context_matching_mode param name and country-dir exceptions
Address Copilot review feedback: - LemmaContextAwareEnhancer's constructor parameter is context_matching_mode, not matching_mode. - The country_specific directory already contains a thai/ directory (and korea/), so 'only us and uk are exceptions' contradicted the layout. Reworded to describe the convention for new directories without blessing the pre-existing short forms. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013ck825cANTDYre5UCfmpYE
1 parent f594c3d commit 59a7f1e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

.github/copilot-instructions.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ class MyRemoteRecognizer(RemoteRecognizer):
6060
- NLP/ML-based: `.../predefined_recognizers/nlp_engine_recognizers/` or `.../ner/`
6161
- Third-party: `.../predefined_recognizers/third_party/`
6262

63-
Directory names are the full lowercase country name (`south_africa`, `philippines`,
64-
`canada`), not the ISO country code. The only exceptions are the pre-existing `us`
65-
and `uk` directories. Do not add new abbreviated directories.
63+
Directory names should be the full lowercase country name (`south_africa`,
64+
`philippines`, `canada`), not the ISO country code. Some pre-existing directories
65+
predate this convention and use an abbreviation or short form (`us`, `uk`, `thai`);
66+
do not follow them. Do not add new abbreviated directories.
6667

6768
Language codes are different: `supported_language` and the YAML `supported_languages`
6869
key take ISO 639-1 language codes (`ko` for Korean), not country codes (`kr`). A
@@ -105,7 +106,7 @@ cannot fire without context: `presidio-structured` counts matches per column and
105106
no surrounding context to work with.
106107

107108
**Context words are matched as substrings.** `LemmaContextAwareEnhancer` defaults to
108-
`matching_mode="substring"`, so short context words fire on unrelated tokens.
109+
`context_matching_mode="substring"`, so short context words fire on unrelated tokens.
109110

110111
```python
111112
# ❌ BAD: "member" matches "remember", "auth" matches "author" and "OAuth",

0 commit comments

Comments
 (0)