@@ -96,9 +96,9 @@ export default async function importCWSources(sourcesPath, toolboxPath, outPath
96
96
for ( const entry of originalEntries ) {
97
97
98
98
const originalStem = entry . head
99
- . replace ( / ^ - / u, `` ) // remove leading hyphen
100
- . replace ( / - $ / u, `` ) // remove trailing hyphen
101
- . replace ( / Y / gu, `ý ` ) ;
99
+ . replace ( / ^ - / u, `` ) // remove leading hyphen
100
+ . replace ( / - $ / u, `` ) // remove trailing hyphen
101
+ . replace ( / Y / gu, `y ` ) ; // normalize historical /ý/
102
102
103
103
const converted = [ originalStem ] ;
104
104
const dependent = [ ] ;
@@ -161,10 +161,12 @@ export default async function importCWSources(sourcesPath, toolboxPath, outPath
161
161
162
162
// NA
163
163
// - remove postconsonantal final /w/
164
- // - add final /a/ (NA-4, NA-4w)
164
+ // - add final -a (NA-4, NA-4w)
165
+ // - add final -ak (NA-3)
165
166
if ( entry . POS === `NA` ) {
166
167
if ( wFinalRegExp . test ( originalStem ) ) converted . push ( originalStem . replace ( / w $ / u, `` ) ) ;
167
168
converted . push ( `${ originalStem } a` ) ;
169
+ converted . push ( `${ originalStem } ak` ) ;
168
170
continue ;
169
171
}
170
172
@@ -256,15 +258,16 @@ export default async function importCWSources(sourcesPath, toolboxPath, outPath
256
258
257
259
for ( const currentEntry of toolboxEntries ) {
258
260
259
- const existingEntry = index . get ( currentEntry . sro ) ;
261
+ const normalizedHead = currentEntry . sro . replace ( / ý / gu, `y` ) ; // normalize historical /ý/
262
+ const existingEntry = index . get ( normalizedHead ) ;
260
263
261
264
if ( existingEntry ) {
262
265
if ( Array . isArray ( existingEntry ) ) existingEntry . push ( currentEntry ) ;
263
- else index . set ( currentEntry . sro , [ existingEntry , currentEntry ] ) ;
266
+ else index . set ( normalizedHead , [ existingEntry , currentEntry ] ) ;
264
267
continue ;
265
268
}
266
269
267
- index . set ( currentEntry . sro , currentEntry ) ;
270
+ index . set ( normalizedHead , currentEntry ) ;
268
271
269
272
}
270
273
0 commit comments