-
-
Notifications
You must be signed in to change notification settings - Fork 16
Open
Description
Hi,
Is there any way/trick to know the length matched by the text used to match on it?
For example when you construct a prefix DFA, try to make it match with a text, the dfa gives you the edit distance but you do not know the exact length that this text "covers" on the original text.
let query = "Levente";
// ^ missing "sh"
let max_dist = 3;
let dfa = Dfa::new_prefix(query, max_dist);
let text = "Levenshtein";
let dist = dfa.eval(text);
assert_eq!(dist, 2);Here we can easily retrieve the edit distance but we would also like to know that this text covers 9 characters (i.e. "Levenshte") and not the text length 6 (i.e. "Levente").
Something I though about was to count the number of insertions and deletions, but the DFA doesn't stores that, didn't it?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels