1 of 38

Unstructured Data - Interdisciplinary Perspectives

Course 3�Hard Documents and Digitization

​

​

​

Diana Trandabat & Ionut Pistol�IIDT Master’s Programme · Faculty of Computer Science, UAIC Iași

​

​

2 of 38

2

Today’s plan

#

Block

1

From source to representation

2

PDFs and triage before tools

3

OCR pipeline and Romanian-specific challenges

4

Quality: CER, WER, sampling, propagation

5

Layout, tables, speech-to-text, images

6

Transformation provenance and reproducibility

7

Integrated case, claims, wrap-up

Analysing Unstructured Data · Interdisciplinary Perspectives

3 of 38

3

By the end of today you can…

  • Distinguish source artefacts from derived representations.
  • Choose an appropriate transformation route after inspecting the source.
  • Explain where OCR, layout extraction and ASR can introduce systematic error.
  • Evaluate digitisation quality with CER/WER and targeted manual sampling.
  • Document transformation provenance so another team can reconstruct the pipeline.
  • Limit analytical claims according to the quality of the derived representation.

Analysing Unstructured Data · Interdisciplinary Perspectives

4 of 38

4

Bridge from Lecture 2

P

Lecture 2

source → acquisition → raw snapshot

​

We preserved the evidence and recorded how it was collected.

Lecture 3

raw snapshot → transformation → analysable representation

​

Now the source itself may need interpretation before analysis.

In Lab 2 we saved raw files. Today we open them — carefully.

Analysing Unstructured Data · Interdisciplinary Perspectives

5 of 38

5

Same document, different representations

Your turn

Born-digital PDF

Selectable text

Search works

Scanned PDF

Image of a page

No reliable text layer

Photo of handwriting

Pixels + handwriting

Human-readable

Voicemail

Audio waveform

No text yet

The answer may look like text in all four cases — but the measurement process is different.

https://www.loc.gov/discover/ - have a look at the different format types

Analysing Unstructured Data · Interdisciplinary Perspectives

6 of 38

6

Source ≠ representation

Visual layer

pixels / page image

Textual layer

characters / words

Structural layer

order / blocks / tables

Semantic layer

entities / relations / meaning

Each layer makes some information explicit — and can hide or distort something else.

Analysing Unstructured Data · Interdisciplinary Perspectives

7 of 38

7

PDF is a page-description format

What humans see

paragraphs

columns

tables

headers

footnotes

What a PDF may encode

positioned text objects

images

fonts / glyph mapping

annotations

structure tags — or none

Extraction risks

wrong reading order

hyphenation

ligatures / encoding

headers in body text

column interleaving

Visual order does not necessarily encode logical reading order.

Analysing Unstructured Data · Interdisciplinary Perspectives

8 of 38

8

What kind of PDF is this?

Your turn

Test 1

Can you select text?

​

Copy one sentence. Does the pasted order make sense?

Test 2

Search for a visible word.

​

Does search find it?

Test 3

Zoom in.

​

Do letters remain sharp or become pixels?

A text layer may exist and still be wrong.

Analysing Unstructured Data · Interdisciplinary Perspectives

9 of 38

Have a look at this book.��What kind of pdf is it?

​

Try to copy the page 1, 4, or 21 to a new word file. What do you notice?

Analysing Unstructured Data · Interdisciplinary Perspectives

10 of 38

10

Born-digital vs scanned vs hybrid

Born-digital

Text objects created by software.

​

First try direct extraction.

OCR may unnecessarily introduce errors.

Scanned

Pages are images.

​

OCR is needed if you want machine-readable text.

Hybrid

Page image + OCR/text layer.

​

Search may work — but validate the hidden text.

Inspect first. Do not run OCR by default on every PDF.

Analysing Unstructured Data · Interdisciplinary Perspectives

11 of 38

11

Triage before tools

P

What you have

First route

Reliable born-digital PDF

Direct text extraction

Scanned PDF / page image

OCR

Handwriting

HTR or human transcription

Tables / forms

Layout + table / field extraction

Audio

ASR / transcription

Image without text

Visual analysis / metadata / description

Choose the route after you inspect the source — not after you choose your favourite tool.

Analysing Unstructured Data · Interdisciplinary Perspectives

12 of 38

12

OCR is a pipeline

P

Pre-process

deskew · denoise

Layout

blocks · order

Recognise

characters · words

Post-process

normalise · correct

Example tools: Tesseract · OCRmyPDF · cloud OCR / document AI services

Never silently replace OCR output with corrected text.

raw image → ocr_raw → ocr_corrected

Analysing Unstructured Data · Interdisciplinary Perspectives

13 of 38

13

Acquisition quality matters

Resolution

Too little detail → characters merge.

​

Very large images cost time and storage.

Geometry

Skew · rotation · curved pages · cropped margins

Surface

Noise · stains · stamps · bleed-through · folds

Compression

Artifacts can erase fine character details or table lines.

Some OCR problems are created before OCR begins.

Your turn

Find 5 examples of scanned text with different problems: too small/large, curved/cropped/.., stains/folds etc.

Analysing Unstructured Data · Interdisciplinary Perspectives

14 of 38

14

Predict the OCR error

Your turn

SESIZARE

Str. Sărărie nr. 21

Telefon: 07l2 345 678

​

Becul stradal nu funcționează.

​

[ștampilă peste text]

​

Nume: Ana Munteanu

​

notă de mână pe margine →

Mark the risky zones

• diacritics

• 1 / l / I confusion

• phone number

• proper name

• stamp overlap

• handwriting

• reading order

Analytically important fields can be exactly the ones most vulnerable to OCR error.

Analysing Unstructured Data · Interdisciplinary Perspectives

15 of 38

15

Typical OCR errors

E

Error type

Example

Why it matters

Character substitution

rn → m · l → 1

names, IDs, amounts

Deletion / insertion

missing diacritic or punctuation

search, exact extraction

Segmentation

two words → one

tokenisation, NER

Reading order

column A mixed with B

meaning / relations

Layout loss

table → flat text

field associations disappear

OCR quality is not only about whether words “look right”.

Analysing Unstructured Data · Interdisciplinary Perspectives

16 of 38

16

Romanian-specific challenges

Diacritics & Unicode

ș / ț use comma-below characters.

Legacy or badly encoded text may contain visually similar cedilla forms.

​

Normalization policy must be explicit.

Historical language

Historical spelling may differ from contemporary norms.

​

Do not “correct” it automatically if spelling itself is evidence.

Historical documents

Older typefaces, Romanian Cyrillic / transitional alphabets, stains and handwriting may require specialised models or human review.

Normalisation can improve search while simultaneously erasing evidence.

Analysing Unstructured Data · Interdisciplinary Perspectives

17 of 38

17

Character Error Rate (CER)

S

Substitutions

D

Deletions

I

Insertions

N = number of characters in the reference text. Lower is better.

CER = (S+I+D)/N

Analysing Unstructured Data · Interdisciplinary Perspectives

18 of 38

18

Word Error Rate (WER)

E

Reference

becul de pe strada Sărărie nu funcționează

OCR / ASR output

becul de pe strada Sarane nu functioneaza

Strict token-level scoring: 2 substitutions / 7 reference words ≈ 28.6%

The number changes if your normalization policy changes.

WER = (S+I+D)/N

Analysing Unstructured Data · Interdisciplinary Perspectives

19 of 38

19

Does this error matter?

E

Your turn

Case A

OCR: “functioneaza”

Reference: “funcționează”

​

Would you count this as an error for:

• keyword search?

• exact transcription?

• linguistic analysis?

Case B

OCR: “10.000 lei” → “100.00 lei”

​

Character error is small.

Analytical consequence may be large.

Define the normalization policy before you compute the metric.

Analysing Unstructured Data · Interdisciplinary Perspectives

20 of 38

20

Quality is task-dependent

Downstream task

What may be “good enough”?

What is dangerous?

Rough keyword discovery

moderate noise

systematic loss of key terms

Topic exploration

some random character noise

period/source-specific OCR bias

Named entities

high word-level fidelity

names and addresses corrupted

Amounts / dates / legal clauses

near-exact extraction

small character errors

Historical spelling analysis

faithful transcription

silent normalization

Average accuracy can hide consequential errors.

Analysing Unstructured Data · Interdisciplinary Perspectives

21 of 38

21

Gold standard and sampling

Your turn

Random sample

Estimate overall quality without cherry-picking easy pages.

Stratified sample

Cover periods, document types, institutions, scan qualities.

Targeted hard cases

Handwriting, tables, stamps, damaged pages, rare scripts.

You have 100,000 pages. Which 100 would you inspect manually?

Analysing Unstructured Data · Interdisciplinary Perspectives

22 of 38

22

Errors propagate downstream

OCR / ASR

tokens

entities

topics / counts

claim

Example: older complaints are scanned; newer complaints are born-digital.

A trend may reflect language change, service change — or changing digitisation quality.

Measurement bias introduced at digitisation can become a research finding if you do not test for it.

Analysing Unstructured Data · Interdisciplinary Perspectives

23 of 38

23

Layout is information

Reading order

Two columns can be interleaved.

Footnotes can enter the body.

Headers can repeat on every page.

Spatial relationships

Caption ↔ figure

label ↔ value

heading ↔ section

cell ↔ row / column

Semantic structure

A tagged PDF may preserve paragraphs, headings, lists and tables — but many PDFs do not.

Correct words can still form an incorrect document.

Analysing Unstructured Data · Interdisciplinary Perspectives

24 of 38

24

Tables are not just text

1 · Detect

Where is the table?

Does it span pages?

Are lines visible?

2 · Recover structure

Rows · columns · merged cells · multi-level headers

3 · Read content

Recognise text/numbers inside each cell and preserve their associations.

Examples of tools: pdfplumber · Camelot · Tabula

Flattening a table can destroy meaning even when every token is correct.

Analysing Unstructured Data · Interdisciplinary Perspectives

25 of 38

25

Speech-to-text pipeline

E

audio

segmentation

ASR

transcript

post-process

What ASR gives

spoken words → text

usually with segment timestamps

What may be lost

intonation · pauses · overlap · emotion · non-verbal events

Example

Whisper is multilingual and includes Romanian among supported languages.

A transcript is a representation of speech, not the speech itself.

Analysing Unstructured Data · Interdisciplinary Perspectives

26 of 38

26

Transcription ≠ diarisation

Transcription

What was said?

​

“Street light is broken again.”

​

Output: words / text.

Speaker diarisation

Who spoke when?

​

SPEAKER_01: …

SPEAKER_02: …

​

Output: speaker segments.

You may need both — but they are different processing tasks.

Analysing Unstructured Data · Interdisciplinary Perspectives

27 of 38

27

Compare three transcripts

Your turn

ASR raw

“uh I called yesterday the light uh near block B4 is still off”

Clean transcript

“I called yesterday. The light near block B4 is still off.”

Verbatim transcript

“Uh, I called yesterday… the light, uh, near block B4 is still off.”

Two defensible transcripts can differ because they operationalise different questions.

Analysing Unstructured Data · Interdisciplinary Perspectives

28 of 38

28

Who is heard less well?

What we know from published English data

Koenecke et al. (2020) found substantial ASR performance disparities between matched Black and white speakers across several commercial systems.

What we should not assume for Romanian

Regional accents, older speakers, dialects or noisy environments are plausible factors to test — not conclusions we can transfer directly from English.

Audit performance on the population and recording conditions you actually analyse.

Analysing Unstructured Data · Interdisciplinary Perspectives

29 of 38

29

Images as evidence

Image content

What is visible?

objects · text · spatial relations · colour · damage · context

File metadata

timestamp · device · orientation · sometimes GPS

​

Useful for provenance, but metadata may be absent, stripped or modified.

Metadata can support provenance — and can also expose personal information.

Analysing Unstructured Data · Interdisciplinary Perspectives

30 of 38

30

What gets lost in conversion?

Your turn

Conversion

Potential loss

scan → plain text

layout, typography, marks, images

table → CSV

merged headers, notes, spatial cues

audio → clean transcript

pauses, overlap, prosody, hesitation

photo → OCR text

visual context, colour, object relationships

historical spelling → normalised text

orthographic evidence

Conversion makes some information easier to analyse by making other information disappear.

Analysing Unstructured Data · Interdisciplinary Perspectives

31 of 38

31

Preserve raw and derived representations

raw/

source.pdf

derived/

source_ocr.txt

corrected/

source_corrected.txt

analysis/

features.csv

Never overwrite the only copy of the source or the machine output.

Each transition should be logged as a new derived artefact.

Corrections improve usability; preservation protects auditability.

Analysing Unstructured Data · Interdisciplinary Perspectives

32 of 38

32

Processing provenance

Field

Example

Input

page_001.tif

Operation

OCR

Tool / version

Tesseract 5.x

Language / model

ron

Parameters

page segmentation mode, preprocessing settings

Timestamp

2026-10-12 14:30

Output

page_001_ocr.txt

Manual correction

yes / no + responsible agent

Provenance continues after acquisition: transformations are part of the evidence trail.

Analysing Unstructured Data · Interdisciplinary Perspectives

33 of 38

33

Reproducibility / replication

Reproducible processing

Same preserved input + documented tool/model + parameters → another researcher can reconstruct the derived representation.

Replication / robustness check

Repeat with another OCR/ASR system, another corpus or another configuration and test whether conclusions remain stable.

Terminology varies across disciplines — define the sense you use.

Analysing Unstructured Data · Interdisciplinary Perspectives

34 of 38

34

Quality-control matrix

Input

Route

Check

Sample

Sufficient for…

Scanned prose

OCR

CER/WER + visual spot-check

random + hard pages

search / counts?

Tables

layout + table extraction

cell / structure correctness

varied tables

field analysis?

Audio

ASR

WER + timestamp / speaker checks

speakers + noise strata

content analysis?

Images

metadata / visual extraction

preservation + metadata sanity

varied devices

provenance?

Quality control is complete only when it is linked to the downstream task.

Analysing Unstructured Data · Interdisciplinary Perspectives

35 of 38

35

Case challenge: choose the representation

Your turn

The dossier

• scanned PDF

• OCR text

• corrected OCR

• extracted table

• processing log

Research question

How many complaints concern public lighting, where are the reported problems located, and what problems are described?

​

Which representation(s) would you analyse?

Decide

1. What do you verify manually?

2. What remains the evidential source?

3. Which quality metric?

4. What provenance must be kept?

5. What claim is still defensible?

Analysing Unstructured Data · Interdisciplinary Perspectives

36 of 38

36

What can we claim?

Your turn

“The word ‘întuneric’ appears twice as often in complaints from 2024 as in complaints from 2015.”

2015

Paper complaints → scanned → OCR

​

Potential OCR loss, older typography, different submission channel.

2024

Online form → born-digital text

​

Different acquisition process and probably higher text fidelity.

Before interpreting the trend, test whether the measurement process changed.

Analysing Unstructured Data · Interdisciplinary Perspectives

37 of 38

37

The three threads today

P · Provenance

Can every derived representation be traced to its source, tool, version and transformation?

E · Evaluation

How much was lost, changed or misrecognised — and where are the errors concentrated?

C · Claim

Does the transformation error alter what we are entitled to conclude?

Analysing Unstructured Data · Interdisciplinary Perspectives

38 of 38

38

Exit ticket + readings

Exit ticket

1. One transformation I would no longer treat as “just preprocessing” is…

​

2. One quality check I would perform before analysing digitised data is…

​

3. The claim most vulnerable to conversion errors in my project would be…

Readings

Course bibliography:

Krippendorff (2018)

Jurafsky & Martin (2026)

Gebru et al. (2021)

​

Optional for this lecture:

Hill & Hengchen (2019)

van Strien et al. (2020)

Koenecke et al. (2020)

Analysing Unstructured Data · Interdisciplinary Perspectives