CoolFace
Datasetpublic

LelViLamp/oalz-1788-q1-ner-annotations-union-dataset

OALZ/1788/Q1/NER Postprocessing Training Published datasets (union, merged union) and models (EVENT, LOC, MISC, ORG, PER, TIME) A named entity recognition system (NER) was trained on text extracted from Oberdeutsche Allgemeine Litteraturueitung (OALZ) of the first quarter (January, Febuary, March) of 1788. The scans from which text was extracted can be found at Bayerische Staatsbibliothek using the extraction strategy of the KEDiff project, which can be found at… See the full description on the dataset page: https://huggingface.co/datasets/LelViLamp/oalz-1788-q1-ner-annotations-union-dataset.

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes24downloads
Dataset Card

OALZ/1788/Q1/NER

A named entity recognition system (NER) was trained on text extracted from Oberdeutsche Allgemeine Litteraturueitung (OALZ) of the first quarter (January, Febuary, March) of 1788. The scans from which text was extracted can be found at Bayerische Staatsbibliothek using the extraction strategy of the KEDiff project, which can be found at `cborgelt/KEDiff`.

Annotations

Each text passage was annotated in doccano by two or three annotators and their annotations were cleaned and merged into one dataset. For details on how this was done, see `LelViLamp/kediff-doccano-postprocessing`. In total, the text consists of about 1.7m characters. The resulting annotation datasets were published on the Hugging Face Hub. There are two versions of the dataset

  • —`union-dataset` contains the texts split into chunks. This is how they were presented in the annotation application doccano and results from preprocessing step 5a.
  • —`merged-union-dataset` does not retain this split. The text was merged into one long text and annotation indices were adapted in preprocessing step 5b.

Note that both these directories contain three equivalent datasets each:

  • —a Huggingface/Arrow dataset, <sup>*</sup>
  • —a CSV, <sup>*</sup> and
  • —a JSONL file.

<sup>*</sup> The former two should be used together with the provided text.csv to catch the context of the annotation. The latter JSONL file contains the full text.

The following categories were included in the annotation process:

TagLabelCountTotal LengthMedian Annotation LengthMean Annotation LengthSD
EVENTEvent2946,0901820.7113.24
LOCLocation2,44924,41799.976.21
MISCMiscellaneous2,58550,6541419.6019.63
ORGOrganisation2,47934,6931113.999.33
PERPerson7,05564,71079.179.35
TIMEDates & Time1,07613,154812.2210.98

NER models

Based on the annotations above, six separate NER classifiers were trained, one for each label type. This was done in order to allow overlapping annotations. For example, in the passage "Dieses Projekt wurde an der Universität Salzburg durchgeführt", you would want to categorise "Universität Salzburg" as an organisation while also extracting "Salzburg" as a location. This would result in an annotation like this:

json
{
  "id": "example-42",
  "text": "Dieses Projekt wurde an der Universität Salzburg durchgeführt",
  "label": [[28, 49, "ORG"], [40, 49, "LOC"]]
}

Example entry in CSV and Huggingface dataset

annotation_idline_idstartendlabellabel_textmerged
$n$example-422849ORGUniversität Salzburg???
$n+1$example-424049LOCSalzburg???

The columns mean:

  • —annotation_id was assigned internally by enumerating all annotations. This is not present in the JSONL format
  • —line_id is the fragment of the subdivided text, as shown in doccano. Called id in the JSONL dataset.
  • —start index of the first character that is annotated. Included, starts with 0.
  • —end index of the last character that is annotated. Excluded, maximum value is len(respectiveText).
  • —label indicates what the passage indicated by $[start, end)$ was annotated as.
  • —label_text contains the text that is annotated by $[start, end)$. This is not present in the JSONL dataset as it can be inferred there.
  • —merged indicates whether this annotation is the result of overlapping annotations of the same label. In that case, annotation_id contains the IDs of the individual annotations it was constructed of. This is not present in the JSONL dataset.

To achieve this overlap, each text passage must be run through all the classifiers individually and each classifier's results need to be combined. For details on how the training was done, see `LelViLamp/kediff-ner-training`.

The `dbmdz/bert-base-historic-multilingual-cased` tokeniser was used to create historical embeddings. Therefore, it is necessary to use that in order to use these NER models.

The models' performance measures are as follows:

ModelSelected EpochCheckpointValidation LossPrecisionRecallF<sub>1</sub>Accuracy
`EVENT`11393.021957.665233.343066.351528.995700
`LOC`11393.033602.829535.803648.814146.990999
`MISC`22786.123994.739221.503677.571298968697
`ORG`11393.062769.744259.709738.726212.980288
`PER`22786.059186.914037.849048.879070.983253
`TIME`11393.016120.866866.724958.783099.994631

Acknowledgements

The data set and models were created in the project Kooperative Erschließung diffusen Wissens (KEDiff), funded by the State of Salzburg, Austria 🇦🇹, and carried out at Paris Lodron Universität Salzburg.