computerlexica in ocr en zoekmachines by katrien depuydt

29
IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands. Computerlexica in OCR en Zoekmachines Katrien Depuydt (Instituut voor Nederlandse Lexicologie, Leiden)

Upload: impact-centre-of-competence

Post on 11-May-2015

408 views

Category:

Education


2 download

DESCRIPTION

Presentation given on the KB IMPACT Demo Day on 16 February 2011 in The Hague.

TRANSCRIPT

Page 1: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

Computerlexica in OCR en Zoekmachines

Katrien Depuydt (Instituut voor Nederlandse Lexicologie, Leiden)

Page 2: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

2

Overzicht Wat is een computerlexicon Lexica in IMPACT Gereedschappen voor lexiconbouw en toepassing lexica Een aantal resultaten Demonstratie zoeken

Page 3: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

3

Wat is een computerlexicon?

Page 4: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

4

Computerlexicon vs. electronisch woordenboek (1)

Een electronisch woordenboek heeft: Gedigitaliseerde full text (geen plaatjes)Voor menselijk gebruikIdealiter:doorzoekbaar met expliciet gecodeerde informatie (XML) zoals

lemma, woordsoort, betekenis, citaten etc.Voorbeelden: OED online, WNT online

Page 5: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

5

Dictionary XML (example)

Page 6: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

6

Computerlexicon vs. electronisch woordenboek (2)

Een computerlexicon is:Altijd in gestructureerd digitaal formaat (XML, relationele database)Hoofddoel: computertoepassingMet expliciet gecodeerde informatie (eg. lemma, woordsoort, morfologie, syntaxis…).

Voorbeelden van gebruik:Taalkundige verrijking van tekstmateriaal‘geavanceerder’ zoeken (woord met alle spellingen en verbuigingen)Automatisch samenvatten, keyword extraction…

Page 7: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

7

Page 8: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

8

Lexica in IMPACT

Page 9: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

9

Het OCR-lexiconEen OCR lexicon is

Een nagekeken lijst van woorden in een taalGebaseerd op een corpus van gedateerde teksten (selectie!)Bij voorkeur met frequentieinformatieBij voorkeur van dezelfde tijdperiode of hetzelfde teksttype als de

teksten die je wilt scannen

Page 10: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

10

OCR-lexicon: voorbeeldVan het WNT attestation lexicon Van het historisch corpus van de DBNL

absoluut 8absoluyt 2absoluyter 1absolveren 3absolverende 1absorbeeren 1absorbeert 1absorberen 1absorptie 3absoute 2abstineeren 1abstinencie 1abstinentie 2abstineren 1abstrackheyt 1abstract 7abstracta 1abstracte 7abstracten 4abstractheid 1abstractie 1abstractiën 1

wechgerukt 5wechgeschickt 6wechgeven 6wech-gevoerde 11wechgevoerde 14wech-gevoert 59wechgevoert 98wechgeworpen 21wechghenomen 12wechghevoert 7wechginck 5wechloopen 6wechneemt 11wechneme 6wech-nemen 20wechnemen 74wechneminge 12wech-neminge 6wechrapen 6wechrucken 6wechruiming 7wecht 7

Page 11: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

11

Het IR-lexiconIR-lexicon: belangrijkste informatiecategorieën

woordvormen (lijst van woorden) +- frequentieinformatie- citaten (gedateerde bronnen) uit corpora of electronische

woordenboeken- MODERN LEMMA (// ingang wdb.) toegekend aan

spellingvarianten en geflecteerde varianten van hetzelfde woord Het modern lemma wordt gebruikt bij het zoeken in teksten Standaard gebruik in corpuslinguistiek en moderne historische lexicografie

Page 12: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

12

<?xml version='1.0'?><!DOCTYPE lexicon SYSTEM 'NL_Structure.dtd'><lexicon><lexical_entry><lemma_id>219490</lemma_id><modern_lemma>aantuilen</modern_lemma><gloss></gloss><POS>VRB</POS><ne_label></ne_label><language_id></language_id><portmanteau_lemma_id></portmanteau_lemma_id>

<wordform><form_representation><wordform_id>850026</wordform_id><written_form>tuyld</written_form><attestation><id>92141</id><token_id></token_id><quote>Verhael ick (<I>t.w. een als vrouw verkleede man</I>) haer mijn min in Vrouwelijcker schynen: Sy acht het boertery, en tuyld daer weer op an, Vermits een Vrou niet op een Vrou verlieven kan,</quote><derivation_id>0</derivation_id><document_id>204</document_id><start_pos>119</start_pos><end_pos>124</end_pos></attestation></form_representation></wordform>

Page 13: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

13

Gereedschappen voor lexiconbouw en toepassing lexica

Page 14: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

14

Types variatie (spelling, verbuiging…)uytterlijcste uyterlijkste d'uyterlijke uiterlyke uyterlijcke uiterlijke uyterlijck uiterlyken uiterlijkste uiterlicke wterlicke wterlijcke ulterlijk uiterlyk uiterlijk uyterlick wterlicken d'uyterlijcke uiterlijken uiterlijks wterlijck uytterlicke uitterlijke ujterlijke uytterlijk uyterlycke uyterlicken uijterlicke d'uiterlijcke wtterlijcke wterlyke wtterlijk uuterlick uuterlic uyterlijke uyterlijcken uyterlicke d'uiterlyke wterlijke vuyterlijcke uuterlycke uuterlicke wterlijken uyterlijcksten uuyterlicke uuyterlick uuyterlycke uytterlijcke uytterlycke uytterlick vuytterlicke uiterlijker uyterlyck uterliek wterlijcken uiterlijkst uitterlijk uytterlijcken uyterlyk wterlick uutterlijck uuyterlicken uyttelijck uijterlijk uytterlijck uuterlijck uiterlick uitterlyk uuyterlic uuyterlyck uuyterlijck uiterlijck uytterlyck uterlyc wterlijk

I

werelt weerelt wereld weerelds wereldt werelden weereld werrelts waerelds weerlyt wereldts vveerelts waereld weerelden waerelden weerlt werlt werelds sweerels zwerlys swarels swerelts werelts swerrels weirelts tsweerelds werret vverelt werlts werrelt worreld werlden wareld weirelt weireld waerelt werreld werld vvereld weerelts werlde tswerels werreldts weereldt wereldje waereldje weurlt wald weëled

II

(patronen om variatie te voorspellen)

(een aantal voorspelbaar met patronen, andere moet je uit een lexicon halen)

Page 15: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

15

Computerlexica

Voor OCR and OCR postcorrectie Verbeteren doorzoekbaarheid historisch tekstmateriaal door de bouw

van een lexicon met varianten met een modern lemma als zoeksleutel

Gereedschappen voor lexiconbouw Gereedschappen voor toepassing van het lexicon in zoekmachines Lexicon cookbook Voorschriften en tools om de lexica te gebruiken in OCR

Page 16: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

16

Gereedschappen (Tools)- Lexiconbouw uit corpusmateriaal en woordenboeken- Gebruik van lexicon in zoekmachines

- Tool om spellingvariatiepatronen uit historisch materiaal te halen

- Tool om met gebruik van patronen nog niet aangetroffen spellingvariaties te relateren aan hun standaardvorm

- Tool om nog niet aangetroffen verbogen vormen naar de grondvorm terug te brengen

Page 17: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

17

Gewone woordenschat vs. Namen (NE’s)

Gereedschappen voor de automatische herkenning, classificatie en terugvinden van varianten van namen- wens van bibliotheken- gewone vocabulaire van namen scheiden in teksten- verhinderen van onaangename resultaten:

Abimelech apemelk! (b/p; i/e; e/0; k/ch)

NE lexica

Page 18: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

18

Een aantal resulaten voor het Nederlands

Page 19: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

19

Ground truth data: NederlandsType and genre # woorden

Gold Standard Boek 300k

Random Set Boeken 340k

Random Set Staten Generaal 2.5M

Gold Standard Staten Generaal 500k

Gold Standard Kranten 1 3.4M

Gold Standard Kranten 2 170k

Random Set Kranten 3.2M

totaal 13.1M

Page 20: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

20

Lexicon dekking (1: ground truth boeken)Type coverage Token coverage

Modern lexicon (e-Lex) 46% 76%

Core general lexicon 56% 84%

1 + 2 63% 89%

Uitbreiding met corpus-materiaal

78% 95%

Page 21: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

21

Lexicon dekking (2: gt kranten 18e-19e e.)Type coverage Token coverage

Modern lexicon (e-Lex) 40% 83%

Core general lexicon 41% 84%

1 + 2 51% 89%

Uitbreiding met corpus-materiaal

62% 95%

Page 22: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

22

Lexicon coverage (3: gt Staten Generaal 19e e.)Type coverage Token coverage

Modern lexicon (e-Lex) 51% 89%

Core general lexicon 47% 88%

1 + 2 58% 93%

Uitbreiding met corpus-materiaal

68% 97%

Page 23: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

23

Lexicon coverage (4: gt Staten Generaal 20e e.)Type coverage Token coverage

Modern lexicon (e-Lex) 70% 93%

Core general lexicon 66% 93%

1 + 2 76% 96%

Uitbreiding met corpusmateriaal

81% 98%

Page 24: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

24

Lexicon coverage (5: Genesis, 1637 bijbel)Type coverage Token coverage

Modern lexicon (e-Lex) 31% 61%

Core lexicon 62% 83%

1 + 2 65% 89%

Uitbreiding met corpusmateriaal

87% 98.6%

Page 25: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

25

Lexicon coverage (6: Hooft, historiën)Type coverage Token coverage

Modern lexicon (e-Lex) 26% 67%

Core lexicon 47% 88%

1 + 2 50% 90%

Uitbreiding met corpusmateriaal

58% 96%

Page 26: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

26

Evaluatie van OCRFinereader SDK (versie 9) External dictionary interface (implementatiemodule) Uitdaging

Vertaling van corpusfrequenties naar gewichten 0-100Afgebroken woorden, case-sensitivity, …Probleem met de lange s (work around)

Lexicon DataIMPACT OCR-lexicon voor het NederlandsFinereader internal lexicon

Page 27: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

27

OCR resultaten: word recognition rateDataset Met ABBYY intern

Nederlands lexiconMet het IMPACT lexicon voorhet Nederlands (case hyphenation)

Met het IMPACT lexicon voorhet Nederlands (case hyphenation) + lange S-probleem

DPO35 88.8% 90.9% 94.4 %

Staten Gen., 1826-27 selectie

90.9% 94.9% 94.9%

Page 28: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

28

Een voorbeeld:

OCR aan het begin van het project: Resultaten:

A. De eerde was de gevaarlykflti om de verlei¬ding aan 't Hof; de tweede de ftillie en veiligde;de derde de zwaarde, daar hy byna drie millioenenharde en onbefchaafde Menfchen beftieren moest.

A. De eerste was de gevaarlykste om de verlei-ding aan 't Hof; de tweede de stilste en veiligste;de derde de zwaarste, daar hy byna drie millioenenharde en onbeschaafde Menschen bestieren moest.

Page 29: Computerlexica in OCR en zoekmachines by Katrien Depuydt

IMPACT Den Haag 16 april 2011

IMPACT is supported by the European Community under the FP7 ICT Work Programme. The project is coordinated by the National Library of the Netherlands.

29

Retrieval demonstrator

Indexing and retrieval library (java) geïmplementeerd op de lucene search engine

Lexicon in MySQL database

OCR met Finereader SDK en external dictionary interface van ongeveer 2000 images van de Nederlandse Ground Truth selectie

Page XML output [in framework] NE tagging Indexing and retrieval met gebruikmaking van lexicon and NE tagging

29