I want to mine detected and recognised lines of text from two images in order to compare…
- User
I want to mine detected and recognised lines of text from two images in order to compare them, but sometimes detection can be a bit different. Words can be missing from one text or the other, so if, despite that, lines are matched, I need to be able to eliminate words that aren't part of the pair.
I was thinking I could do this with levenshtein edit ops alignment, but there are circumstances where this isn't helpful, for example comparing "hello!" to "hi, hello" can result in the first h's being aligned, even though the first h in the the first string actually belongs further down.
I don't entirely trust optimal string alignment either, because it can hurt the ability for missing strings to be aligned at all. I just want to be able to ensure I can align two strings where the alignment of characters results in the smallest possible seperation of characters within strings (i.e. large edit distances are attribute to missing sequences on either side, rather than missing sequences in the middle - but missing sequences in the middle need to be possible in the case of multiple characters being predicted instead of one, for example)
How can I do this?
Assistant
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.