better fuzzy
This commit is contained in:
parent
0b9cd681f6
commit
f3c9e5452f
|
@ -109,6 +109,7 @@ const defaultLatinInfo: IDefaultInfoBlock = {
|
|||
["taamul", "tahamul"],
|
||||
["otsedul", "osedul"],
|
||||
["ghaara", "ghaaRa"],
|
||||
["maafiat", "maafiyat"],
|
||||
],
|
||||
nonMatches: [
|
||||
["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?
|
||||
return options.simplifiedLatin
|
||||
? section
|
||||
: `${section}[’|'|\`]?${options.allowSpacesInWords ? " ?" : ""}`;
|
||||
? `${section}y?`
|
||||
: `${section}[’|'|\`|y]?${options.allowSpacesInWords ? " ?" : ""}`;
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -145,6 +145,5 @@ export function fuzzifyPashto(input: string, options: IFuzzifyOptions = {}): str
|
|||
}
|
||||
const beginning = prepareBeginning(options);
|
||||
const ending = prepareEnding(options);
|
||||
const logic = `${beginning}${mainRegexLogic}${ending}`;
|
||||
return logic;
|
||||
return `${beginning}${mainRegexLogic}${ending}`;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue