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

fix: handle annotations when 2 tokens are merged #49

Merged
merged 2 commits into from
Nov 13, 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
21 changes: 11 additions & 10 deletions examples/christoph-borg/config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
metadata:
id: christoph-borg
language: swe
id: christoph-borg
language: swe

import:
importer: text_import:parse
importer: text_import:parse

export:
annotations:
- <sentence>
# - <token:word>
- <token>:stanza.pos
- <token>:sbx_ocr_correction_viklofg_sweocr.ocr-correction--viklofg-sweocr

annotations:
- <sentence>
# - <token:word>
- <token>:stanza.pos
- sbx_ocr_correction_viklofg_sweocr.sbx-ocr-correction
- sbx_ocr_correction_viklofg_sweocr.sbx-ocr-correction:sbx_ocr_correction_viklofg_sweocr.ocr-correction--viklofg-sweocr

sparv:
compression: none
compression: none
19 changes: 10 additions & 9 deletions examples/ocr-correction-viklofg-sweocr/config.yaml
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
metadata:
id: hello-ocr
language: swe
id: hello-ocr
language: swe

import:
importer: text_import:parse
importer: text_import:parse

export:
annotations:
- <sentence>
# - <token:word>
- <token>:stanza.pos
- <token>:sbx_ocr_correction_viklofg_sweocr.ocr-correction--viklofg-sweocr
annotations:
- <sentence>
# - <token:word>
- <token>:stanza.pos
- sbx_ocr_correction_viklofg_sweocr.sbx-ocr-correction
- sbx_ocr_correction_viklofg_sweocr.sbx-ocr-correction:sbx_ocr_correction_viklofg_sweocr.ocr-correction--viklofg-sweocr

sparv:
compression: none
compression: none
3 changes: 2 additions & 1 deletion examples/texts/dokument.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
Den i HandelstidniDgens g&rdagsnnmmer omtalade hvalfisken, sorn fångats i Frölnndaviken
Den i HandelstidniDgens g&rdagsnnmmer omtalade hvalfisken, sorn fångats i Frölnndaviken.
Jonath an saknades.
4 changes: 2 additions & 2 deletions ocr-correction-viklofg-sweocr/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ prepare-release: tests/requirements-testing.lock

# we use lock extension so that dependabot doesn't pick up changes in this file
tests/requirements-testing.lock: pyproject.toml
pdm export --dev --format requirements --output $@
pdm export --dev --format requirements --no-hashes --output $@

.PHONY: kb-bert-prepare-release
kb-bert-prepare-release: ocr-correction-viklofg-sweocr/CHANGELOG.md
Expand All @@ -158,4 +158,4 @@ CHANGELOG.md:

.PHONY: ocr-correction-viklofg-sweocr/CHANGELOG.md
ocr-correction-viklofg-sweocr/CHANGELOG.md:
git cliff --unreleased --include-path "ocr-correction-viklofg-sweocr/**/*" --include-path "examples/ocr-correction-viklofg-sweocr/**/*" --prepend $@
git cliff --unreleased --include-path "ocr-correction-viklofg-sweocr/**/*" --include-path "examples/ocr-correction-viklofg-sweocr/**/*" --prepend $@
Loading
Loading