fixed issue with converting instead of reverting spelling
This commit is contained in:
parent
c945d91d64
commit
6f57ee43a4
|
@ -11,9 +11,9 @@ import sanitizePashto from "./sanitize-pashto";
|
|||
import fillerWords from "./filler-words";
|
||||
import {
|
||||
Types as T,
|
||||
convertSpelling,
|
||||
simplifyPhonetics,
|
||||
typePredicates as tp,
|
||||
revertSpelling,
|
||||
} from "@lingdocs/pashto-inflector";
|
||||
import { isPashtoScript } from "./is-pashto";
|
||||
import { fuzzifyPashto } from "./fuzzify-pashto/fuzzify-pashto";
|
||||
|
@ -447,7 +447,7 @@ export const dictionary: DictionaryAPI = {
|
|||
initialize: async () => await dictDb.initialize(),
|
||||
update: async (notifyUpdateComing: () => void) => await dictDb.updateDictionary(notifyUpdateComing),
|
||||
search: function(state: State): T.DictionaryEntry[] {
|
||||
const searchString = convertSpelling(
|
||||
const searchString = revertSpelling(
|
||||
state.searchValue,
|
||||
getTextOptions(state).spelling,
|
||||
);
|
||||
|
|
|
@ -36,6 +36,7 @@ const dSounds = "[د|ډ]";
|
|||
const rSounds = "[ر|ړ|ڼ]";
|
||||
const nSounds = "[ن|ڼ]";
|
||||
const hKhSounds = "[خ|ح|ښ|ه]";
|
||||
const alef = "[آ|ا]";
|
||||
|
||||
const pReplacer = {
|
||||
"ی": fiveYeys,
|
||||
|
@ -73,6 +74,9 @@ const pReplacer = {
|
|||
"ح": hKhSounds,
|
||||
"ښ": hKhSounds,
|
||||
"ه": hKhSounds,
|
||||
|
||||
"ا": alef,
|
||||
"آ": alef,
|
||||
};
|
||||
|
||||
const fiveYeysF = "(?:eyy|ey|ee|e|uy)";
|
||||
|
|
Loading…
Reference in New Issue