Feature Request: Pass custom values from Matcher pattern definitions to matched tokens #13519
apodgorny
started this conversation in
New Features & Project Ideas
Replies: 4 comments
-
👍🏿 |
Beta Was this translation helpful? Give feedback.
0 replies
-
I support, very important function. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Great feature! Looking forward to using it. Thanks |
Beta Was this translation helpful? Give feedback.
0 replies
-
Much needed feature |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Consider a case where I need to tag FAX and TEL separately.
I currently have two options for NER with Matcher:
[{'LOWER': 'tel'}, {'ORTH': ':'}, {PATTERN_TO_MATCH_PHONE}]
[{PATTERN_TO_MATCH_PHONE}]
Neither case accomplishes the goal
SOLUTION:
These custom values should be passed into tokens matched by call:
matches = matcher(doc)
, to be able to distinguish between them based on pattern that matched like sodoc[n]._.exclude == True
This would covers multiple cases that were previously hard or impossible to solve with SpaCy matcher:
Thank you for awesome library – this addition would make it awesome-awesome :)
P.S. Extra credit :)
If we could do
matches[n].tokens
it would be triple awesomeBeta Was this translation helpful? Give feedback.
All reactions