mirror of
https://gitlab.com/PronounsPage/PronounsPage.git
synced 2025-09-26 06:23:35 -04:00
26 lines
721 B
TypeScript
26 lines
721 B
TypeScript
// Database of names
|
|
// source: https://dane.gov.pl/pl/dataset/1667,lista-imion-wystepujacych-w-rejestrze-pesel-osoby-zyjace
|
|
// update: yearly, in January
|
|
|
|
import peselK1 from './K1.tsv';
|
|
import peselK2 from './K2.tsv';
|
|
import peselM1 from './M1.tsv';
|
|
import peselM2 from './M2.tsv';
|
|
|
|
const pesel: Record<string, Record<string, [number, number]>> = {};
|
|
for (const [names, sex, ordinal] of [
|
|
[peselK1, 'K', 1],
|
|
[peselK2, 'K', 2],
|
|
[peselM1, 'M', 1],
|
|
[peselM2, 'M', 2],
|
|
] as const) {
|
|
for (const { name, count } of names) {
|
|
if (pesel[name] === undefined) {
|
|
pesel[name] = { K: [0, 0], M: [0, 0] };
|
|
}
|
|
pesel[name][sex][ordinal - 1] = count;
|
|
}
|
|
}
|
|
|
|
export default pesel;
|