Pdf.js: ctrl + f๋กœ ๊ฒ€์ƒ‰ํ•˜๋ฉด ๋‘ ๋‹จ์–ด๊ฐ€ ์ž‘๋™ํ•˜์ง€ ์•Š์Šต๋‹ˆ๋‹ค

์— ๋งŒ๋“  2018๋…„ 05์›” 17์ผ  ยท  4์ฝ”๋ฉ˜ํŠธ  ยท  ์ถœ์ฒ˜: mozilla/pdf.js

์—ฌ๊ธฐ์— PDF ํŒŒ์ผ์„ ์ฒจ๋ถ€(๊ถŒ์žฅ)ํ•˜๊ฑฐ๋‚˜ ๋งํฌ:
dee752ed0f726d8785abf360ca783d91f96f9a2e.pdf

๊ตฌ์„ฑ:

  • ์›น ๋ธŒ๋ผ์šฐ์ € ๋ฐ ๋ฒ„์ „: Firefox 60/Chromium 66
  • ์šด์˜ ์ฒด์ œ ๋ฐ ๋ฒ„์ „: Linux/Windows 7
  • PDF.js ๋ฒ„์ „: v1.10.88 ๋˜๋Š” v1.9.426 ๋˜๋Š” Firefox 60์— ๋‚ด์žฅ๋œ ๋ฒ„์ „

๋ฌธ์ œ๋ฅผ ์žฌํ˜„ํ•˜๋Š” ๋‹จ๊ณ„:

  1. ctrl+f๋ฅผ ๋ˆ„๋ฅด๊ณ  "pioneer of"๋ฅผ ๊ฒ€์ƒ‰ํ•˜์‹ญ์‹œ์˜ค.
  2. ๊ฐœ์ฒ™์ž๊ฐ€ ๊ฐ•์กฐ ํ‘œ์‹œ๋˜์ง€๋งŒ ๊ณต๋ฐฑ์„ ์ž…๋ ฅํ•˜๋Š” ์ฆ‰์‹œ ๊ฒฐ๊ณผ๋ฅผ ์ฐพ์„ ์ˆ˜ ์—†์Šต๋‹ˆ๋‹ค.

pdftotext๋Š” ์˜ฌ๋ฐ”๋ฅธ ํ…์ŠคํŠธ๋ฅผ ๋ณด์—ฌ์ค๋‹ˆ๋‹ค.

in nit ris hington 1D C
boerge W lacan a pioneer of butali
and an influential man aw at richfield last walk

ํฌ๋กฌ์— ๋‚ด์žฅ๋œ PDF ๋ทฐ์–ด์—์„œ ์ž‘๋™ํ•˜๋ฏ€๋กœ 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

4-text-selection

๊ฐ€์žฅ ์œ ์šฉํ•œ ๋Œ“๊ธ€

์ด ์ž‘์—…์„ ํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค.
@timvandermeij ์ด ๋ฌธ์ œ๋ฅผ ํ•ด๊ฒฐํ•˜๋Š” ๋™์•ˆ ์–ด๋””์„œ๋ถ€ํ„ฐ ์‹œ์ž‘ํ•ด์•ผ ํ•˜๋Š”์ง€ ๋„์™€์ฃผ์„ธ์š”.

๋ชจ๋“  4 ๋Œ“๊ธ€

์ด ์ž‘์—…์„ ํ•˜๊ณ  ์‹ถ์Šต๋‹ˆ๋‹ค.
@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 ๋ Œ๋”๋ง ํ”„๋กœ์ ํŠธ์—์„œ๋„ ์ด ๋ฌธ์ œ๋ฅผ ๊ฒช๊ณ  ์žˆ๋‹ค๋Š” ๊ฒƒ์„ ์•Œ๊ณ  ๊ณ„์‹ค ๊ฒƒ์ž…๋‹ˆ๋‹ค. ์ €๋Š” ํ˜„์žฌ pdf.js๋ฅผ ๋ธŒ๋ผ์šฐ์ € ์• ํ”Œ๋ฆฌ์ผ€์ด์…˜์šฉ PDF ๋ Œ๋”๋Ÿฌ๋กœ ์‚ฌ์šฉํ•˜๋Š” ์›น ์•ฑ(Nextcloud)์„ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ๋‹ค๋ฅธ ์œ ํ‹ธ๋ฆฌํ‹ฐ์—์„œ ์ž‘์—…ํ•œ ํŒŒ์ผ์˜ ์˜ˆ์ž…๋‹ˆ๋‹ค. ์ด๊ฒƒ์€ ์›๋ž˜ ์•Œ ์ˆ˜ ์—†๋Š” ์žฅ๋น„์— 1970๋…„๋Œ€์— ์ธ์‡„๋œ ํ•ญ๊ณต๊ธฐ์˜ ์ž๋™ ์กฐ์ข… ์žฅ์น˜ ์„œ๋น„์Šค ๋งค๋‰ด์–ผ์—์„œ ์Šค์บ”ํ•œ ๋ฐœ์ทŒ๋ฌธ์ž…๋‹ˆ๋‹ค.

