-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: handle annotations when 2 tokens are merged
Change to use output spans and corrections. Fixes #44
- Loading branch information
1 parent
b73f93d
commit 21944ac
Showing
11 changed files
with
626 additions
and
125 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
14 changes: 14 additions & 0 deletions
14
ocr-correction-viklofg-sweocr/tests/__snapshots__/test_annotations.ambr
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# serializer version: 1 | ||
# name: test_annotate_ocr_correction | ||
list([ | ||
tuple( | ||
7, | ||
18, | ||
), | ||
]) | ||
# --- | ||
# name: test_annotate_ocr_correction.1 | ||
list([ | ||
'ansaknades', | ||
]) | ||
# --- |
Oops, something went wrong.