wikitongues-db 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,190 @@
1
+ /**
2
+ * Domain types and interfaces for Wikitongues Database.
3
+ */
4
+ /**
5
+ * Ontological anchor keys. All three are mandatory: every language is classified
6
+ * by every authority (see CLASSIFICATION_RULES.md §3.1.1).
7
+ */
8
+ interface StandardsData {
9
+ iso639_3: string;
10
+ glottocode: string;
11
+ bcp47: string;
12
+ }
13
+ interface LanguageData {
14
+ standards: StandardsData;
15
+ /** How the speaker names their language in the video; null if never stated. */
16
+ speaker_claim: string | null;
17
+ /** The language label authored by Wikitongues (verbatim from their metadata). */
18
+ wikitongues_classification: string;
19
+ /** Wikitongues' genealogical qualifiers, normalized ("Norman Romance"); null if none. */
20
+ wikitongues_lineage: string | null;
21
+ /** Endonym in native script. */
22
+ autonym: string;
23
+ }
24
+ interface SpeakerData {
25
+ name: string;
26
+ role?: string;
27
+ origin?: string | null;
28
+ }
29
+ interface ProvenanceData {
30
+ country_code?: string | null;
31
+ country_name?: string | null;
32
+ region?: string | null;
33
+ city?: string | null;
34
+ recorded_by?: string | null;
35
+ recording_date?: string | null;
36
+ }
37
+ interface TranscriptionData {
38
+ has_subtitles?: boolean;
39
+ available_subtitles?: string[];
40
+ native_text?: string | null;
41
+ english_translation?: string | null;
42
+ }
43
+ interface RawMetadataData {
44
+ title?: string;
45
+ tags?: string[];
46
+ }
47
+ interface VideoData {
48
+ id: string;
49
+ url: string;
50
+ duration_seconds: number;
51
+ upload_date: string;
52
+ license: string;
53
+ content_type: string;
54
+ primary_language: LanguageData;
55
+ additional_languages?: LanguageData[];
56
+ speakers?: SpeakerData[];
57
+ provenance?: ProvenanceData | null;
58
+ transcription?: TranscriptionData | null;
59
+ raw_metadata?: RawMetadataData | null;
60
+ }
61
+ interface Iso639_3Entry {
62
+ name: string;
63
+ scope: 'I' | 'M' | 'S';
64
+ type: 'L' | 'E' | 'A' | 'H' | 'C' | 'S';
65
+ /** ISO 639-1 two-letter code when one exists. */
66
+ part1?: string;
67
+ invertedName?: string;
68
+ }
69
+ interface GlottologEntry {
70
+ name: string;
71
+ level: 'family' | 'language' | 'dialect';
72
+ /** Language_ID column: the parent language node, only set for dialects. */
73
+ parentLanguageId?: string;
74
+ /** Family_ID column: the top-level family, not the immediate parent. */
75
+ familyId?: string;
76
+ latitude?: number;
77
+ longitude?: number;
78
+ macroarea?: string;
79
+ }
80
+ interface IanaSubtagEntry {
81
+ description: string;
82
+ deprecated?: boolean;
83
+ }
84
+ interface IanaLanguageEntry extends IanaSubtagEntry {
85
+ suppressScript?: string;
86
+ macrolanguage?: string;
87
+ scope?: 'macrolanguage';
88
+ }
89
+ interface IanaVariantEntry extends IanaSubtagEntry {
90
+ prefixes: string[];
91
+ }
92
+ interface ReferenceTables {
93
+ iso639_3: Record<string, Iso639_3Entry>;
94
+ glottolog: Record<string, GlottologEntry>;
95
+ iana: {
96
+ fileDate: string;
97
+ language: Record<string, IanaLanguageEntry>;
98
+ script: Record<string, IanaSubtagEntry>;
99
+ region: Record<string, IanaSubtagEntry>;
100
+ variant: Record<string, IanaVariantEntry>;
101
+ };
102
+ }
103
+ interface ResolvedIso639_3 {
104
+ code: string;
105
+ name: string;
106
+ scope: 'I';
107
+ type: Iso639_3Entry['type'];
108
+ part1?: string;
109
+ invertedName?: string;
110
+ }
111
+ interface ResolvedGlottolog {
112
+ code: string;
113
+ name: string;
114
+ level: 'language' | 'dialect';
115
+ parentLanguageId?: string;
116
+ familyId?: string;
117
+ latitude?: number;
118
+ longitude?: number;
119
+ macroarea?: string;
120
+ }
121
+ interface ResolvedBcp47 {
122
+ tag: string;
123
+ primarySubtag: string;
124
+ scriptSubtag?: string;
125
+ regionSubtag?: string;
126
+ variantSubtags: string[];
127
+ description?: string;
128
+ }
129
+ interface ResolvedStandards {
130
+ iso639_3: ResolvedIso639_3;
131
+ glottolog: ResolvedGlottolog;
132
+ bcp47: ResolvedBcp47;
133
+ }
134
+ interface FilterOptions {
135
+ language?: string;
136
+ country?: string;
137
+ speaker?: string;
138
+ contentType?: string;
139
+ license?: string;
140
+ creativeCommons?: boolean;
141
+ subtitles?: boolean;
142
+ minDuration?: number;
143
+ maxDuration?: number;
144
+ limit?: number;
145
+ }
146
+ interface LanguageSummary {
147
+ iso639_3: string;
148
+ iso_name: string;
149
+ bcp47_tags: string[];
150
+ glottocodes: string[];
151
+ glottolog_names: string[];
152
+ wikitongues_classifications: string[];
153
+ autonyms: string[];
154
+ video_count: number;
155
+ total_duration_seconds: number;
156
+ countries: string[];
157
+ }
158
+ interface CountrySummary {
159
+ country_code: string | null;
160
+ country_name: string;
161
+ video_count: number;
162
+ language_count: number;
163
+ languages: string[];
164
+ }
165
+ interface SpeakerSummary {
166
+ name: string;
167
+ roles: string[];
168
+ origins: string[];
169
+ video_count: number;
170
+ languages: string[];
171
+ }
172
+ interface DatasetStats {
173
+ total_videos: number;
174
+ total_languages: number;
175
+ total_countries: number;
176
+ total_duration_seconds: number;
177
+ total_duration_hours: number;
178
+ with_subtitles_count: number;
179
+ with_subtitles_percentage: number;
180
+ licenses: Record<string, number>;
181
+ content_types: Record<string, number>;
182
+ }
183
+
184
+ /**
185
+ * Static normalized Wikitongues dataset.
186
+ */
187
+
188
+ declare const dataset: VideoData[];
189
+
190
+ export { type CountrySummary as C, type DatasetStats as D, type FilterOptions as F, type GlottologEntry as G, type IanaLanguageEntry as I, type LanguageData as L, type ProvenanceData as P, type ReferenceTables as R, type StandardsData as S, type TranscriptionData as T, type VideoData as V, type ResolvedIso639_3 as a, type ResolvedGlottolog as b, type ResolvedBcp47 as c, type ResolvedStandards as d, type SpeakerData as e, type RawMetadataData as f, type LanguageSummary as g, type SpeakerSummary as h, type IanaSubtagEntry as i, type IanaVariantEntry as j, type Iso639_3Entry as k, dataset as l };
@@ -0,0 +1,190 @@
1
+ /**
2
+ * Domain types and interfaces for Wikitongues Database.
3
+ */
4
+ /**
5
+ * Ontological anchor keys. All three are mandatory: every language is classified
6
+ * by every authority (see CLASSIFICATION_RULES.md §3.1.1).
7
+ */
8
+ interface StandardsData {
9
+ iso639_3: string;
10
+ glottocode: string;
11
+ bcp47: string;
12
+ }
13
+ interface LanguageData {
14
+ standards: StandardsData;
15
+ /** How the speaker names their language in the video; null if never stated. */
16
+ speaker_claim: string | null;
17
+ /** The language label authored by Wikitongues (verbatim from their metadata). */
18
+ wikitongues_classification: string;
19
+ /** Wikitongues' genealogical qualifiers, normalized ("Norman Romance"); null if none. */
20
+ wikitongues_lineage: string | null;
21
+ /** Endonym in native script. */
22
+ autonym: string;
23
+ }
24
+ interface SpeakerData {
25
+ name: string;
26
+ role?: string;
27
+ origin?: string | null;
28
+ }
29
+ interface ProvenanceData {
30
+ country_code?: string | null;
31
+ country_name?: string | null;
32
+ region?: string | null;
33
+ city?: string | null;
34
+ recorded_by?: string | null;
35
+ recording_date?: string | null;
36
+ }
37
+ interface TranscriptionData {
38
+ has_subtitles?: boolean;
39
+ available_subtitles?: string[];
40
+ native_text?: string | null;
41
+ english_translation?: string | null;
42
+ }
43
+ interface RawMetadataData {
44
+ title?: string;
45
+ tags?: string[];
46
+ }
47
+ interface VideoData {
48
+ id: string;
49
+ url: string;
50
+ duration_seconds: number;
51
+ upload_date: string;
52
+ license: string;
53
+ content_type: string;
54
+ primary_language: LanguageData;
55
+ additional_languages?: LanguageData[];
56
+ speakers?: SpeakerData[];
57
+ provenance?: ProvenanceData | null;
58
+ transcription?: TranscriptionData | null;
59
+ raw_metadata?: RawMetadataData | null;
60
+ }
61
+ interface Iso639_3Entry {
62
+ name: string;
63
+ scope: 'I' | 'M' | 'S';
64
+ type: 'L' | 'E' | 'A' | 'H' | 'C' | 'S';
65
+ /** ISO 639-1 two-letter code when one exists. */
66
+ part1?: string;
67
+ invertedName?: string;
68
+ }
69
+ interface GlottologEntry {
70
+ name: string;
71
+ level: 'family' | 'language' | 'dialect';
72
+ /** Language_ID column: the parent language node, only set for dialects. */
73
+ parentLanguageId?: string;
74
+ /** Family_ID column: the top-level family, not the immediate parent. */
75
+ familyId?: string;
76
+ latitude?: number;
77
+ longitude?: number;
78
+ macroarea?: string;
79
+ }
80
+ interface IanaSubtagEntry {
81
+ description: string;
82
+ deprecated?: boolean;
83
+ }
84
+ interface IanaLanguageEntry extends IanaSubtagEntry {
85
+ suppressScript?: string;
86
+ macrolanguage?: string;
87
+ scope?: 'macrolanguage';
88
+ }
89
+ interface IanaVariantEntry extends IanaSubtagEntry {
90
+ prefixes: string[];
91
+ }
92
+ interface ReferenceTables {
93
+ iso639_3: Record<string, Iso639_3Entry>;
94
+ glottolog: Record<string, GlottologEntry>;
95
+ iana: {
96
+ fileDate: string;
97
+ language: Record<string, IanaLanguageEntry>;
98
+ script: Record<string, IanaSubtagEntry>;
99
+ region: Record<string, IanaSubtagEntry>;
100
+ variant: Record<string, IanaVariantEntry>;
101
+ };
102
+ }
103
+ interface ResolvedIso639_3 {
104
+ code: string;
105
+ name: string;
106
+ scope: 'I';
107
+ type: Iso639_3Entry['type'];
108
+ part1?: string;
109
+ invertedName?: string;
110
+ }
111
+ interface ResolvedGlottolog {
112
+ code: string;
113
+ name: string;
114
+ level: 'language' | 'dialect';
115
+ parentLanguageId?: string;
116
+ familyId?: string;
117
+ latitude?: number;
118
+ longitude?: number;
119
+ macroarea?: string;
120
+ }
121
+ interface ResolvedBcp47 {
122
+ tag: string;
123
+ primarySubtag: string;
124
+ scriptSubtag?: string;
125
+ regionSubtag?: string;
126
+ variantSubtags: string[];
127
+ description?: string;
128
+ }
129
+ interface ResolvedStandards {
130
+ iso639_3: ResolvedIso639_3;
131
+ glottolog: ResolvedGlottolog;
132
+ bcp47: ResolvedBcp47;
133
+ }
134
+ interface FilterOptions {
135
+ language?: string;
136
+ country?: string;
137
+ speaker?: string;
138
+ contentType?: string;
139
+ license?: string;
140
+ creativeCommons?: boolean;
141
+ subtitles?: boolean;
142
+ minDuration?: number;
143
+ maxDuration?: number;
144
+ limit?: number;
145
+ }
146
+ interface LanguageSummary {
147
+ iso639_3: string;
148
+ iso_name: string;
149
+ bcp47_tags: string[];
150
+ glottocodes: string[];
151
+ glottolog_names: string[];
152
+ wikitongues_classifications: string[];
153
+ autonyms: string[];
154
+ video_count: number;
155
+ total_duration_seconds: number;
156
+ countries: string[];
157
+ }
158
+ interface CountrySummary {
159
+ country_code: string | null;
160
+ country_name: string;
161
+ video_count: number;
162
+ language_count: number;
163
+ languages: string[];
164
+ }
165
+ interface SpeakerSummary {
166
+ name: string;
167
+ roles: string[];
168
+ origins: string[];
169
+ video_count: number;
170
+ languages: string[];
171
+ }
172
+ interface DatasetStats {
173
+ total_videos: number;
174
+ total_languages: number;
175
+ total_countries: number;
176
+ total_duration_seconds: number;
177
+ total_duration_hours: number;
178
+ with_subtitles_count: number;
179
+ with_subtitles_percentage: number;
180
+ licenses: Record<string, number>;
181
+ content_types: Record<string, number>;
182
+ }
183
+
184
+ /**
185
+ * Static normalized Wikitongues dataset.
186
+ */
187
+
188
+ declare const dataset: VideoData[];
189
+
190
+ export { type CountrySummary as C, type DatasetStats as D, type FilterOptions as F, type GlottologEntry as G, type IanaLanguageEntry as I, type LanguageData as L, type ProvenanceData as P, type ReferenceTables as R, type StandardsData as S, type TranscriptionData as T, type VideoData as V, type ResolvedIso639_3 as a, type ResolvedGlottolog as b, type ResolvedBcp47 as c, type ResolvedStandards as d, type SpeakerData as e, type RawMetadataData as f, type LanguageSummary as g, type SpeakerSummary as h, type IanaSubtagEntry as i, type IanaVariantEntry as j, type Iso639_3Entry as k, dataset as l };
@@ -1 +1 @@
1
- export { d as dataset, d as default } from './dataset-jRTVzgZX.mjs';
1
+ export { l as dataset, l as default } from './dataset-DNYcpFFZ.mjs';
package/dist/dataset.d.ts CHANGED
@@ -1 +1 @@
1
- export { d as dataset, d as default } from './dataset-jRTVzgZX.js';
1
+ export { l as dataset, l as default } from './dataset-DNYcpFFZ.js';