From 7b0aecc84e252a481c44aa1e0a075df0359b87e3 Mon Sep 17 00:00:00 2001 From: Clemens Neudecker <952378+cneud@users.noreply.github.com> Date: Fri, 10 Jan 2020 17:32:54 +0100 Subject: [PATCH] Update README.md --- README.md | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 5724efb..a1c9aba 100644 --- a/README.md +++ b/README.md @@ -11,20 +11,22 @@ [2. User Guide](https://github.com/qurator-spk/neath/blob/master/README.md#2-user-guide)    [2.1 Technical requirements](https://github.com/qurator-spk/neath/blob/master/README.md#21-technical-requirements) + +   [2.2 Installation](https://github.com/qurator-spk/neath/blob/master/README.md#22-installation) -   [2.2 Data format](https://github.com/qurator-spk/neath/blob/master/README.md#22-data-format) +   [2.3 Data format](https://github.com/qurator-spk/neath/blob/master/README.md#23-data-format) -   [2.3 Data preparation](https://github.com/qurator-spk/neath/blob/master/README.md#23-data-preparation) +   [2.4 Data preparation](https://github.com/qurator-spk/neath/blob/master/README.md#24-data-preparation) -   [2.4 Provenance](https://github.com/qurator-spk/neath/blob/master/README.md#24-provenance) +   [2.5 Provenance](https://github.com/qurator-spk/neath/blob/master/README.md#25-provenance) -   [2.5 Keyboard navigation](https://github.com/qurator-spk/neath/blob/master/README.md#25-keyboard-navigation) +   [2.6 Keyboard navigation](https://github.com/qurator-spk/neath/blob/master/README.md#26-keyboard-navigation) -   [2.6 Mouse navigation](https://github.com/qurator-spk/neath/blob/master/README.md#26-mouse-navigation) +   [2.7 Mouse navigation](https://github.com/qurator-spk/neath/blob/master/README.md#27-mouse-navigation) -   [2.7 Image support](https://github.com/qurator-spk/neath/blob/master/README.md#27-image-support) +   [2.8 Image support](https://github.com/qurator-spk/neath/blob/master/README.md#28-image-support) -   [2.8 Saving progress](https://github.com/qurator-spk/neath/blob/master/README.md#28-saving-progress) +   [2.9 Saving progress](https://github.com/qurator-spk/neath/blob/master/README.md#29-saving-progress) [3. Annotation Guidelines](https://github.com/qurator-spk/neath/blob/master/README.md#3-annotation-guidelines) @@ -36,9 +38,12 @@ ### 2. User Guide #### 2.1 Technical Requirements -[neath](https://github.com/qurator-spk/neath) runs locally as a pure HTML+JavaScript webpage in your web browser. No software needs to be installed, but JavaScript has to be enabled in the browser. Any fairly recent browser should work, but only Chrome and Firefox are tested. +[neath](https://github.com/qurator-spk/neath) runs locally as a pure HTML+JavaScript webpage in your web browser. No software needs to be installed, but JavaScript has to be enabled in the browser. + +#### 2.2. Installation +Simply clone the repo using ``git clone https://github.com/qurator-spk/neath.git`` or download the [ZIP](https://github.com/qurator-spk/neath/archive/master.zip). Make sure you have at minimum ``neath.html`` and ``neath.js`` residing in a local directory, then it is sufficient to just open ``neath.html`` in a browser. Any fairly recent browser should work, but only Chrome and Firefox are tested. -#### 2.2 Data format +#### 2.3 Data format The data format is based on the format used in the [GermEval2014 Named Entity Recognition Shared Task](https://sites.google.com/site/germeval2014ner/data). Text is encoded as one token per line, with name spans encoded in the BIO-scheme, provided as tab-separated values: * the first column contains either a `#`, which signals the source the sentence is cited from, or * the token position within the sentence ``>=1`` @@ -73,7 +78,7 @@ No. TOKEN NE-TAG NE-EMB For our purposes we extend this format by adding * a fifth column for an ``ID`` for the outer ``NE-TAG`` from an authority file (in this case, the [GND](https://www.dnb.de/EN/Professionell/Standardisierung/GND/gnd_node.html) is used) -* column six for use as a variable ``url_id`` (see [Image Support](https://github.com/qurator-spk/neath/blob/master/README.md#27-image-support) for further details) +* column six for use as a variable ``url_id`` (see [Image Support](https://github.com/qurator-spk/neath/blob/master/README.md#28-image-support) for further details) * finally, columns 7+ are used for storing ``left,right,top,bottom`` pixel coordinates for facsimile snippets Example (full): @@ -100,10 +105,10 @@ No. TOKEN NE-TAG NE-EMB GND-ID url_id left,right,top,bottom 2 3 O O - 0 1939,1967,364,385 ``` -#### 2.3 Data preparation -The source data that is used for annotation are OCR results in [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) format. We provide a [Python tool](https://github.com/qurator-spk/page2tsv) that supports the transformation of [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) OCR files into the [TSV format](https://github.com/qurator-spk/neath/blob/master/README.md#22-data-format) required for use with [neath](https://github.com/qurator-spk/neath). +#### 2.4 Data preparation +The source data that is used for annotation are OCR results in [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) format. We provide a [Python tool](https://github.com/qurator-spk/page2tsv) that supports the transformation of [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) OCR files into the [TSV format](https://github.com/qurator-spk/neath/blob/master/README.md#23-data-format) required for use with [neath](https://github.com/qurator-spk/neath). -#### 2.4 Provenance +#### 2.5 Provenance The processing pipeline applied at the Berlin State Library comprises the follows steps: 1. Layout Analysis & Textline Extraction @@ -111,15 +116,13 @@ Layout Analysis & Textline Extraction @[sbb_textline_detector](https://github.co 2. OCR & Word Segmentation OCR is based on [OCR-D](https://github.com/OCR-D)'s [ocrd_tesserocr](https://github.com/OCR-D/ocrd_tesserocr) which requires [Tesseract](https://github.com/tesseract-ocr/tesseract) **>= 4.1.0**. The [GT4HistOCR_2000000](https://ub-backup.bib.uni-mannheim.de/~stweil/ocrd-train/data/GT4HistOCR_2000000.traineddata) model, which is [trained](https://github.com/tesseract-ocr/tesstrain/wiki/GT4HistOCR) on the [GT4HistOCR](https://zenodo.org/record/1344132) corpus, is used. Further details are available in the [paper](https://arxiv.org/abs/1809.05501). 3. TSV Transformation -A simple [Python tool](https://github.com/qurator-spk/page2tsv) is used for the transformation of the OCR results in [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) to [TSV](https://github.com/qurator-spk/neath/blob/master/docs/README.md#22-data-format). +A simple [Python tool](https://github.com/qurator-spk/page2tsv) is used for the transformation of the OCR results in [PAGE-XML](https://github.com/PRImA-Research-Lab/PAGE-XML) to [TSV](https://github.com/qurator-spk/neath/blob/master/docs/README.md#23-data-format). 4. Tokenization For tokenization, [SoMaJo](https://github.com/tsproisl/SoMaJo) is used. 5. Named Entity Recognition For Named Entity Recognition, a [BERT-Base](https://github.com/google-research/bert) model was trained for noisy OCR texts with historical spelling variation. [sbb_ner](https://github.com/qurator-spk/sbb_ner) is using a combination of unsupervised training on a large (~2.3m pages) [corpus of German OCR](https://zenodo.org/record/3257041) in combination with supervised training on a small (47k tokens) [annotated corpus](https://github.com/EuropeanaNewspapers/ner-corpora/tree/master/enp_DE.sbb.bio). Further details are available in the [paper](https://corpora.linguistik.uni-erlangen.de/data/konvens/proceedings/papers/KONVENS2019_paper_4.pdf). - -#### 2.5 Keyboard-Navigation - +#### 2.6 Keyboard-Navigation | Key Combination| Action | |:---------|:-------------------------------------------| | Left | Move one cell left | @@ -160,7 +163,7 @@ For Named Entity Recognition, a [BERT-Base](https://github.com/google-research/b | l r | remove on display row (minimum is 5) | |----------|--------------------------------------------| -#### 2.6 Mouse-Navigation +#### 2.7 Mouse-Navigation * use mouse wheel to scroll up and down * left-click `<<` and `>>` to move 15 rows up or down @@ -177,13 +180,13 @@ For Named Entity Recognition, a [BERT-Base](https://github.com/google-research/b * left-click the `POSITION` of a row and select `start-sentence` from the drop-down menu to start a new sentence -#### 2.7 Image Support +#### 2.8 Image Support Provided facsimile images are available online via the [iiif.io](https://iiif.io/) Image API, [neath](https://github.com/qurator-spk/neath) supports the embedding of facsimile snippets into its interface to help with data annotation and correction. This further requires that OCR with word segmentation is applied to the image to determine bounding boxes for tokens. The iiif-image-url contained in the source ``#`` can then be used as a replacement for ``url_id`` in combination with the token bounding boxes as ``left,right,top,bottom`` to obtain the facsimile snippet url and display the image in the leftmost column. Clicking on the facsimile snippet opens up a new tab with a larger context. -#### 2.8 Saving progress +#### 2.9 Saving progress [neath](https://github.com/qurator-spk/neath) runs fully locally in the browser. Therefore it can not automatically save any changes you made to disk. You have to use the `Save Changes` button in order to so manually from time to time. If your browser automatically saves all downloads to your `Downloads` folder, you might want to configure it so that it instead prompts you where to save. ### 3. Annotation Guidelines