I am given text span ranges (start and stop) for a specific paragraph from two separate APIs. One API has the spans as defined by a human while the other is defined by a machine. I essentially need to compare these spans and highlight them based on the outcome.
What makes it even more complicated is there are also two different span types that need to be identified as well. Lets call this category1 vs category2. The possible outcomes are:
- Positive category1: spans from both APIs match
- False positive category1: the machine defined a span that the human didn't
- False negative category1: the human defined a span that the machine didn't
- Positive category2: spans from both APIs match
- False positive category2: the machine defined a span that the human didn't
- False negative category2: the human defined a span that the machine didn't
Section1 = Category1 and Section2 = Category2 in the images below
Below is what I have done so far but was wondering if there is a clearer, more understandable way to do this. This is for internal use of my team so I don't really need to worry about accessibility.