forgot to add - to pashto simplification
This commit is contained in:
parent
bd22266cfc
commit
12c551c1e3
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "@lingdocs/pashto-inflector",
|
"name": "@lingdocs/pashto-inflector",
|
||||||
"version": "0.2.9",
|
"version": "0.3.0",
|
||||||
"author": "lingdocs.com",
|
"author": "lingdocs.com",
|
||||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||||
"homepage": "https://verbs.lingdocs.com",
|
"homepage": "https://verbs.lingdocs.com",
|
||||||
|
|
|
@ -18,6 +18,7 @@ const toTest: [string, string][] = [
|
||||||
["săr", "sar"],
|
["săr", "sar"],
|
||||||
["kawúl", "kawul"],
|
["kawúl", "kawul"],
|
||||||
["sắr", "sar"],
|
["sắr", "sar"],
|
||||||
|
["kaar-U-baar", "kaarUbaar"],
|
||||||
];
|
];
|
||||||
|
|
||||||
test("simplifyPhonetics should work", () => {
|
test("simplifyPhonetics should work", () => {
|
||||||
|
|
|
@ -16,13 +16,14 @@ const matcher = {
|
||||||
ó: "o",
|
ó: "o",
|
||||||
G: "g",
|
G: "g",
|
||||||
Ú: "U",
|
Ú: "U",
|
||||||
|
"-": "",
|
||||||
"\u0301": "",
|
"\u0301": "",
|
||||||
" ": "",
|
" ": "",
|
||||||
"'": "",
|
"'": "",
|
||||||
"`": "",
|
"`": "",
|
||||||
};
|
};
|
||||||
|
|
||||||
const fRepRegex = / |Ú|á|ă|ú|é|í|ó|G|q|'|`|\u0301/g;
|
const fRepRegex = / |Ú|á|ă|ú|é|í|ó|G|q|'|`|-|\u0301/g;
|
||||||
|
|
||||||
export function simplifyPhonetics(f: string): string {
|
export function simplifyPhonetics(f: string): string {
|
||||||
return f.replace(fRepRegex, (mtch) => {
|
return f.replace(fRepRegex, (mtch) => {
|
||||||
|
|
Loading…
Reference in New Issue