Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/danish manual links #113

Merged
merged 5 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/crosslinker-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17', '1.18', '1.19', '1.20']
go: ['1.20', '1.21', '1.22']
steps:
- uses: actions/checkout@v4
- name: Build with Go ${{ matrix.go }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crosslinker-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17', '1.18', '1.19', '1.20']
go: ['1.22']
steps:
- uses: actions/checkout@v4
- name: Lint in Go ${{ matrix.go }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/crosslinker-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
go: ['1.17', '1.18', '1.19', '1.20']
go: ['1.22']
steps:
- uses: actions/checkout@v4
- name: Test in Go ${{ matrix.go }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-module-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-module-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-module-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20.x'
node-version: '22.x'
registry-url: 'https://registry.npmjs.org'
- run: yarn
- run: yarn publish --non-interactive
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/npm-module-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:

strategy:
matrix:
node-version: [20.x]
node-version: [22.x]

steps:
- uses: actions/checkout@v4
Expand Down
23 changes: 21 additions & 2 deletions crosslinker/internal/crosslinks/manual-overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ func getManualAliases() map[string]string {
"fostrdottir": "fosterdottir",
"fostrfadir": "fosterfadhir",
"fostrmodir": "fostermodhir",
"fostrsystir": "fostersystir",
"geirlaukr": "hvitloker",
"guddottir": "gudhdottir",
"gudfadir": "gudhfadhir",
Expand All @@ -34,7 +35,25 @@ func getManualAliases() map[string]string {
"stjopfadir": "stiupfadhir",
"stjopmodir": "stiupmodhir",
"tidindi": "tidhing",
// Note: east norse first to avoid duplicate key.
"drangskaper": "drengskapr",
// Note: east norse (swedish) first to avoid duplicate key.
"brodhir": "broder",
"dodher": "dod",
"drapa": "draebe",
"drangskaper": "drengskapr",
"forfadhir": "forfader",
"fostersystir": "fostersoster",
// Note: Danish variants differ largely from others,
// to avoid duplicates use them as keys.
"broder": "brodir",
"dod": "daudr",
"draebe": "drepa",
"fader": "fadir",
"faderfader": "storfadhir",
"forfader": "fodfadir",
"fostersoster": "fostrsystir",
"godfader": "gudhfadhir",
"godmoder": "gudhomodhir",
"fostermoder": "fostrmodir",
"moderbroder": "modurbrodir",
}
}
2 changes: 1 addition & 1 deletion npm-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "scandinavian-dictionary-crosslinker",
"version": "0.6.0",
"version": "0.7.0",
"description": "Finds shared entries in dictionary sitemaps, allowing crosslinking",
"repository": "https://github.com/stscoundrel/scandinavian-dictionary-crosslinker.git",
"author": "stscoundrel <[email protected]>",
Expand Down
Binary file modified npm-module/resources/crosslinks.json.gz
Binary file not shown.
4 changes: 2 additions & 2 deletions npm-module/tests/crosslinks.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe('Crosslinks tests', () => {
test('Crosslinks contain correct amount of slug entries', () => {
const result = getCrosslinks();

expect(Object.keys(result).length).toBe(48294);
expect(Object.keys(result).length).toBe(48307);
});

test('Crosslinks contain correct amount of summed individual links', () => {
Expand All @@ -22,7 +22,7 @@ describe('Crosslinks tests', () => {
sum += result[key].length;
});

expect(sum).toEqual(128440);
expect(sum).toEqual(128513);
});

test('Crosslink entries are returned in correct object format', () => {
Expand Down
Loading
Loading