Skip to content
Snippets Groups Projects
Commit 51d0cbe6 authored by Paolo.Brasolin's avatar Paolo.Brasolin
Browse files

feat: #fe make matching case sensitive

parent 4588b749
No related branches found
No related tags found
No related merge requests found
......@@ -281,9 +281,10 @@ export default class FightScene extends Phaser.Scene {
};
if (this.foes.length < 1) return result;
this.foes.forEach((foe) => {
// TODO: accept case insensitive match w/ penalty?
const similarity = levenshtein(
transcription.toLowerCase(),
foe.beWord.ocr_transcript.toLowerCase(),
transcription,
foe.beWord.ocr_transcript,
).similarity;
if (similarity < result.score) return;
result = { score: similarity, match: foe };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment