أرفق (موصى به) أو رابط إلى ملف PDF هنا:
dee752ed0f726d8785abf360ca783d91f96f9a2e.pdf
إعدادات:
خطوات إعادة إظهار المشكلة:
يُظهر pdftotext النص الصحيح:
in nit ris hington 1D C
boerge W lacan a pioneer of butali
and an influential man aw at richfield last walk
إنه يعمل في عارض PDF المدمج في Chrome ، لذا فهو لا يمثل مشكلة في ملف pdf.
ارتباط إلى عارض (إذا تمت استضافته على موقع بخلاف mozilla.github.io/pdf.js أو كملحق Firefox / Chrome):
https://newspapers.lib.utah.edu/pdfjs1.9/web/viewer.html؟file=/udn_files/de/e7/dee752ed0f726d8785abf360ca783d91f96f9a2e.pdf
أود العمل على هذا ،
timvandermeij الرجاء مساعدتي ، من أين أبدأ أثناء العمل على هذه المشكلة
أود أن أقترح التحقق أولاً مما لدينا في طبقة النص لأن ذلك قد يفسر سبب عدم نجاح البحث. أعتقد أن عامل الفضاء غير صحيح ؛ انظر: https://github.com/mozilla/pdf.js/blob/7bb066494f3f15c396941c3532b83da6d3465c6b/src/core/evaluator.js#L1303
هذا على الأرجح سبب العديد من مشكلات اختيار النص المفتوح الأخرى. ومع ذلك ، قد يكون تغيير القيمة عرضة للخطأ لملفات PDF الأخرى وقد يتطلب اختبارًا جيدًا. قد نحتاج إلى التحقق من كيفية قيام عارضين آخرين لملفات PDF مفتوحة المصدر (مثل Poppler) بذلك ، لأن المشكلة تكمن في أن مواصفات PDF لا تشير إلى متى يجب استخدام مسافة لتحديد النص. حددت فقط عرض التباعد بين الأحرف.
للأسف https://github.com/mozilla/pdf.js/issues/9736#issuecomment -390629834 لن يساعد هنا ، لأن هذا ملف ممسوح ضوئيًا حيث يتم وضع كل كلمة على حدة بأحجام خطوط مختلفة وإحداثيات x / y ؛ انظر على سبيل المثال بداية تدفق /Contents
:
1 G
1 g
1 0 0 1 52 1145.37 Tm
/F1 11 Tf
(UTAH)Tj
1 0 0 1 90 1146.36 Tm
/F1 11 Tf
(NEWS)Tj
1 0 0 1 29 1124.14 Tm
/F1 10 Tf
(the)Tj
1 0 0 1 44 1126.03 Tm
/F1 8 Tf
(oregon)Tj
1 0 0 1 71 1124.47 Tm
/F1 9 Tf
(short)Tj
1 0 0 1 92 1125.47 Tm
/F1 9 Tf
(line)Tj
...
مرحبًا يا شباب ، لأنك متأكد من أنك تدرك أن مشاريع عرض PDF الأخرى تعاني من هذا أيضًا. أستخدم حاليًا تطبيق ويب (Nextcloud) يستخدم pdf.js كعارض لملفات PDF لتطبيق المستعرض الخاص به.
فيما يلي مثال لملف عملت معه على أدوات مساعدة أخرى. هذا مقتطف ممسوح ضوئيًا من دليل خدمة الطيار الآلي للطائرة ، وقد طُبع في الأصل في السبعينيات على معدات غير معروفة.
CenturyIIB-Origscan.pdf
CenturyIIB-tesseract_hocr-uncleaned.pdf
CenturyIIB-tesseract_hocr-cleaned.pdf
الملف الأول هو المسح الأصلي بدون طبقة نصية. الثانية (hocr-uncleaned) هي ملف PDF / A تمت معالجته باستخدام Tesseract (الإصدار 4.0) لإنشاء طبقة نص مخفية. تم إلغاء الانحراف عن النسخة الثالثة (hocr-uncleaned) باستخدام
في كلتا الحالتين الثانية والثالثة ، تم استخدام خيار العرض "hocr" مع Tesseract لمرحلة عرض OCR (لدى Tesseract عارضون داخليون متعددون). إذا ألقيت نظرة على منتدى مشكلات Tesseract على github ، فسترى أنهم أجروا بعض التغييرات على أحدث عارض في محاولة لمعالجة هذه المشكلة أيضًا.
فيما يلي بعض المقتطفات التي تم نسخها / لصقها من أدوات مساعدة مختلفة ...
hocr-unceaned على Safari 11.1 (13605.1.33.1.4)
The Century IIB Autopilot is an "Open Loop" system which responds only to the dynamics of the aircraft in flight, thus the only ground checks that can be accomplished are functional checks as described in this bulletin.
hocr-uncleaned على Chrome 66.0.3359.181
The Century IIB Autopilot is an "Open Loop" system which responds only to the dynamics of the aircraft in flight, thus the only ground checks that can be accomplished are functional checks as described in this bulletin.
hocr-uncleaned على Adobe Acrobat Pro X
The Century IIB Autopilot is an "Open Loop" system which responds only to the
dynamics of the aircraft in flight, thus the only ground checks that can be
accomplished are functional checks as described in this bulletin.
hocr-uncleaned على pdf.js (Firefox 60.0.1)
Century
IIB
Autopilot
is
an
"Open Loop"
system
which
responds
only
to
the
dynamics
of
the
aircraft
in
flight,
thus
the
only
ground
checks
that
can
be
accomplished
are
functional
checks
as
described
in
this
bulletin.
hocr-cleaned على نفس الإصدار من Safari أعلاه
The Century IIB Autopilot is an "Open Loop’ system which responds only to the dynamics of the aircraft in flight, thus the only ground checks that can be accomplished are functional checks as described in this bulletin.
hocr-cleaned على نفس إصدار Chrome أعلاه
The Century IIB Autopilot is an "Open Loop’ system which responds only to the
dynamics of the aircraft in flight, thus the only ground checks that can be
accomplished are functional checks as described in this bulletin.
hocr على نفس الإصدار من Adobe Acrobat Pro أعلاه
The Century IIB Autopilot is an "Open Loop’ system which responds only to the
dynamics of the aircraft in flight, thus the only ground checks that can be
accomplished are functional checks as described in this bulletin.
hocr-cleaned على نفس الإصدار من pdf.js (Firefox) أعلاه
Century
IIB
Autopilot
is
an
"Open
Loop’
system
which
responds
only
to
the
dynamics
of
the
aircraft
in
flight,
thus
the
only
ground
checks
that
can
be
accomplished
are
functional
checks
as
described
in
this
bulletin.
لأي شخص قد يرغب في إعادة إنتاج سلسلة الأدوات الخاصة بي لملفات عينة أخرى ( main / _depedency _) ...
tesseract 4.00.00alpha (لـ OCR)
_leptonica 1.76.0
libjpeg-turbo 1.5.3.0 تحديث
libpng 1.6.34 + apng
libtiff 4.0.9_
unpaper 6.1 (لإزالة الانحراف ، وإزالة الضوضاء ، وما إلى ذلك)
_libav 12.1
opencv 2.4.13.1
freetype2 2.8_
qpdf 8.0.1 (للفحص / التعديل / إنشاء
_ghostscript 9.16_
OCRmyPDF 6.2.0 (غلاف python v3
كل ما سبق موجود فعليًا في أي حزمة repo مشتركة لنظام Linux ، و OCRmyPDF قيد الإعداد ، والبنى الحديثة لكل منهم موجودة في Homebrew لـ OSX أيضًا (يجب وضع علامة tesseract على git HEAD نظرًا لأن الإصدار 4.0 لا يزال يحمل علامة تجريبية) . لقد قمت أيضًا بتشغيلها جميعًا على FreeBSD (يجب إنشاء Tesseract و Leptonica و unpaper من المصدر). يعتبر Tesseract / Leptonica أساسًا رائعًا لاستخدامه في إنشاء ملفات الاختبار هذه ، في رأيي. لقد جلبوا OCR مفتوح المصدر إلى الأمام بسرعة فائقة. هنا مثال من مسح وثيقة القرن 18 أنه حتى يفعل وظيفة رائعة على، على الرغم من عدم معرفة ما لفترة طويلة هي وتدوين لهم في الصغيرة "و ل.
التعليق الأكثر فائدة
أود العمل على هذا ،
timvandermeij الرجاء مساعدتي ، من أين أبدأ أثناء العمل على هذه المشكلة