#59 multilingual support - morphemes

This commit is contained in:
Avris 2020-09-28 19:32:05 +02:00
parent a12a55b166
commit 015fc69d51
2 changed files with 4 additions and 24 deletions

View File

@ -1,6 +1,7 @@
import {MORPHEMES, Template} from "./classes"; import { Template } from "./classes";
import Compressor from "./compressor"; import Compressor from "./compressor";
import {buildDict} from "./helpers"; import { buildDict } from "./helpers";
import MORPHEMES from '../data/morphemes';
export const addAliasesToTemplates = (templates) => { export const addAliasesToTemplates = (templates) => {
const templatesWithAliases = {} const templatesWithAliases = {}

View File

@ -1,4 +1,5 @@
import {buildDict, buildList} from "./helpers"; import {buildDict, buildList} from "./helpers";
import MORPHEMES from '../data/morphemes';
export class ExamplePart { export class ExamplePart {
constructor(variable, str) { constructor(variable, str) {
@ -92,28 +93,6 @@ export class Source {
} }
} }
export const MORPHEMES = [
'pronoun_n',
'pronoun_g',
'pronoun_g_acc',
'pronoun_d',
'pronoun_a',
'pronoun_i',
'pronoun_l',
'pronoun_all',
'adjective_n',
'adjective_ll',
'adjective_middle',
'verb_end_inter',
'verb_end_about',
'verb_middle_inter',
'verb_middle_about',
'verb_nasal',
'verb_go',
'verb_o',
'honorific',
];
const escape = s => { const escape = s => {
if (Array.isArray(s)) { if (Array.isArray(s)) {
s = s.join('&'); s = s.join('&');