2020-11-10 15:47:44 -08:00
|
|
|
import {Source, Example, NounTemplate, PronounGroup, PronounLibrary, Name, Person, NounDeclension} from './classes'
|
2020-07-25 10:21:52 -07:00
|
|
|
import { buildDict, buildList } from './helpers';
|
2020-12-04 13:09:57 -08:00
|
|
|
import { parsePronouns } from './buildPronoun';
|
2020-07-26 06:27:36 -07:00
|
|
|
|
2020-11-10 15:47:44 -08:00
|
|
|
import pronounsRaw from '../data/pronouns/pronouns.tsv';
|
|
|
|
export const pronouns = parsePronouns(pronounsRaw);
|
2020-07-25 10:21:52 -07:00
|
|
|
|
2020-11-10 15:47:44 -08:00
|
|
|
import examplesRaw from '../data/pronouns/examples.tsv';
|
2020-07-25 10:21:52 -07:00
|
|
|
export const examples = buildList(function* () {
|
|
|
|
for (let e of examplesRaw) {
|
|
|
|
yield new Example(
|
|
|
|
Example.parse(e.singular),
|
|
|
|
Example.parse(e.plural || e.singular),
|
|
|
|
e.isHonorific,
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2020-10-12 06:49:33 -07:00
|
|
|
import nounTemplatesRaw from '../data/nouns/nounTemplates.tsv';
|
2020-09-04 08:07:32 -07:00
|
|
|
export const nounTemplates = buildList(function* () {
|
|
|
|
for (let t of nounTemplatesRaw) {
|
|
|
|
yield new NounTemplate(
|
|
|
|
t.masc.replace(/-/g, '').split('/'),
|
|
|
|
t.fem.replace(/-/g, '').split('/'),
|
|
|
|
t.neutr.replace(/-/g, '').split('/'),
|
|
|
|
t.mascPl.replace(/-/g, '').split('/'),
|
|
|
|
t.femPl.replace(/-/g, '').split('/'),
|
|
|
|
t.neutrPl.replace(/-/g, '').split('/'),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
2020-08-05 11:24:05 -07:00
|
|
|
|
2020-11-10 15:47:44 -08:00
|
|
|
import pronounGroupsRaw from '../data/pronouns/pronounGroups.tsv';
|
|
|
|
export const pronounGroups = buildList(function* () {
|
|
|
|
for (let g of pronounGroupsRaw) {
|
|
|
|
yield new PronounGroup(
|
2020-09-08 09:10:04 -07:00
|
|
|
g.name,
|
2020-12-22 16:43:28 -08:00
|
|
|
g.pronouns ? g.pronouns.split(',') : [],
|
2020-09-08 09:10:04 -07:00
|
|
|
g.description,
|
2021-12-23 03:36:54 -08:00
|
|
|
g.key || null,
|
2020-09-08 09:10:04 -07:00
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
|
|
|
|
2020-11-10 15:47:44 -08:00
|
|
|
export const pronounLibrary = new PronounLibrary(pronounGroups, pronouns);
|
2020-09-29 08:59:23 -07:00
|
|
|
|
2020-10-12 06:49:33 -07:00
|
|
|
import peopleRaw from '../data/people/people.tsv';
|
2020-09-29 10:11:46 -07:00
|
|
|
export const people = buildList(function* () {
|
|
|
|
for (let p of peopleRaw) {
|
|
|
|
yield new Person(
|
|
|
|
p.name,
|
|
|
|
p.description,
|
|
|
|
p.pronouns.split(','),
|
|
|
|
p.sources ? p.sources.split(',') : [],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
});
|
2020-10-11 05:50:33 -07:00
|
|
|
|
2020-10-12 06:49:33 -07:00
|
|
|
import nounDeclensionTemplatesRaw from '../data/nouns/nounDeclension.tsv';
|
2020-10-11 05:50:33 -07:00
|
|
|
export const nounDeclensionTemplates = buildList(function* () {
|
|
|
|
for (let d of nounDeclensionTemplatesRaw) {
|
|
|
|
yield new NounDeclension(d);
|
|
|
|
}
|
|
|
|
});
|