better fuzzy
This commit is contained in:
parent
0b9cd681f6
commit
f3c9e5452f
|
@ -109,6 +109,7 @@ const defaultLatinInfo: IDefaultInfoBlock = {
|
||||||
["taamul", "tahamul"],
|
["taamul", "tahamul"],
|
||||||
["otsedul", "osedul"],
|
["otsedul", "osedul"],
|
||||||
["ghaara", "ghaaRa"],
|
["ghaara", "ghaaRa"],
|
||||||
|
["maafiat", "maafiyat"],
|
||||||
],
|
],
|
||||||
nonMatches: [
|
nonMatches: [
|
||||||
["kor", "por"],
|
["kor", "por"],
|
||||||
|
|
|
@ -64,8 +64,8 @@ function prepareMainRegexLogicLatin(sanitizedInput: string, options: IFuzzifyOpt
|
||||||
}
|
}
|
||||||
// TODO: Should we allow ignorable letters as we do with the Pashto script?
|
// TODO: Should we allow ignorable letters as we do with the Pashto script?
|
||||||
return options.simplifiedLatin
|
return options.simplifiedLatin
|
||||||
? section
|
? `${section}y?`
|
||||||
: `${section}[’|'|\`]?${options.allowSpacesInWords ? " ?" : ""}`;
|
: `${section}[’|'|\`|y]?${options.allowSpacesInWords ? " ?" : ""}`;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,6 +145,5 @@ export function fuzzifyPashto(input: string, options: IFuzzifyOptions = {}): str
|
||||||
}
|
}
|
||||||
const beginning = prepareBeginning(options);
|
const beginning = prepareBeginning(options);
|
||||||
const ending = prepareEnding(options);
|
const ending = prepareEnding(options);
|
||||||
const logic = `${beginning}${mainRegexLogic}${ending}`;
|
return `${beginning}${mainRegexLogic}${ending}`;
|
||||||
return logic;
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue