1 of 19

Entity linking historical document OCR

by combining

Wikidata and Wikipedia

�Kai Labusch, Clemens Neudecker

SWIB23 – 15th Semantic Web in Libraries Conference

11 – 13 September 2023, Berlin

​

2 of 19

Overview

  • Introduction
  • Named Entity Recognition
  • Named Entity Linking / Disambiguation:
    • Why is it important?
    • Construction of knowledge base (KB)
    • Entity candidate lookup
    • Candidate evaluation
    • Ranking of candidates
  • EL-based topic modelling
  • Resources

3 of 19

Berlin State Library (SBB)

  • Established 1661 in Berlin
  • >33 million media objects
  • >2.5 PetaBytes digital data
  • Part of the Prussian Cultural Heritage Foundation

https://staatsbibliothek-berlin.de/

​

  • In-house Digitization Center since 2007
  • Digital collections provide access to �>212,000 digitized documents �https://digital.staatsbibliothek-berlin.de/

4 of 19

​

  • BERT-based NER tagger
  • Pre-trained for “Masked-LM” and “Next Sentence Prediction” tasks on historical text material of SBB digitized collections
  • Supports PER, LOC and ORG entities
  • German model: Trained on historical and contemporary German NER ground-truth
  • French, English model: Trained on combined German, French, Dutch, and English NER ground-truth

​

Details → Kai Labusch, Clemens Neudecker and David Zellhöfer: �BERT for Named Entity Recognition in Contemporary and Historic German

Named Entity Recognition

5 of 19

Named Entity Linking

and

Disambiguation

6 of 19

Why Entity Linking?

7 of 19

Why Entity Linking?

8 of 19

  • EL system performs text comparisons that require sentences that refer to the entities in the KB

​

  • Use SPARQL queries on Wikidata to find relevant entities that have a corresponding Wikipedia page
  • Extract all sentences of Wikipedia where those entities have been referenced by Wikipedia authors

Construction of KB for

German, French and English

9 of 19

SELECT ?organisation ?label ?sitelink ?gndid

WHERE

{

# instance of any subclass of fictional organisation

?organisation wdt:P31/wdt:P279* wd:Q14623646;rdfs:label ?label.

FILTER(LANG(?label) = "fr").

?sitelink schema:about ?organisation.

FILTER (CONTAINS(str(?sitelink), "fr.wikipedia.org")).

OPTIONAL {

?organisation wdt:P227 ?gndid

}

}

SPARQL - Example

10 of 19

Approximate nearest neighbour search

  • BERT embeddings stored in an approximate nearest neighbour index
  • 100 random projection search trees
  • Lookup of up to maxcand candidates with a distance less than Δl
  • Angular distance measure

Entity Candidate Lookup

Siegfried Schürenberg

Ludwig Christian Lichtenberg

Paul Isenberg

Manfred Lichtenfeld

Victoria Eugénie von Battenberg

Burkhard I. von Woldenberg

Julius Rodenberg

Bettina Blumenberg

Karl Pfeiffenberger

Werner Wollenberger

Hayim Greenberg

Adolph Scharenberg

Fritz Lichtenhahn

Johann Reinhard II. von Hanau-Lichtenberg

Georg Christoph Lichtenberg

Alexander Stuckenberg

Gertrud von Plettenberg

Michael Goldenberg

Anke Feuchtenberger

Peter Krukenberg

Reinhard von Hanau-Lichtenberg

11 of 19

Entity Candidate Evaluation

?

12 of 19

​

  • For each candidate consider up to 50 sentence pairs (A,B):
  • Sentence A is part of text being subject to NEL
  • Sentence B is part of Wikipedia and contains explicit link to candidate
  • Purpose trained BERT-model determines probability of sentence (A,B) referring to the same entity
  • Outcome is a set of matching probabilities per candidate
  • Final ranking of candidates on the basis of matching probabilities by ranking model

Entity Candidate Evaluation

13 of 19

​

  • Outcome previous steps: Set of matching probabilities per candidate
  • Compute statistical features of sets of matching probabilities:
    • Mean, median, min, max, standard deviation, various quantiles
    • Ranking statistics over all candidates
  • Add same statistical features for embedding similarities of lookup step
  • Random forest model estimates overall matching probability per candidate
  • Final output:
    • Sorted list of candidates that have matching probability > Δr
    • NIL: not implemented. Either list of sorted candidates or “-” if there is not any candidate with matching probability above Δr.

Entity Candidate Ranking

14 of 19

Topic Modeling

15 of 19

Topic Modeling

16 of 19

Topic Modeling

17 of 19

ML@SBB

  • The NER and EL methods developed were applied successfully for �the enrichment of 5,000,000 pages from SBB’s digital collections
  • Next steps
    • NER and EL results become integrated into the Digital Collections presentation portal, search, and discovery
    • NER and EL for use cases in the Digital Humanities �→ Historical Social Network Analysis (e.g. SoNAR IDH DFG-project)
    • NER and EL for use in subject indexing and classification
  • BKM-funded project “Mensch.Maschine.Kultur” allows us to continue �the work on NER and EL for another 3 years

18 of 19

Resources

​

​

​

  • Publications:

BERT for named entity recognition in contemporary and historical German

Named Entity Disambiguation and Linking Historic Newspaper OCR with BERT.

Entity linking in multilingual newspapers and classical commentaries with BERT

Named Entity Linking mit Wikidata und GND–Das Potenzial handkuratierter und strukturierter Datenquellen für die semantische Anreicherung von Volltexten�

  • Web-Demonstrators (NER+EL+Topic-Modeling):��=> https://ravius.sbb.berlin <=�

​

19 of 19

Thank you for your attention! �Questions?

Kai Labusch, Clemens Neudecker�@sbb.spk-berlin.de

SWIB23 – 15th Semantic Web in Libraries Conference

11 – 13 September 2023, Berlin