Skip to content

Commit

Permalink
Update dataset & dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
stscoundrel committed Jul 27, 2023
1 parent 359fbfc commit ae1039d
Show file tree
Hide file tree
Showing 5 changed files with 424 additions and 418 deletions.
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,20 @@
},
"dependencies": {},
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/preset-env": "^7.22.5",
"@babel/core": "^7.22.9",
"@babel/preset-env": "^7.22.9",
"@babel/preset-typescript": "^7.22.5",
"@stryker-mutator/core": "^7.1.0",
"@stryker-mutator/jest-runner": "^7.1.0",
"@types/jest": "^29.5.2",
"@types/node": "^20.3.2",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"@stryker-mutator/core": "^7.1.1",
"@stryker-mutator/jest-runner": "^7.1.1",
"@types/jest": "^29.5.3",
"@types/node": "^20.4.5",
"@typescript-eslint/eslint-plugin": "^6.2.0",
"@typescript-eslint/parser": "^6.2.0",
"babel-jest": "^29.5.0",
"eslint": "^8.43.0",
"eslint": "^8.45.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-jest": "^27.2.2",
"eslint-plugin-jest": "^27.2.3",
"jest": "^29.5.0",
"ts-jest": "^29.1.0",
"ts-node": "^10.9.1",
Expand Down
2 changes: 1 addition & 1 deletion resources/old-swedish-dictionary.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions src/parser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ KEYS_TO_ENTRY_KEYS.set('d', 'information');
KEYS_TO_ENTRY_KEYS.set('e', 'definitions');
KEYS_TO_ENTRY_KEYS.set('f', 'alternativeForms');

// eslint-disable-next-line @typescript-eslint/no-explicit-any
function parseEntry(this: any, key: string, value: unknown): unknown {
const parsedKey = KEYS_TO_ENTRY_KEYS.get(key);
if (parsedKey) {
Expand Down
4 changes: 2 additions & 2 deletions tests/old-swedish-dictionary.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Old Swedish Dictionary tests', () => {
const thval = result.filter((entry) => entry.headword === 'thval')[0];

expect(aganger.headword).toBe('aganger');
expect(aganger.definitions[0]).toBe('åverkan, intrång, ingrepp. " hadhe giort them ågangh vppå then siöen " SD NS 2: 245 (1410, nyare afskr.). om aagongh pa theris gambla änger FH 5: 109 ( 1847) . " ranzaca hwilken tere haffuer giort ogongh wppo then annars änger ok wtmark " BtFH 1: 134 ( 1506) . ib 137 ( 1506) , 138 (1506, 153 (1506), 166 (1508, 174 (1506), 176 (1507), 178 (1507, 198 (1509), 201 (1509, 212 (1507).');
expect(aganger.definitions[0]).toBe('åverkan, intrång, ingrepp. " hadhe giort them ågangh vppå then siöen" SD NS 2: 245 (1410, nyare afskr.). om aagongh pa theris gambla änger FH 5: 109 (1847). " ranzaca hwilken tere haffuer giort ogongh wppo then annars änger ok wtmark" BtFH 1: 134 (1506). ib 137 (1506) , 138 (1506, 153 (1506), 166 (1508, 174 (1506), 176 (1507), 178 (1507, 198 (1509), 201 (1509, 212 (1507).');
expect(aganger.partOfSpeech).toEqual(['nn']);
expect(aganger.grammaticalAspect).toBe('');
expect(aganger.information).toBe('');
Expand All @@ -41,7 +41,7 @@ describe('Old Swedish Dictionary tests', () => {
expect(aterbidhia.alternativeForms).toEqual([]);

expect(thval.headword).toBe('thval');
expect(thval.definitions[0]).toBe('tvål, såpa. " hon . . . sände möiana badha fran sik äptir olio oc twaal " ST 437 . " göra saponem twaal " PM XLVI . ib XLIII. tyzdt twal LB 7: 79.');
expect(thval.definitions[0]).toBe('tvål, såpa. " hon. .. sände möiana badha fran sik äptir olio oc twaal" ST 437. " göra saponem twaal" PM XLVI. ib XLIII. tyzdt twal LB 7: 79.');
expect(thval.partOfSpeech).toEqual(['nn']);
expect(thval.grammaticalAspect).toBe('');
expect(thval.information).toBe('');
Expand Down
Loading

0 comments on commit ae1039d

Please sign in to comment.