Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
Hegghammer committed Jun 23, 2021
0 parents commit b492699
Show file tree
Hide file tree
Showing 51,324 changed files with 2,078,538 additions and 0 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.Rproj.user
.Rhistory
.RData
.Ruserdata
18 changes: 18 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# An OCR Benchmarking Experiment

This repository holds replication materials for the manuscript "OCR with Tesseract, Amazon Textract, and Google Document AI: A Benchmarking Experiment". It contains:

- The .RMD file of the manuscript with R code for all the figures.
- 51,304 .TXT files with the text output from all the OCR processing requests.
- A .CSV file with word and character accuracy rates for all the OCR output.

The raw image test materials reside in a separate repository for space reasons.

From the abstract:

>This article reports a benchmarking experiment comparing the performance of Tesseract, Amazon Textract, and Google Document AI on images of English and Arabic text. English-language book scans (n=322) and Arabic-language article scans (n=100) were replicated 43 times with different types of artificial noise for a corpus of 18,568 documents, generating 51,304 process requests. Document AI delivered the best results, and the server-based processors (Textract and Document AI) were substantially more accurate than Tesseract, especially on noisy documents. Accuracy for English was considerably better than for Arabic.
Core results:
\
\
![](images/fig4.png)
Binary file added benchmarking_ms.pdf
Binary file not shown.
51,305 changes: 51,305 additions & 0 deletions data/ocr_benchmark_master.csv

Large diffs are not rendered by default.

Binary file added images/25223_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/4155_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/fig4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/g023.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_bin.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_blur.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_cropped.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_ink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_orig.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_scrib.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_snp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_weak.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/j020_wm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
647 changes: 647 additions & 0 deletions ms_rmd/benchmarking_ms.Rmd

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions noisy-ocr-benchmark.Rproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
Version: 1.0

RestoreWorkspace: Default
SaveWorkspace: Default
AlwaysSaveHistory: Default

EnableCodeIndexing: Yes
UseSpacesForTab: Yes
NumSpacesForTab: 2
Encoding: UTF-8

RnwWeave: Sweave
LaTeX: pdfLaTeX
17 changes: 17 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a006.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
When this book was written, the writer was
under the supposition then generally current that
the Armenian Massacres of April, 1909, in Cilicia
were instigated by Abdul Hamid and his Yildiz
Clique. Babikian Effendi, the Armenian deputy
who went to Adana from Constantinople to in-
vestigate into the massacres, plainly reported that
all investigations had failed to trace them to Abd-ul
Hamid and his Yildiz Clique. Babikian Effendi,
as was to be expected, died suddenly on his return
to Constantinople, but later on it became known
that the massacres of April, 1909, had been planned,
prepared, organized and carried into execution by
the Constitutional Government of what has been
called "Liberal Turks" or "Young Turks."
VE

30 changes: 30 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a013.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
WHY AND WHEREFORE.
In making a study of my race, I have found three marked characteristics
Intelligence Energy-Industry. Combined with these three characteristics
is an intense Love of Nationality. We live in a complex world. In an
independent people these characteristics and this sentiment are laudable
Virtues. In a subject people they are Crimes.
After I had laid this bitter Truth to heart, I did not have to seek for the
Why and Wherefore of the Armenian Massacres.
The Armenian Massacres stand without their parallel in history. The
human mind staggers to contemplate the fiendish orgies of which they have
been the victims, and no pen can describe their horrors and this helpless
christian people are to-day in the same deadly peril as they have been since
the famous Treaty of Berlin consigned them bound hand and foot to the
mercy of their executioners.
The Armenians may be led again "as sheep to the slaughter" and the
work of extermination may be completed—Jesus Christ was crucified on
Calvary and the servant is not greater than his Lord-but the work of their
extermination can only be completed when the evil influences in the Turkish
Empire have reached their culminating point. Hitherto the Powers of
Europe have by their jealousies and rivalries cultivated these evil influences,
they have watered them and made them grow, but when their culminating
point is reached, they must re-act on Christendom and the natural
consequence must follow. Those who sow the wind, must reap the whirl-
wind. It is in the natural order of things.
1 will allow that Liberty, Justice, Equality, Fraternity are the watchwords
of Young Turkey, but Young Turkey is only a small minority; the great
majority of the Turkish nation are not Young Turks.
The question therefore resolves itself into this critical point: "What will
Christendom do even now?”

50 changes: 50 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a014.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
BĪTLIS
NIGDEH
EV
BLACK
EBIZO N D
KARA
BULBURT
I A
E
SIVAS
PENZERUM
RUM
q+
NEYSHE
0⁰
IT
AKSERA
ESTAR
VAN
IS
IA'R B EKR
HADJIM
MARASH
MAOURET
DIARBEKR
TARSUSADANA
ASIA
AYA
ANTAB
BIREJIK
ALEXANDRETTA
ANTIOCH
ALEPPO
MOSU
MEDITERRANEOSEA
ABUD SAIDEH
SCENE OF THE MASSACRES IN ASIA MINOR.
The trouble began in Adana. An armed mob strengthened and augmented by soldiers
fell in overwhelming numbers upon the unarmed Christians. The Armenian population of
Antioch and vicinity were practically wiped out and the Armenian villages in the
Alexandretta district destroyed with immense loss of life. Hadjim, Kessab and the neigh-
bouring villages were burned. The Armenian quarter in Tarsus was ruined and ill-omened
Marash stained again with the blood of thousands of Armenians. Zeitoon was desolated. The
entire population of Kirikon between Aleppo and Alexandretta were massacred to the last
babe. The mob and the soldiers burned what they could not carry away, so that the material
loss has been enormous. In place of the former abundance and thriving industries there are
instead desolated provinces and the charred and blackened remains of pillaged and ruined
homes, and the residue of those who escaped massacre are reduced to homelessness and
starvation,

30 changes: 30 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a015.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
DISINTERESTED EVIDENCE.
66
I have thought it advisable to insert a few extracts from accounts of
the Massacres of April, 1909, given by disinterested witnesses.
We are having a perfectly hideous time here. Thousands have been murdered-25,000
in this province they say; but the number is probably greater, for every Christian village
was wiped out In Adana about 5000 have perished. After Turks and Armenians had
made peace, the Turks came in the night with hose and kerosene, and set fire to what remained
of the Armenian quarter. Next day the French and Armenian schools were fired. Nearly every-
one in the Armenian school perished, anybody trying to escape being shot down by thesoldiers."
"The Turkish Authorities do nothing except arrest unoffending Armenians, from whom
by torture they extort the most fanciful confessions. Even the wounded are not safe from
their injustice. A man was being carried in to me yesterday when he was seized and taken
off to gaol. I dare not think what his fate may be.
"For fiends incarnate commend me to the Turks. Nobody is safe from them. They
murder babies in front of their mothers; they half murder men, and violate the wives while
the husbands are lying there dying in pools of blood.”
"The authorities did nothing, and the soldiers were worse than the crowd, for they were
better armed. One house in our quarter was burned with 115 people inside. We counted
the bodies. The soldiers set fire to the door, and as the windows had iron bars, nobody
could get out. Everybody in the house was roasted alive. They were all women and
children and old people.”—Extract from letter of Mrs. Doughty-Wylie, wife of British Consul
at Adana ; published in the London “Daily Mail.”
961
IN THIS HOUSE 115 WOMEN AND CHILDREN WERE ROASTED ALIVE.
History repeats itself. In 1895 Turkish soldiers fell upon seventy to eighty young
women and girls in a church, where they had fled for refuge, and after hideously outraging
them, barricaded them in, setting fire to the building at the same time, and derisively shouting
to their victims as they were being roasted alive, to call upon their Christ to save them now

37 changes: 37 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a017.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
of blackened ruins, the stark walls of the churches and houses rising up out of the ashes and
charred timbers heaped on every side. What must it mean to the five thousand men and
women and little children who have survived a painful flight to the seacoast and have now
returned to their mountain home, only to find their houses sacked and burned! There were
nine Christian villages which elustered about Kessab in the valleys below. Several of these
have been completely destroyed by fire. All have been plundered and the helpless people
driven out or slain.”
“Can you imagine the feelings of the Kessab people as they climbed on foot the long trail
up the mountain, and then as they came over the ridge into full view of their charred and
ruined dwellings? Their stores of wheat, barley and rice had been burned ; clothing, cooking
utensils, furniture and tools had gone; their goats, cows and mules had been stolen; their silk
industries stamped out; their beloved churches reduced to smouldering heaps. The bodies of
their friends and relatives who had been killed had not been buried. And yet the love of
home is so strong that the people have settled down there with the determination to clear up
the debris and rebuild their houses.”—Extracts from "The Sack of Kessab," Stephen Van R.
Trowbridge.
As these sheets are going through the press there comes news of famine
at Zeitoon. The Rev. F. W. Macullum, American Missionary at Marash,
writes to the Rev. W. W. Peet, American Missionary at Constantinople, that
12,000 souls in and around Zeitoon are dying of hunger; they are wandering
about in rags, mixing bran and water, and cooking and eating it, if they can
get even that. Rev. Macullum adds, “The same story comes to us from all
sides. As we foresaw all along, from now on the distress will be greatest.
If 50,000 were massacred, the list of those who have died and are dying
of homelessness and starvation will exceed 150,000. It is true; and the
numbers are not exaggerated. Last year the people reaped no harvest, and
this year there are no sowings.
The latest news is that Mush, a prosperous Armenian village that had
escaped the desolation of the massacres, has been plundered in a night attack
by armed Kurds, and the villagers are now reduced to extreme distress. Before
the outbreak the Armenian patriarchal vicar at Mush had repeatedly appealed
to the Armenian Patriarch at Constantinople, and the Armenian Patriarch
had repeatedly appealed to the Authorities at Constantinople asking protec-
tion for the villagers of Mush as a Kurdish attack was apprehended. It is
evident that the authorities at Constantinople are unable to protect thriving
Armenian villages from Kurdish and Turkish raiders.

10 changes: 10 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a018.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
PREFACE TO 2ND PRINTING.
The first and second parts of this little book were written and printed
in pamphlet form for circulation in the United States, shortly after the
Adana Massacres of April, 1909. I have now thought it advisable to add
a Supplement of a short history of the Origin of the Armenians and the
Introduction and Revival of Christianity in Armenia.
The illustrations and the extracts from the periodicals “Harper's
Monthly," "The Wide World" and the "Cosmopolitan” have been added
to the 2nd printing.

36 changes: 36 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a019.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
INTRODUCTION
TO 2ND PRINTING.
My object in writing this little book is to lay the hard case of my un-
fortunate race before the men and women of the United States; since it is
from the United States that the American Missionaries have gone forth, who
have been the only helping influence from without for my suffering people in
Asiatic Turkey. To the earnest and devoted men and women of the
American Missions, we Armenians owe a debt of gratitude which we can
never repay.
If in the contents of the pages of this little book I have exaggerated
Facts by one whit or one iota, if I have deviated by one hair's breadth from
the Truth, I stand to be judged.
"God save us from another Adana, but the sword of Islam has not been
dulled" was one of the clarion notes sounded at the Sixth International
Convention of the Student Volunteer Movement, which was held at Rochester,
New York. The man who sounded that clarion note knew Islam, and
because knowing of my own knowledge that the sword of Islam has not been
dulled, I tremble lest its sharp edge fall once more on the neck of my help-
less race.
If I knew and felt sure in mine own heart that the sword of Islam
was dulled, I would be content to let bygones be bygones, and to hold my
peace and be silent for ever.
Like the sudden explosion of a volcano in the physical world, comes the
explosion of a Turkish Massacre of Armenians in the moral world. It comes
just in that way; the subterranean fires are always there, but all of a sudden
the sulphur flames of religious fanaticism burst, the lava floods of race hatred
and lust of plunder, break forth and run in fiery streams; the unfortunate
victims are pounced upon, swooped upon, pillaged, plundered, butchered,
slaughtered, subjected to outrages so hideous, cruel, loathsome, and revolt-
ing, that no pen could depict their horrible realities and the details can never
go into print. The human mind is staggered and asks itself the question if
even the imaginations of fiends and devils could originate such horrors.
Then this orgy of the human fiends is arrested. For the time being the
appetite for blood, lust, and plunder is satisfied; for the time being, the eye
is content with the scenes of havoc and desolation lying under the sun; the

41 changes: 41 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a020.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
10
smell of corpses is in the air, the odor from the carcases of the “christian
swine” reek in the nostrils of the Turk, he turns away, his jaws dripping with
blood, and rests to couch for a future spring. We have seen that sort of an
end to the tragedy of a tiger's victim: the tiger has eaten his fill, he rests,
to keep guard over the crunched bones and mangled bits of bloody flesh that
bestrew the earth. So also now there is a residue left of those that have
served as the meat and wine of this devil's feast; the demons have gorged
themselves over the banquet, and now there are left over the broken remains
of the banquet, the miserable residue homeless and destitute.
Civilized nations have received a temporary moral shock, like a shock
that spreads from the centre of an explosion; the electric vibration running
far and wide from the scene of the centre of devastation. There are among
these civilized nations generous and kind-hearted people who open their
purse strings; they give money to purchase shelter, food and clothing for
these homeless, naked and, hungry beggars, made homeless, naked and
hungry through no fault of their own. But oh! ye generous and kind heart-
ed people can any power under heaven assuage the heart anguish of this
miserable residue? Can they be made by any means of human comfort to
forget the black horrors or recover from the effects of the fires of the hideous
affliction through which they have passed? What is there left for a woman
who has seen with her own eyes the slaughter and heard with her own ears
the dying cry of her murdered child? even her reason must give way under
the stress of her anguish. All ye who are mothers, I appeal to you, for one
moment to put yourselves in the place of thousands of such mothers, in
whose hearts the same mother's love burns as in yours, and then measure
the depth of their agony.
Generous and kind hearted people who open your purse strings; would
to God I entreat, ye would raise up your voices and demand that this hideous
slaughter and oppression of a helpless christian race should cease. Would
to God I entreat, ye would raise up your voices and demand that this people
of an industrious, intelligent christian race, robust in mind and body, should
be let to live. Would to God I entreat, that ye would raise up your voices
and demand for them that security of life and property to which they are
entitled just as equally as all other peoples.
Public Sentiment has done great things in the world's history. Public
Sentiment liberated Greece, The Lebanon, The Balkan States from Turkish
Oppression. Slavery was abolished in the United States through Public
Sentiment but alas! does Public Sentiment sleep for this helpless Christian
race. Are they not God's creatures? have they not a right to live on God's

42 changes: 42 additions & 0 deletions ocr_output/old_books/01_col/dai/01_col_a021.tiff.pdf_dai.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
11
earth as other nations? Does Humanity,' does Christianity allow that tender
babes and children should be hideously and horribly mutilated and butchered
before the eyes of their mothers, or that the ears of mothers should be rent
with the cries of the dying agony of their murdered children ? Does
Humanity, does Christianity allow that helpless women should be forcibly
subjected to the most hideous, the most loathsome, the most revolting, and
the most cruel outrages? Does Humanity, does Christianity, allow all this?
Christian Governments have organized a Hague Conference of Peace
and Civilization, but they have. closed its doors to the cause of a bleeding
christian race groaning under the yoke of the cruellest oppressors that the
world has yet known. Christian men and women have held up their hands
in horror at the Indian Juggernauth; but alas! the political wheels of
Christian Governments have been a Greater Juggernauth for a helpless
christian race. It is by Christian Governments that “we are made as the
filth of the world, and as the offscouring of all things unto this day.” It is
as if the answer to our groanings had been made by Christian Governments
in just these words :
“We know that you have had frightful grievances, such as have been
beyond the measure of human endurance. We know that since the Treaty
of Berlin your history has been written in blood and tears, as the history of
no other nation has been written before or now. We know that your women
are subjected to the most revolting and hideous agonies, and your babes
and children hounded to hideous deaths. We know that the sum total of
your wrongs and sufferings is so great, that the cry of its anguish is piercing
the very heavens, but really, our political and commercial jealousies prevent;
and we each one of us being on the look out lest our separate political and
commercial interests in the Empire of your oppressors be endangered, can-
not regard you. It may be the deadliest scandal of Christendom that we
Christian Powers should be all gathered together, one against another, in the
Empire of your Oppressors, as eagles gather together round a carcase; but
really there is no help for it; and if you must die hideously by a hellish
extermination, why then you must die, and we have to condone your
hellish
extermination, for in any case, each one of us must secure his own political
and commercial interests in this same Empire of your Oppressors.'
In "Transcaucasia and Ararat," published by Mr. James Bryce in 1876,
there occurs in the chapter entitled “Some Political Reflections” the follow-
ing passage :
"The attention of the West was so much drawn towards Herzegovina
and Bulgaria by the events of 1876 that the miseries of the Asiatic subjects

Loading

0 comments on commit b492699

Please sign in to comment.