Skip to content

Cannot add custom PatternRecognizer for language X? #1165

Answered by omri374
mitch99 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi, every recognizer can only support one language, so the only thing missing is to define the language in pnr_recognizer to support sv:

pnr_pattern = Pattern(name="pnr_pattern",regex="\d{6}(?:\d{2})?[-\s]?\d{4}", score = 0.8)
pnr_recognizer = PatternRecognizer(supported_entity="PNR", patterns=[pnr_pattern], supported_language="sv")

Please check and let us know if you still experience issues.

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@mitch99
Comment options

@dhelly
Comment options

Answer selected by mitch99
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants