ToluClassics commited on
Commit
4abbcbe
·
verified ·
1 Parent(s): 7a721c2

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -33
README.md CHANGED
@@ -6,15 +6,9 @@ tags:
6
  configs:
7
  - config_name: karantaocr-bench
8
  data_files:
9
- - split: dictionary
10
  path:
11
- - dictionary.jsonl
12
- - split: religion
13
- path:
14
- - religion.jsonl
15
- - split: no_type
16
- path:
17
- - no_type.jsonl
18
  language:
19
  - yo
20
  - ig
@@ -35,50 +29,46 @@ task_categories:
35
  <img src="https://cdn-uploads.huggingface.co/production/uploads/604b97e27032db3f5e8d6e8e/0IwaKLOehSDEFF3zYY_Wp.png" alt="Karanta OCR Logo" width="100"/>
36
  </div>
37
 
38
- **KarantaOCR-Bench** is a unit-test–style evaluation dataset, similar to [olmOCR-bench](https://huggingface.co/datasets/allenai/olmOCR-bench). It consists of **1,890 PDF documents** and **4,426 test cases** spanning multiple document types.
39
-
40
- KarantaOCR-Bench is designed specifically to evaluate document text extraction for **African languages**, covering a diverse range of document formats and languages commonly under-represented in existing OCR benchmarks.
41
 
42
  ### Data Schema
43
 
44
  Below is a schema of each test case and what it means:
45
 
46
- - pdf [str]: This is the name of the pdf file in the `pdf` directory
47
- - page [str]: This is the page of the document for this test case
48
- - id [str]: Unique ID for this test case
49
- - type [str]: This is the test type; a description of each test type can be found in the next section
50
- - max_diffs [int]: This is the maximum allowable difference in the OCR outputs and test case for it to pass
51
- - text [str]: For "text-present" tests, this is the text span that we search for in the OCR outputs and for "text-absent" tests this is the text that we do not expect to see in the output
52
- - case_sensitive [bool]: This indicates whether the test case is case sensitive or not
53
- - first_n [int]: When provided, it means we should check for the text in the first n characters
54
- - last_n [int]: When provided, it means we should check for the text in the last n characters
55
- - checked [str]: This indicates whether or not we have verified this test case manually
56
- - url [str]: The original file name of the document
57
- - before [str]: This only applies to text-order tests and this is the text span that should exist before
58
- - after [str]:This only applies to text-order tests and this is the text span that should exist after
59
 
60
 
61
  ### Test Case Types
62
 
63
- KarantaOCR-Bench contains three types of test cases:
64
-
65
- * **Text Order:**
66
- Text Order tests verify the relative ordering of two distinct spans of text within a document. The test checks that the *before text* appears earlier in the OCR output than the *after text*. If either the *before text* or *after text* is missing, the test is marked as failed.
67
 
68
  * **Presence:**
69
  Presence tests check whether a provided span of text exists in the OCR output. Matches are evaluated with a tolerance defined by the `max_diffs` field, allowing for limited character-level differences.
70
 
71
- * **Absent:**
72
- Since the primary goal of KarantaOCR is to extract clean text suitable for LLM training, Absent tests ensure that undesired content—such as headers, footers, or page numbers—is excluded from the OCR output. These tests help maintain continuity across pages and prevent boilerplate text from polluting downstream training data.
73
-
74
  ## Results
75
 
76
- Coming soon ...
 
 
77
 
78
 
79
  ## How to Run the Benchmark on your Model
80
 
81
- Coming soon ...
 
 
82
 
83
 
84
  ## Citation Information
 
6
  configs:
7
  - config_name: karantaocr-bench
8
  data_files:
9
+ - split: diacritics
10
  path:
11
+ - diacritics.jsonl
 
 
 
 
 
 
12
  language:
13
  - yo
14
  - ig
 
29
  <img src="https://cdn-uploads.huggingface.co/production/uploads/604b97e27032db3f5e8d6e8e/0IwaKLOehSDEFF3zYY_Wp.png" alt="Karanta OCR Logo" width="100"/>
30
  </div>
31
 
32
+ **KarantaOCR-Bench** is a unit-test–style evaluation dataset, similar to [olmOCR-bench](https://huggingface.co/datasets/allenai/olmOCR-bench). It consists of **70 PDF documents** and **300 test cases** spanning multiple document types.
33
+ All the tests were manually verified by us.
34
+ KarantaOCR-Bench is designed specifically to evaluate document text extraction for **Documents with diacritics and special characters**, covering a diverse range of document formats and languages commonly under-represented in existing OCR benchmarks.
35
 
36
  ### Data Schema
37
 
38
  Below is a schema of each test case and what it means:
39
 
40
+ - `pdf [str]`: This is the name of the pdf file in the `pdf` directory
41
+ - `page [str]`: This is the page of the document for this test case
42
+ - `id [str]`: Unique ID for this test case
43
+ - `type [str]`: This is the test type; a description of each test type can be found in the next section
44
+ - `max_diffs [int]`: This is the maximum allowable difference in the OCR outputs and test case for it to pass
45
+ - `text [str]`: This is the text span that we search for in the OCR outputt.
46
+ - `case_sensitive [bool]`: This indicates whether the test case is case sensitive or not
47
+ - `checked [str]`: This indicates whether or not we have verified this test case manually
48
+ - `url [str]`: The original file name of the document
49
+ - `before [str]`: This only applies to text-order tests and this is the text span that should exist before
50
+ - `after [str]`:This only applies to text-order tests and this is the text span that should exist after
 
 
51
 
52
 
53
  ### Test Case Types
54
 
55
+ KarantaOCR-Bench is designed to augment OlmoOCR test with an additional test category for Diacritics and Special Chars:
 
 
 
56
 
57
  * **Presence:**
58
  Presence tests check whether a provided span of text exists in the OCR output. Matches are evaluated with a tolerance defined by the `max_diffs` field, allowing for limited character-level differences.
59
 
 
 
 
60
  ## Results
61
 
62
+ | JSONL File | KarantaOCR (3B) | RoLMOCR (7B) | NanoNetsOCR-2 (3B) | OLMOCR-2 (7B) |
63
+ | --------------- | ---------- | -------- | ------------- | -------- |
64
+ | Diacritics & Special Characters | **61.6** | 53.6 | 55.1 | 55.5 |
65
 
66
 
67
  ## How to Run the Benchmark on your Model
68
 
69
+ We are working on a comprehensive guide on how to evaluate your models on this benchmark.
70
+
71
+ Coming Soon...
72
 
73
 
74
  ## Citation Information