CenturyIIB-origscan.pdf
CenturyIIB-tesseract_hocr-uncleaned.pdf
CenturyIIB-tesseract_hocr-cleaned.pdf

์ฒซ ๋ฒˆ์งธ ํŒŒ์ผ์€ ํ…์ŠคํŠธ ๋ ˆ์ด์–ด๊ฐ€ ์—†๋Š” ์›๋ณธ ์Šค์บ”์ž…๋‹ˆ๋‹ค. ๋‘ ๋ฒˆ์งธ(hocr-uncleaned)๋Š” ์ˆจ๊ฒจ์ง„ ํ…์ŠคํŠธ ๋ ˆ์ด์–ด๋ฅผ ๋งŒ๋“ค๊ธฐ ์œ„ํ•ด Tesseract(v4.0) ๋กœ ์ฒ˜๋ฆฌ๋œ PDF/A์ž…๋‹ˆ๋‹ค. ์„ธ ๋ฒˆ์งธ(hocr-uncleaned)๋Š” unpaper(v6.1) ๋กœ ๊ธฐ์šธ๊ธฐ๋ฅผ ์ œ๊ฑฐํ•œ ๋‹ค์Œ ๋™์ผํ•œ ๋ฒ„์ „์˜ Tesseract๋กœ OCR ์ฒ˜๋ฆฌํ•˜๊ณ  PDF/A๋กœ๋„ ์ถœ๋ ฅํ•ฉ๋‹ˆ๋‹ค. ๋‘ PDF/A์˜ ๊ฒฝ์šฐ ์›๋ณธ ์Šค์บ”์ด ์ตœ์ข… ์ถœ๋ ฅ์„ ์œ„ํ•ด 300dpi jpeg๋กœ ์ฝ”๋“œ ๋ณ€ํ™˜๋˜์—ˆ์Šต๋‹ˆ๋‹ค.

๋‘ ๋ฒˆ์งธ ๋ฐ ์„ธ ๋ฒˆ์งธ ๊ฒฝ์šฐ ๋ชจ๋‘ Tesseract์˜ 'hocr' ๋ Œ๋”๋ง ์˜ต์…˜์ด OCR ๋ Œ๋”๋ง ๋‹จ๊ณ„์— ์‚ฌ์šฉ๋˜์—ˆ์Šต๋‹ˆ๋‹ค(Tesseract์—๋Š” ์—ฌ๋Ÿฌ ๋‚ด๋ถ€ ๋ Œ๋”๋Ÿฌ๊ฐ€ ์žˆ์Œ). github์—์„œ Tesseract์˜ ๋ฌธ์ œ ํฌ๋Ÿผ์„ ์‚ดํŽด๋ณด๋ฉด ์ด ๋ฌธ์ œ๋„ ํ•ด๊ฒฐํ•˜๊ธฐ ์œ„ํ•ด ์ตœ์‹  ๋ Œ๋”๋Ÿฌ๋ฅผ ์ผ๋ถ€ ๋ณ€๊ฒฝํ–ˆ์Œ์„ ์•Œ ์ˆ˜ ์žˆ์Šต๋‹ˆ๋‹ค.

๋‹ค์Œ์€ ๋‹ค์–‘ํ•œ ์œ ํ‹ธ๋ฆฌํ‹ฐ์—์„œ ๋ณต์‚ฌ/๋ถ™์—ฌ๋„ฃ๊ธฐํ•œ ์ผ๋ถ€ ๋ฐœ์ทŒ๋ฌธ์ž…๋‹ˆ๋‹ค...

