The NER outputs ('results') are nested while I need it to be normal #1124
Unanswered
Ahmed-Mortadi
asked this question in
Q&A
Replies: 1 comment
-
Hi, this is by design in the analyzer. In the anonymizer, there is some logic for overlaps resolution. Please see this sample for more info: https://microsoft.github.io/presidio/samples/python/getting_entity_values/ |
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
-
This is an example of two elements from the 'results' (the output returned by the analyzer):
output A (current output):
type: ID, start: 31, end: 39, score: 0.9
type: DATE_TIME, start: 35, end: 53, score: 0.85
As may be obvious the first one is overlapping with the second ..
Is there any built-in function(s) in the framework to provide me an output like this:
output B (needed output):
type: ID, start: 31, end: 39, score: 0.9
type: DATE_TIME, start: 40, end: 53, score: 0.85
needed output explanation:
The start of the second result became forward (from 35 in (output A) to 40 in (output B)), as the score of the second result is higher than the score of the first result .. so the boundaries of the second result are chosen to be adjusted!.
Beta Was this translation helpful? Give feedback.
All reactions