Compare commits
4 Commits
ef120b13aa
...
c9f369de09
Author | SHA1 | Date |
---|---|---|
adueck | c9f369de09 | |
adueck | 99438d26dd | |
adueck | 5190cf2adb | |
adueck | 17fd8a4d05 |
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "pashto-inflector",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "pashto-inflector",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"hasInstallScript": true,
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "pashto-inflector",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"author": "lingdocs.com",
|
||||
"description": "A Pashto inflection and verb conjugation engine, inculding React components for displaying Pashto text, inflections, and conjugations",
|
||||
"homepage": "https://verbs.lingdocs.com",
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "@lingdocs/ps-react",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@lingdocs/ps-react",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"@formkit/auto-animate": "^1.0.0-beta.3",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/ps-react",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"description": "Pashto inflector library module with React components",
|
||||
"main": "dist/components/library.js",
|
||||
"module": "dist/components/library.js",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@lingdocs/inflect",
|
||||
"version": "6.0.12",
|
||||
"version": "7.0.3",
|
||||
"description": "Pashto inflector library",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/lib/library.d.ts",
|
||||
|
|
|
@ -1,126 +1,151 @@
|
|||
// eslint-disable-next-line
|
||||
'use strict'; // code generated by pbf v3.2.1
|
||||
"use strict"; // code generated by pbf v3.2.1
|
||||
|
||||
// DictionaryInfo ========================================
|
||||
|
||||
var DictionaryInfo = exports.DictionaryInfo = {};
|
||||
var DictionaryInfo = (exports.DictionaryInfo = {});
|
||||
|
||||
DictionaryInfo.read = function (pbf, end) {
|
||||
return pbf.readFields(DictionaryInfo._readField, {title: "", license: "", release: 0, numberOfEntries: 0, url: "", infoUrl: ""}, end);
|
||||
return pbf.readFields(
|
||||
DictionaryInfo._readField,
|
||||
{
|
||||
title: "",
|
||||
license: "",
|
||||
release: 0,
|
||||
numberOfEntries: 0,
|
||||
url: "",
|
||||
infoUrl: "",
|
||||
},
|
||||
end
|
||||
);
|
||||
};
|
||||
DictionaryInfo._readField = function (tag, obj, pbf) {
|
||||
if (tag === 1) obj.title = pbf.readString();
|
||||
else if (tag === 2) obj.license = pbf.readString();
|
||||
else if (tag === 3) obj.release = pbf.readVarint(true);
|
||||
else if (tag === 4) obj.numberOfEntries = pbf.readVarint(true);
|
||||
else if (tag === 5) obj.url = pbf.readString();
|
||||
else if (tag === 6) obj.infoUrl = pbf.readString();
|
||||
if (tag === 1) obj.title = pbf.readString();
|
||||
else if (tag === 2) obj.license = pbf.readString();
|
||||
else if (tag === 3) obj.release = pbf.readVarint(true);
|
||||
else if (tag === 4) obj.numberOfEntries = pbf.readVarint(true);
|
||||
else if (tag === 5) obj.url = pbf.readString();
|
||||
else if (tag === 6) obj.infoUrl = pbf.readString();
|
||||
};
|
||||
DictionaryInfo.write = function (obj, pbf) {
|
||||
if (obj.title) pbf.writeStringField(1, obj.title);
|
||||
if (obj.license) pbf.writeStringField(2, obj.license);
|
||||
if (obj.release) pbf.writeVarintField(3, obj.release);
|
||||
if (obj.numberOfEntries) pbf.writeVarintField(4, obj.numberOfEntries);
|
||||
if (obj.url) pbf.writeStringField(5, obj.url);
|
||||
if (obj.infoUrl) pbf.writeStringField(6, obj.infoUrl);
|
||||
if (obj.title) pbf.writeStringField(1, obj.title);
|
||||
if (obj.license) pbf.writeStringField(2, obj.license);
|
||||
if (obj.release) pbf.writeVarintField(3, obj.release);
|
||||
if (obj.numberOfEntries) pbf.writeVarintField(4, obj.numberOfEntries);
|
||||
if (obj.url) pbf.writeStringField(5, obj.url);
|
||||
if (obj.infoUrl) pbf.writeStringField(6, obj.infoUrl);
|
||||
};
|
||||
|
||||
// Entry ========================================
|
||||
|
||||
var Entry = exports.Entry = {};
|
||||
var Entry = (exports.Entry = {});
|
||||
|
||||
Entry.read = function (pbf, end) {
|
||||
return pbf.readFields(Entry._readField, {ts: 0, i: 0, p: "", f: "", g: "", e: ""}, end);
|
||||
return pbf.readFields(
|
||||
Entry._readField,
|
||||
{ ts: 0, i: 0, p: "", f: "", g: "", e: "" },
|
||||
end
|
||||
);
|
||||
};
|
||||
Entry._readField = function (tag, obj, pbf) {
|
||||
if (tag === 1) obj.ts = pbf.readVarint(true);
|
||||
else if (tag === 2) obj.i = pbf.readVarint(true);
|
||||
else if (tag === 3) obj.p = pbf.readString();
|
||||
else if (tag === 4) obj.f = pbf.readString();
|
||||
else if (tag === 5) obj.g = pbf.readString();
|
||||
else if (tag === 6) obj.e = pbf.readString();
|
||||
else if (tag === 7) obj.r = pbf.readVarint(true);
|
||||
else if (tag === 8) obj.c = pbf.readString();
|
||||
else if (tag === 9) obj.l = pbf.readVarint(true);
|
||||
else if (tag === 10) obj.infap = pbf.readString();
|
||||
else if (tag === 11) obj.infaf = pbf.readString();
|
||||
else if (tag === 12) obj.infbp = pbf.readString();
|
||||
else if (tag === 13) obj.infbf = pbf.readString();
|
||||
else if (tag === 14) obj.noInf = pbf.readBoolean();
|
||||
else if (tag === 15) obj.app = pbf.readString();
|
||||
else if (tag === 16) obj.apf = pbf.readString();
|
||||
else if (tag === 17) obj.ppp = pbf.readString();
|
||||
else if (tag === 18) obj.ppf = pbf.readString();
|
||||
else if (tag === 19) obj.psp = pbf.readString();
|
||||
else if (tag === 20) obj.psf = pbf.readString();
|
||||
else if (tag === 21) obj.ssp = pbf.readString();
|
||||
else if (tag === 22) obj.ssf = pbf.readString();
|
||||
else if (tag === 23) obj.prp = pbf.readString();
|
||||
else if (tag === 24) obj.prf = pbf.readString();
|
||||
else if (tag === 25) obj.pprtp = pbf.readString();
|
||||
else if (tag === 26) obj.pprtf = pbf.readString();
|
||||
else if (tag === 27) obj.tppp = pbf.readString();
|
||||
else if (tag === 28) obj.tppf = pbf.readString();
|
||||
else if (tag === 29) obj.shortIntrans = pbf.readBoolean();
|
||||
else if (tag === 30) obj.noOo = pbf.readBoolean();
|
||||
else if (tag === 31) obj.sepOo = pbf.readBoolean();
|
||||
else if (tag === 32) obj.separationAtP = pbf.readVarint(true);
|
||||
else if (tag === 33) obj.separationAtF = pbf.readVarint(true);
|
||||
else if (tag === 34) obj.diacExcept = pbf.readBoolean();
|
||||
else if (tag === 35) obj.ec = pbf.readString();
|
||||
else if (tag === 36) obj.ep = pbf.readString();
|
||||
if (tag === 1) obj.ts = pbf.readVarint(true);
|
||||
else if (tag === 2) obj.i = pbf.readVarint(true);
|
||||
else if (tag === 3) obj.p = pbf.readString();
|
||||
else if (tag === 4) obj.f = pbf.readString();
|
||||
else if (tag === 5) obj.g = pbf.readString();
|
||||
else if (tag === 6) obj.e = pbf.readString();
|
||||
else if (tag === 7) obj.r = pbf.readVarint(true);
|
||||
else if (tag === 8) obj.c = pbf.readString();
|
||||
else if (tag === 9) obj.l = pbf.readVarint(true);
|
||||
else if (tag === 10) obj.infap = pbf.readString();
|
||||
else if (tag === 11) obj.infaf = pbf.readString();
|
||||
else if (tag === 12) obj.infbp = pbf.readString();
|
||||
else if (tag === 13) obj.infbf = pbf.readString();
|
||||
else if (tag === 14) obj.noInf = pbf.readBoolean();
|
||||
else if (tag === 15) obj.app = pbf.readString();
|
||||
else if (tag === 16) obj.apf = pbf.readString();
|
||||
else if (tag === 17) obj.ppp = pbf.readString();
|
||||
else if (tag === 18) obj.ppf = pbf.readString();
|
||||
else if (tag === 19) obj.psp = pbf.readString();
|
||||
else if (tag === 20) obj.psf = pbf.readString();
|
||||
else if (tag === 21) obj.ssp = pbf.readString();
|
||||
else if (tag === 22) obj.ssf = pbf.readString();
|
||||
else if (tag === 23) obj.prp = pbf.readString();
|
||||
else if (tag === 24) obj.prf = pbf.readString();
|
||||
else if (tag === 25) obj.pprtp = pbf.readString();
|
||||
else if (tag === 26) obj.pprtf = pbf.readString();
|
||||
else if (tag === 27) obj.tppp = pbf.readString();
|
||||
else if (tag === 28) obj.tppf = pbf.readString();
|
||||
else if (tag === 29) obj.shortIntrans = pbf.readBoolean();
|
||||
else if (tag === 30) obj.noOo = pbf.readBoolean();
|
||||
else if (tag === 31) obj.sepOo = pbf.readBoolean();
|
||||
else if (tag === 32) obj.separationAtP = pbf.readVarint(true);
|
||||
else if (tag === 33) obj.separationAtF = pbf.readVarint(true);
|
||||
else if (tag === 34) obj.diacExcept = pbf.readBoolean();
|
||||
else if (tag === 35) obj.ec = pbf.readString();
|
||||
else if (tag === 36) obj.ep = pbf.readString();
|
||||
else if (tag === 37) obj.a = pbf.readVarint();
|
||||
};
|
||||
Entry.write = function (obj, pbf) {
|
||||
if (obj.ts) pbf.writeVarintField(1, obj.ts);
|
||||
if (obj.i) pbf.writeVarintField(2, obj.i);
|
||||
if (obj.p) pbf.writeStringField(3, obj.p);
|
||||
if (obj.f) pbf.writeStringField(4, obj.f);
|
||||
if (obj.g) pbf.writeStringField(5, obj.g);
|
||||
if (obj.e) pbf.writeStringField(6, obj.e);
|
||||
if (obj.r) pbf.writeVarintField(7, obj.r);
|
||||
if (obj.c) pbf.writeStringField(8, obj.c);
|
||||
if (obj.l) pbf.writeVarintField(9, obj.l);
|
||||
if (obj.infap) pbf.writeStringField(10, obj.infap);
|
||||
if (obj.infaf) pbf.writeStringField(11, obj.infaf);
|
||||
if (obj.infbp) pbf.writeStringField(12, obj.infbp);
|
||||
if (obj.infbf) pbf.writeStringField(13, obj.infbf);
|
||||
if (obj.noInf) pbf.writeBooleanField(14, obj.noInf);
|
||||
if (obj.app) pbf.writeStringField(15, obj.app);
|
||||
if (obj.apf) pbf.writeStringField(16, obj.apf);
|
||||
if (obj.ppp) pbf.writeStringField(17, obj.ppp);
|
||||
if (obj.ppf) pbf.writeStringField(18, obj.ppf);
|
||||
if (obj.psp) pbf.writeStringField(19, obj.psp);
|
||||
if (obj.psf) pbf.writeStringField(20, obj.psf);
|
||||
if (obj.ssp) pbf.writeStringField(21, obj.ssp);
|
||||
if (obj.ssf) pbf.writeStringField(22, obj.ssf);
|
||||
if (obj.prp) pbf.writeStringField(23, obj.prp);
|
||||
if (obj.prf) pbf.writeStringField(24, obj.prf);
|
||||
if (obj.pprtp) pbf.writeStringField(25, obj.pprtp);
|
||||
if (obj.pprtf) pbf.writeStringField(26, obj.pprtf);
|
||||
if (obj.tppp) pbf.writeStringField(27, obj.tppp);
|
||||
if (obj.tppf) pbf.writeStringField(28, obj.tppf);
|
||||
if (obj.shortIntrans) pbf.writeBooleanField(29, obj.shortIntrans);
|
||||
if (obj.noOo) pbf.writeBooleanField(30, obj.noOo);
|
||||
if (obj.sepOo) pbf.writeBooleanField(31, obj.sepOo);
|
||||
if (obj.separationAtP) pbf.writeVarintField(32, obj.separationAtP);
|
||||
if (obj.separationAtF) pbf.writeVarintField(33, obj.separationAtF);
|
||||
if (obj.diacExcept) pbf.writeBooleanField(34, obj.diacExcept);
|
||||
if (obj.ec) pbf.writeStringField(35, obj.ec);
|
||||
if (obj.ep) pbf.writeStringField(36, obj.ep);
|
||||
if (obj.ts) pbf.writeVarintField(1, obj.ts);
|
||||
if (obj.i) pbf.writeVarintField(2, obj.i);
|
||||
if (obj.p) pbf.writeStringField(3, obj.p);
|
||||
if (obj.f) pbf.writeStringField(4, obj.f);
|
||||
if (obj.g) pbf.writeStringField(5, obj.g);
|
||||
if (obj.e) pbf.writeStringField(6, obj.e);
|
||||
if (obj.r) pbf.writeVarintField(7, obj.r);
|
||||
if (obj.c) pbf.writeStringField(8, obj.c);
|
||||
if (obj.l) pbf.writeVarintField(9, obj.l);
|
||||
if (obj.infap) pbf.writeStringField(10, obj.infap);
|
||||
if (obj.infaf) pbf.writeStringField(11, obj.infaf);
|
||||
if (obj.infbp) pbf.writeStringField(12, obj.infbp);
|
||||
if (obj.infbf) pbf.writeStringField(13, obj.infbf);
|
||||
if (obj.noInf) pbf.writeBooleanField(14, obj.noInf);
|
||||
if (obj.app) pbf.writeStringField(15, obj.app);
|
||||
if (obj.apf) pbf.writeStringField(16, obj.apf);
|
||||
if (obj.ppp) pbf.writeStringField(17, obj.ppp);
|
||||
if (obj.ppf) pbf.writeStringField(18, obj.ppf);
|
||||
if (obj.psp) pbf.writeStringField(19, obj.psp);
|
||||
if (obj.psf) pbf.writeStringField(20, obj.psf);
|
||||
if (obj.ssp) pbf.writeStringField(21, obj.ssp);
|
||||
if (obj.ssf) pbf.writeStringField(22, obj.ssf);
|
||||
if (obj.prp) pbf.writeStringField(23, obj.prp);
|
||||
if (obj.prf) pbf.writeStringField(24, obj.prf);
|
||||
if (obj.pprtp) pbf.writeStringField(25, obj.pprtp);
|
||||
if (obj.pprtf) pbf.writeStringField(26, obj.pprtf);
|
||||
if (obj.tppp) pbf.writeStringField(27, obj.tppp);
|
||||
if (obj.tppf) pbf.writeStringField(28, obj.tppf);
|
||||
if (obj.shortIntrans) pbf.writeBooleanField(29, obj.shortIntrans);
|
||||
if (obj.noOo) pbf.writeBooleanField(30, obj.noOo);
|
||||
if (obj.sepOo) pbf.writeBooleanField(31, obj.sepOo);
|
||||
if (obj.separationAtP) pbf.writeVarintField(32, obj.separationAtP);
|
||||
if (obj.separationAtF) pbf.writeVarintField(33, obj.separationAtF);
|
||||
if (obj.diacExcept) pbf.writeBooleanField(34, obj.diacExcept);
|
||||
if (obj.ec) pbf.writeStringField(35, obj.ec);
|
||||
if (obj.ep) pbf.writeStringField(36, obj.ep);
|
||||
if (obj.a) pbf.writeVarintField(37, obj.a);
|
||||
};
|
||||
|
||||
// Dictionary ========================================
|
||||
|
||||
var Dictionary = exports.Dictionary = {};
|
||||
var Dictionary = (exports.Dictionary = {});
|
||||
|
||||
Dictionary.read = function (pbf, end) {
|
||||
return pbf.readFields(Dictionary._readField, {info: null, entries: []}, end);
|
||||
return pbf.readFields(
|
||||
Dictionary._readField,
|
||||
{ info: null, entries: [] },
|
||||
end
|
||||
);
|
||||
};
|
||||
Dictionary._readField = function (tag, obj, pbf) {
|
||||
if (tag === 1) obj.info = DictionaryInfo.read(pbf, pbf.readVarint() + pbf.pos);
|
||||
else if (tag === 2) obj.entries.push(Entry.read(pbf, pbf.readVarint() + pbf.pos));
|
||||
if (tag === 1)
|
||||
obj.info = DictionaryInfo.read(pbf, pbf.readVarint() + pbf.pos);
|
||||
else if (tag === 2)
|
||||
obj.entries.push(Entry.read(pbf, pbf.readVarint() + pbf.pos));
|
||||
};
|
||||
Dictionary.write = function (obj, pbf) {
|
||||
if (obj.info) pbf.writeMessage(1, DictionaryInfo.write, obj.info);
|
||||
if (obj.entries) for (var i = 0; i < obj.entries.length; i++) pbf.writeMessage(2, Entry.write, obj.entries[i]);
|
||||
if (obj.info) pbf.writeMessage(1, DictionaryInfo.write, obj.info);
|
||||
if (obj.entries)
|
||||
for (var i = 0; i < obj.entries.length; i++)
|
||||
pbf.writeMessage(2, Entry.write, obj.entries[i]);
|
||||
};
|
||||
|
|
|
@ -46,6 +46,7 @@ message Entry {
|
|||
bool diacExcept = 34;
|
||||
string ec = 35;
|
||||
string ep = 36;
|
||||
int32 a = 37;
|
||||
}
|
||||
|
||||
message Dictionary {
|
||||
|
|
|
@ -14,7 +14,7 @@ export const kedulStat = {
|
|||
ts: 1581086654898,
|
||||
i: 11100,
|
||||
p: "کېدل",
|
||||
f: "kedul",
|
||||
f: "kedúl",
|
||||
g: "kedul",
|
||||
e: "to become _____",
|
||||
r: 2,
|
||||
|
@ -34,7 +34,7 @@ export const kedulDyn = {
|
|||
ts: 1527812754,
|
||||
i: 11101,
|
||||
p: "کېدل",
|
||||
f: "kedul",
|
||||
f: "kedúl",
|
||||
g: "kedul",
|
||||
e: "to happen, occur",
|
||||
r: 2,
|
||||
|
@ -57,7 +57,7 @@ export const kawulStat = {
|
|||
ts: 1579015359582,
|
||||
i: 11112,
|
||||
p: "کول",
|
||||
f: "kawul",
|
||||
f: "kawúl",
|
||||
g: "kawul",
|
||||
e: 'to make ____ ____ (as in "He\'s making me angry.")',
|
||||
r: 4,
|
||||
|
@ -78,7 +78,7 @@ export const kawulDyn = {
|
|||
ts: 1527812752,
|
||||
i: 11113,
|
||||
p: "کول",
|
||||
f: "kawul",
|
||||
f: "kawúl",
|
||||
g: "kawul",
|
||||
e: "to do (an action or activity)",
|
||||
r: 4,
|
||||
|
|
|
@ -117,7 +117,9 @@ export function isCompleteResult<C extends object>(
|
|||
|
||||
export function removeKeys(a: any): any {
|
||||
return JSON.parse(
|
||||
JSON.stringify(a, (k, v) => (k === "i" || k === "key" ? undefined : v))
|
||||
JSON.stringify(a, (k, v) =>
|
||||
k === "i" || k === "a" || k === "key" ? undefined : v
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,28 +1,42 @@
|
|||
import {
|
||||
writeDictionaryInfo,
|
||||
readDictionaryInfo,
|
||||
writeDictionary,
|
||||
readDictionary,
|
||||
writeDictionaryInfo,
|
||||
readDictionaryInfo,
|
||||
writeDictionary,
|
||||
readDictionary,
|
||||
} from "./protobuf";
|
||||
import * as T from "../../types";
|
||||
|
||||
const sampleDictionaryInfo: T.DictionaryInfo = {
|
||||
title: "Sample Dictionary",
|
||||
license: "none",
|
||||
url: "https://www.example.com",
|
||||
infoUrl: "https://www.example.com",
|
||||
release: 1,
|
||||
numberOfEntries: 5,
|
||||
title: "Sample Dictionary",
|
||||
license: "none",
|
||||
url: "https://www.example.com",
|
||||
infoUrl: "https://www.example.com",
|
||||
release: 1,
|
||||
numberOfEntries: 5,
|
||||
};
|
||||
|
||||
const sampleDictionary: T.Dictionary = {
|
||||
info: sampleDictionaryInfo,
|
||||
entries: [
|
||||
{"i":616,"ts":1527813108,"p":"اظهار","f":"izháar","g":"izhaar","e":"expression, statement, declaration","c":"n. m.","ec":"cool"},
|
||||
],
|
||||
}
|
||||
info: sampleDictionaryInfo,
|
||||
entries: [
|
||||
{
|
||||
i: 616,
|
||||
ts: 1527813108,
|
||||
p: "اظهار",
|
||||
f: "izháar",
|
||||
g: "izhaar",
|
||||
e: "expression, statement, declaration",
|
||||
c: "n. m.",
|
||||
ec: "cool",
|
||||
a: 1,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
||||
test("should encode and decode", () => {
|
||||
expect(readDictionaryInfo(writeDictionaryInfo(sampleDictionaryInfo) as Uint8Array)).toEqual(sampleDictionaryInfo);
|
||||
expect(readDictionary(writeDictionary(sampleDictionary) as Uint8Array)).toEqual(sampleDictionary);
|
||||
expect(
|
||||
readDictionaryInfo(writeDictionaryInfo(sampleDictionaryInfo) as Uint8Array)
|
||||
).toEqual(sampleDictionaryInfo);
|
||||
expect(
|
||||
readDictionary(writeDictionary(sampleDictionary) as Uint8Array)
|
||||
).toEqual(sampleDictionary);
|
||||
});
|
|
@ -4,27 +4,31 @@ import { Dictionary, DictionaryInfo } from "./dictionary-models";
|
|||
import Pbf from "pbf";
|
||||
|
||||
export function writeDictionary(dictionary: T.Dictionary): ArrayBuffer {
|
||||
const pbfDict = new Pbf();
|
||||
Dictionary.write(dictionary, pbfDict);
|
||||
const buffer = pbfDict.finish();
|
||||
return buffer;
|
||||
const pbfDict = new Pbf();
|
||||
// @ts-ignore
|
||||
Dictionary.write(dictionary, pbfDict);
|
||||
const buffer = pbfDict.finish();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
export function readDictionary(buffer: Uint8Array): T.Dictionary {
|
||||
const pbf = new Pbf(buffer);
|
||||
const dictionary = Dictionary.read(pbf) as T.Dictionary;
|
||||
return dictionary;
|
||||
const pbf = new Pbf(buffer);
|
||||
// @ts-ignore
|
||||
const dictionary = Dictionary.read(pbf) as T.Dictionary;
|
||||
return dictionary;
|
||||
}
|
||||
|
||||
export function writeDictionaryInfo(dictionary: T.DictionaryInfo): ArrayBuffer {
|
||||
const pbfDict = new Pbf();
|
||||
DictionaryInfo.write(dictionary, pbfDict);
|
||||
const buffer = pbfDict.finish();
|
||||
return buffer;
|
||||
const pbfDict = new Pbf();
|
||||
// @ts-ignore
|
||||
DictionaryInfo.write(dictionary, pbfDict);
|
||||
const buffer = pbfDict.finish();
|
||||
return buffer;
|
||||
}
|
||||
|
||||
export function readDictionaryInfo(buffer: Uint8Array): T.DictionaryInfo {
|
||||
const pbf = new Pbf(buffer);
|
||||
const dictionaryInfo = DictionaryInfo.read(pbf) as T.DictionaryInfo;
|
||||
return dictionaryInfo;
|
||||
const pbf = new Pbf(buffer);
|
||||
// @ts-ignore
|
||||
const dictionaryInfo = DictionaryInfo.read(pbf) as T.DictionaryInfo;
|
||||
return dictionaryInfo;
|
||||
}
|
|
@ -149,6 +149,9 @@ export type DictionaryEntry = {
|
|||
ec?: string;
|
||||
/** the English partical of a English phrasal verb - or the english irregular plural of a noun */
|
||||
ep?: string;
|
||||
|
||||
/** If there is a recording [TS NUMBER].mp3 available for this entry, marked true with a 1 */
|
||||
a?: number;
|
||||
};
|
||||
|
||||
export type DictionaryEntryNoFVars = DictionaryEntry & {
|
||||
|
@ -212,6 +215,7 @@ export const dictionaryEntryNumberFields = [
|
|||
"l",
|
||||
"separationAtP",
|
||||
"separationAtF",
|
||||
"a",
|
||||
] as const;
|
||||
export type DictionaryEntryBooleanField =
|
||||
(typeof dictionaryEntryBooleanFields)[number];
|
||||
|
|
|
@ -13,7 +13,7 @@ module.exports = [
|
|||
{ ts: 1527821744, e: "cook, chef" }, // آشپز - aashpáz
|
||||
{ ts: 1527812461, e: "hero, brave" }, // اتل - atul
|
||||
{ ts: 1527821649, e: "impressive, effective, influencing" }, // اثرناک - asarnáak
|
||||
{ ts: 1527818704, e: "wide, spacious, extensive" }, // ارت - arát
|
||||
{ ts: 1573663943732, e: "wide, spacious, extensive" }, // ارت - arát
|
||||
{ ts: 1578340121962, e: "free, independant" }, // ازاد - azáad
|
||||
{ ts: 1527819418, e: "independant, autonomous" }, // خپلواک - khpulwaak
|
||||
{ ts: 1527817146, e: "resident; settled" }, // استوګن - astogan
|
||||
|
|
|
@ -1,37 +1,45 @@
|
|||
module.exports = [
|
||||
{ ts: 1527821817, e: `uncle (paternal)` }, // اکا - akáa
|
||||
{ ts: 1527816411, e: `father, grandfather (vocative or in child's speech)` }, // بابا - baabaa
|
||||
{ ts: 1527819439, e: `king, ruler, president, padishah` }, // باچا - baacháa
|
||||
{ ts: 1527823298, e: `sparrow-hawk, eagle` }, // باښه - baaxá
|
||||
{ ts: 1527817718, e: `slave, servant, a human, person (as in a slave of God)` }, // بنده - bandá
|
||||
{ ts: 1527815031, e: `prisoner, captive` }, // بندي - bandee
|
||||
{ ts: 1527815142, e: `king` }, // پاچا - paachaa
|
||||
{ ts: 1527817280, e: `leper` }, // جذامي - jUzaamee
|
||||
{ ts: 1527814236, e: `pot smoker, pothead, someone addicted to marijuana, pot, hash` }, // چرسي - charsee
|
||||
{ ts: 1578618561154, e: `Haji, someone who has gone on the Hajj` }, // حاجي - haajee
|
||||
{ ts: 1527821193, e: `supporter, protector, defender, patron, saviour` }, // حامي - haamee
|
||||
{ ts: 1591711877815, e: `washerman, someone who does the laundry` }, // دوبي - dobée
|
||||
{ ts: 1527820139, e: `rabab player, rubab player` }, // ربابي - rabaabee
|
||||
{ ts: 1619278755267, e: `troubling, pestering` }, // ربړنه - rabaRúna
|
||||
{ ts: 1577066022588, e: `cupbearer, butler, bartender, alchohol maker` }, // ساقي - saaqée
|
||||
{ ts: 1527822817, e: `soldier, warrior, guard` }, // سپاهي - sipaahee
|
||||
{ ts: 1527812975, e: `barber, hairdresser` }, // سلماني - salmaanee
|
||||
{ ts: 1527819414, e: `prince` }, // شاهزاده - shaahzaadá
|
||||
{ ts: 1527818084, e: `drinker, drunkard, alcoholic, wine-bibber` }, // شرابي - sharaabee
|
||||
{ ts: 1527821950, e: `prince` }, // شهزاده - shahzaadá
|
||||
{ ts: 1588158828142, e: `hunter` }, // ښکاري - xkaaree
|
||||
{ ts: 1527815206, e: `judge, religious authority/judge` }, // قاضي - qaazee
|
||||
{ ts: 1527818500, e: `contractor, supplier` }, // قراردادي - qaraardaadee
|
||||
{ ts: 1527816446, e: `paternal uncle, term of address for elderly man` }, // کاکا - kaakaa
|
||||
{ ts: 1595232159907, e: `begger, panhandler` }, // ګدا - gadáa
|
||||
{ ts: 1527816512, e: `elder brother, general form of familiar and respectful address` }, // لالا - laalaa
|
||||
{ ts: 1527812878, e: `uncle (maternal), respectful form of address` }, // ماما - maamaa
|
||||
{ ts: 1610556640847, e: `census` }, // مردمشماري - mărdamshUmaaree
|
||||
{ ts: 1527815484, e: `mullah, priest` }, // ملا - mUllaa
|
||||
{ ts: 1527821714, e: `parallel, matching, appropriate, identical` }, // موازي - mUwaazée
|
||||
{ ts: 1527816514, e: `shoemaker, shoe repairman, cobbler` }, // موچي - mochee
|
||||
{ ts: 1527823093, e: `prophet` }, // نبي - nabee
|
||||
{ ts: 1579041957559, e: `call, appeal, shout, summoning` }, // ندا - nadáa
|
||||
{ ts: 1527816253, e: `grandson` }, // نواسه - nawaasa
|
||||
{ ts: 1527819971, e: `governor` }, // والي - waalée
|
||||
{ ts: 1527821817, e: `uncle (paternal)` }, // اکا - akáa
|
||||
{ ts: 1527816411, e: `father, grandfather (vocative or in child's speech)` }, // بابا - baabaa
|
||||
{ ts: 1527819439, e: `king, ruler, president, padishah` }, // باچا - baacháa
|
||||
{ ts: 1527823298, e: `sparrow-hawk, eagle` }, // باښه - baaxá
|
||||
{
|
||||
ts: 1527817718,
|
||||
e: `slave, servant, a human, person (as in a slave of God)`,
|
||||
}, // بنده - bandá
|
||||
{ ts: 1527815031, e: `prisoner, captive` }, // بندي - bandee
|
||||
{ ts: 1527815142, e: `king` }, // پاچا - paachaa
|
||||
{ ts: 1527817280, e: `leper` }, // جذامي - jUzaamee
|
||||
{
|
||||
ts: 1527814236,
|
||||
e: `pot smoker, pothead, someone addicted to marijuana, pot, hash`,
|
||||
}, // چرسي - charsee
|
||||
{ ts: 1578618561154, e: `Haji, someone who has gone on the Hajj` }, // حاجي - haajee
|
||||
{ ts: 1527821193, e: `supporter, protector, defender, patron, saviour` }, // حامي - haamee
|
||||
{ ts: 1591711877815, e: `washerman, someone who does the laundry` }, // دوبي - dobée
|
||||
{ ts: 1527820139, e: `rabab player, rubab player` }, // ربابي - rabaabee
|
||||
{ ts: 1619278755267, e: `troubling, pestering` }, // ربړنه - rabaRúna
|
||||
{ ts: 1577066022588, e: `cupbearer, butler, bartender, alchohol maker` }, // ساقي - saaqée
|
||||
{ ts: 1527822817, e: `soldier, warrior, guard` }, // سپاهي - sipaahee
|
||||
{ ts: 1527812975, e: `barber, hairdresser` }, // سلماني - salmaanee
|
||||
{ ts: 1527819414, e: `prince` }, // شاهزاده - shaahzaadá
|
||||
{ ts: 1527818084, e: `drinker, drunkard, alcoholic, wine-bibber` }, // شرابي - sharaabee
|
||||
{ ts: 1527821950, e: `prince` }, // شهزاده - shahzaadá
|
||||
{ ts: 1588158828142, e: `hunter` }, // ښکاري - xkaaree
|
||||
{ ts: 1527815206, e: `judge, religious authority/judge` }, // قاضي - qaazee
|
||||
{ ts: 1527818500, e: `contractor, supplier` }, // قراردادي - qaraardaadee
|
||||
{ ts: 1527816446, e: `paternal uncle, term of address for elderly man` }, // کاکا - kaakaa
|
||||
{ ts: 1595232159907, e: `begger, panhandler` }, // ګدا - gadáa
|
||||
{
|
||||
ts: 1527816512,
|
||||
e: `elder brother, general form of familiar and respectful address`,
|
||||
}, // لالا - laalaa
|
||||
{ ts: 1527812878, e: `uncle (maternal), respectful form of address` }, // ماما - maamaa
|
||||
{ ts: 1610556640847, e: `census` }, // مردمشماري - mărdamshUmaaree
|
||||
{ ts: 1527815484, e: `mullah, priest` }, // ملا - mUllaa
|
||||
{ ts: 1527821714, e: `parallel, matching, appropriate, identical` }, // موازي - mUwaazée
|
||||
{ ts: 1527823093, e: `prophet` }, // نبي - nabee
|
||||
{ ts: 1579041957559, e: `call, appeal, shout, summoning` }, // ندا - nadáa
|
||||
{ ts: 1527816253, e: `grandson` }, // نواسه - nawaasa
|
||||
{ ts: 1527819971, e: `governor` }, // والي - waalée
|
||||
];
|
Loading…
Reference in New Issue