Skip to content

KrPassportRecognizer is missing from the predefined registry and defaults to wrong language code 'kr' #2176

Description

@developer0hye

Describe the bug

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.
  • Default language. Its default supported_language is kr, while every other Korean recognizer defaults to ko (the correct ISO 639-1 code). fix(analyzer): update Korean language code from 'kr' to 'ko' #1742 already migrated the Korean recognizers from kr to ko, but KrPassportRecognizer was added later in feat: Add Korean passport number recognizer (KR_PASSPORT) #1814 and reintroduced kr. As a result, an AnalyzerEngine running ko silently skips it.

To Reproduce

  1. Add KrPassportRecognizer to default_recognizers.yamlTypeError: __init__() got an unexpected keyword argument 'name' when the registry loads.
  2. 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 krko migration) and #1814 (which added this recognizer).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions