You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
KrPassportRecognizer is the only Korean recognizer missing from default_recognizers.yaml, and two inconsistencies with its sibling Korean recognizers keep it out of the predefined registry:
Constructor signature. The YAML loader (RecognizerListLoader.get) instantiates every predefined recognizer with a name keyword argument, but KrPassportRecognizer.__init__ does not accept name. Adding the recognizer to default_recognizers.yaml therefore raises TypeError: __init__() got an unexpected keyword argument 'name'. KrRrnRecognizer, KrBrnRecognizer, KrFrnRecognizer and KrDriverLicenseRecognizer all already accept name.
Add KrPassportRecognizer to default_recognizers.yaml → TypeError: __init__() got an unexpected keyword argument 'name' when the registry loads.
Instantiate KrPassportRecognizer() with defaults and run analysis with language="ko" → the recognizer is silently skipped because it registered under kr.
Expected behavior
KrPassportRecognizer accepts a name keyword argument like the other Korean recognizers.
Its default supported_language is ko.
It is registered in default_recognizers.yaml (with enabled: false and country_code: kr, matching the other Korean recognizers).
Additional context
Fixed by #2170. Follows up on #1742 (Korean kr → ko migration) and #1814 (which added this recognizer).
Describe the bug
KrPassportRecognizeris the only Korean recognizer missing fromdefault_recognizers.yaml, and two inconsistencies with its sibling Korean recognizers keep it out of the predefined registry:RecognizerListLoader.get) instantiates every predefined recognizer with anamekeyword argument, butKrPassportRecognizer.__init__does not acceptname. Adding the recognizer todefault_recognizers.yamltherefore raisesTypeError: __init__() got an unexpected keyword argument 'name'.KrRrnRecognizer,KrBrnRecognizer,KrFrnRecognizerandKrDriverLicenseRecognizerall already acceptname.supported_languageiskr, while every other Korean recognizer defaults toko(the correct ISO 639-1 code). fix(analyzer): update Korean language code from 'kr' to 'ko' #1742 already migrated the Korean recognizers fromkrtoko, butKrPassportRecognizerwas added later in feat: Add Korean passport number recognizer (KR_PASSPORT) #1814 and reintroducedkr. As a result, anAnalyzerEnginerunningkosilently skips it.To Reproduce
KrPassportRecognizertodefault_recognizers.yaml→TypeError: __init__() got an unexpected keyword argument 'name'when the registry loads.KrPassportRecognizer()with defaults and run analysis withlanguage="ko"→ the recognizer is silently skipped because it registered underkr.Expected behavior
KrPassportRecognizeraccepts anamekeyword argument like the other Korean recognizers.supported_languageisko.default_recognizers.yaml(withenabled: falseandcountry_code: kr, matching the other Korean recognizers).Additional context
Fixed by #2170. Follows up on #1742 (Korean
kr→komigration) and #1814 (which added this recognizer).