Safari 11.1์—์„œ hocr-unlceaned(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.

Chrome 66.0.3359.181์—์„œ hocr-uncleaned

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.

Adobe Acrobat Pro X์—์„œ hocr-uncleaned

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.

pdf.js์—์„œ hocr-uncleaned(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.

์œ„์˜ ๋™์ผํ•œ Safari ๋ฒ„์ „์—์„œ hocr-cleaned

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.

์œ„์˜ ๋™์ผํ•œ Chrome ๋ฒ„์ „์—์„œ hocr-cleaned

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. 

์œ„์˜ Adobe Acrobat Pro์™€ ๋™์ผํ•œ ๋ฒ„์ „์—์„œ hocr-cleaned

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.

์œ„์˜ ๋™์ผํ•œ ๋ฒ„์ „์˜ pdf.js(Firefox)์—์„œ hocr-cleaned

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. 

๋‹ค๋ฅธ ์ƒ˜ํ”Œ ํŒŒ์ผ( ๋ฉ”์ธ /_depedency_)์— ๋Œ€ํ•ด ๋‚ด ํˆด์ฒด์ธ์„ ์žฌํ˜„ํ•˜๋ ค๋Š” ์‚ฌ๋žŒ์„ ์œ„ํ•ด...

tesseract 4.00.00alpha (OCR์šฉ)
_๋ ™ํ† ๋‹ˆ์นด 1.76.0
libjpeg-ํ„ฐ๋ณด 1.5.3
libpng 1.6.34+apng
๋ฆฌ๋ธŒํ‹ฐํ”„ 4.0.9_

unpaper 6.1 (๊ธฐ์šธ๊ธฐ ์ œ๊ฑฐ, ๋…ธ์ด์ฆˆ ์ œ๊ฑฐ ๋“ฑ)
_๋ฆฌ๋ฐ”๋ธŒ 12.1
opencv 2.4.13.1
์ž์œ ํ˜•2 2.8_

qpdf 8.0.1 (PDF์˜ ๊ฒ€์‚ฌ/์ˆ˜์ •/์ž‘์„ฑ์šฉ)
_๊ณ ์ŠคํŠธ์Šคํฌ๋ฆฝํŠธ 9.16_

OCRmyPDF 6.2.0 (์œ„ ์œ ํ‹ธ๋ฆฌํ‹ฐ์— ๋Œ€ํ•œ python v3 ๋ž˜ํผ)

์œ„์˜ ๋ชจ๋“  ๋‚ด์šฉ์€ ๊ฑฐ์˜ ๋ชจ๋“  ์ผ๋ฐ˜์ ์ธ Linux ํŒจํ‚ค์ง€ ์ €์žฅ์†Œ์— ์žˆ๊ณ  OCRmyPDF๋Š” pip์— ์žˆ์œผ๋ฉฐ ๋ชจ๋“  ์ตœ์‹  ๋นŒ๋“œ๋Š” OSX์šฉ Homebrew์—๋„ ์žˆ์Šต๋‹ˆ๋‹ค(v4.0์€ ์—ฌ์ „ํžˆ โ€‹โ€‹๋ฒ ํƒ€๋กœ ํ‘œ์‹œ๋˜์–ด ์žˆ์œผ๋ฏ€๋กœ tesseract๋Š” git HEAD์— ํƒœ๊ทธ๋ฅผ ์ง€์ •ํ•ด์•ผ ํ•จ) . ๋‚˜๋Š” ๋˜ํ•œ ๊ทธ๊ฒƒ๋“ค์„ ๋ชจ๋‘ FreeBSD์—์„œ ์‹คํ–‰ํ–ˆ์Šต๋‹ˆ๋‹ค(Tesseract, Leptonica ๋ฐ ์†Œ์Šค์—์„œ ์–ธํŽ˜์ดํผ๋ฅผ ๋นŒ๋“œํ•ด์•ผ ํ•จ). ๋‚ด ์ƒ๊ฐ์— Tesseract/Leptonica๋Š” ์ด๋Ÿฌํ•œ ํ…Œ์ŠคํŠธ ํŒŒ์ผ์„ ๋งŒ๋“œ๋Š” ๋ฐ ์‚ฌ์šฉํ•  ์ˆ˜ ์žˆ๋Š” ํ›Œ๋ฅญํ•œ ๊ธฐ์ค€์„ ์ž…๋‹ˆ๋‹ค. ๊ทธ๋“ค์€ ์˜คํ”ˆ ์†Œ์Šค OCR์„ ๋น„์•ฝ์ ์œผ๋กœ ๋ฐœ์ „์‹œ์ผฐ์Šต๋‹ˆ๋‹ค. ๋‹ค์Œ ์€ '๊ธด S'๊ฐ€ ๋ฌด์—‡์ธ์ง€ ๋ชจ๋ฅด๊ณ  ์†Œ๋ฌธ์ž 'f'๋กœ ํ‘œ๊ธฐํ–ˆ์Œ์—๋„ ๋ถˆ๊ตฌํ•˜๊ณ  ํ›Œ๋ฅญํ•œ ์ž‘์—…์„ ์ˆ˜ํ–‰ํ•˜๋Š” 18์„ธ๊ธฐ ๋ฌธ์„œ ์Šค์บ”์˜ ์˜ˆ์ž…๋‹ˆ๋‹ค.

์ด ํŽ˜์ด์ง€๊ฐ€ ๋„์›€์ด ๋˜์—ˆ๋‚˜์š”?
0 / 5 - 0 ๋“ฑ๊ธ‰