isbn 1.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (291) hide show
  1. data/.gitignore +4 -0
  2. data/README +9 -0
  3. data/Rakefile +13 -0
  4. data/VERSION +1 -0
  5. data/isbn.gemspec +329 -0
  6. data/lib/isbn.rb +90 -0
  7. data/src/gocr-0.48/.cvsignore +6 -0
  8. data/src/gocr-0.48/AUTHORS +7 -0
  9. data/src/gocr-0.48/BUGS +55 -0
  10. data/src/gocr-0.48/CREDITS +17 -0
  11. data/src/gocr-0.48/HISTORY +243 -0
  12. data/src/gocr-0.48/INSTALL +83 -0
  13. data/src/gocr-0.48/Makefile +193 -0
  14. data/src/gocr-0.48/Makefile.in +193 -0
  15. data/src/gocr-0.48/README +165 -0
  16. data/src/gocr-0.48/READMEde.txt +80 -0
  17. data/src/gocr-0.48/REMARK.txt +18 -0
  18. data/src/gocr-0.48/REVIEW +538 -0
  19. data/src/gocr-0.48/TODO +65 -0
  20. data/src/gocr-0.48/bin/.cvsignore +2 -0
  21. data/src/gocr-0.48/bin/create_db +38 -0
  22. data/src/gocr-0.48/bin/gocr.tcl +527 -0
  23. data/src/gocr-0.48/bin/gocr_chk.sh +44 -0
  24. data/src/gocr-0.48/configure +4689 -0
  25. data/src/gocr-0.48/configure.in +71 -0
  26. data/src/gocr-0.48/doc/.#Makefile.1.6 +39 -0
  27. data/src/gocr-0.48/doc/.cvsignore +2 -0
  28. data/src/gocr-0.48/doc/Makefile +39 -0
  29. data/src/gocr-0.48/doc/Makefile.in +39 -0
  30. data/src/gocr-0.48/doc/example.dtd +53 -0
  31. data/src/gocr-0.48/doc/example.xml +21 -0
  32. data/src/gocr-0.48/doc/examples.txt +67 -0
  33. data/src/gocr-0.48/doc/gocr.html +578 -0
  34. data/src/gocr-0.48/doc/unicode.txt +57 -0
  35. data/src/gocr-0.48/examples/.#Makefile.1.22 +166 -0
  36. data/src/gocr-0.48/examples/4x6.png +0 -0
  37. data/src/gocr-0.48/examples/4x6.txt +2 -0
  38. data/src/gocr-0.48/examples/5x7.png +0 -0
  39. data/src/gocr-0.48/examples/5x7.png.txt +2 -0
  40. data/src/gocr-0.48/examples/5x8.png +0 -0
  41. data/src/gocr-0.48/examples/5x8.png.txt +2 -0
  42. data/src/gocr-0.48/examples/Makefile +166 -0
  43. data/src/gocr-0.48/examples/color.fig +20 -0
  44. data/src/gocr-0.48/examples/ex.fig +16 -0
  45. data/src/gocr-0.48/examples/font.tex +22 -0
  46. data/src/gocr-0.48/examples/font1.tex +46 -0
  47. data/src/gocr-0.48/examples/font2.fig +27 -0
  48. data/src/gocr-0.48/examples/font_nw.tex +24 -0
  49. data/src/gocr-0.48/examples/handwrt1.jpg +0 -0
  50. data/src/gocr-0.48/examples/handwrt1.txt +10 -0
  51. data/src/gocr-0.48/examples/inverse.fig +20 -0
  52. data/src/gocr-0.48/examples/matrix.jpg +0 -0
  53. data/src/gocr-0.48/examples/ocr-a-subset.png +0 -0
  54. data/src/gocr-0.48/examples/ocr-a-subset.png.txt +4 -0
  55. data/src/gocr-0.48/examples/ocr-a.png +0 -0
  56. data/src/gocr-0.48/examples/ocr-a.txt +6 -0
  57. data/src/gocr-0.48/examples/ocr-b.png +0 -0
  58. data/src/gocr-0.48/examples/ocr-b.png.txt +4 -0
  59. data/src/gocr-0.48/examples/polish.tex +28 -0
  60. data/src/gocr-0.48/examples/rotate45.fig +14 -0
  61. data/src/gocr-0.48/examples/score +36 -0
  62. data/src/gocr-0.48/examples/text.tex +28 -0
  63. data/src/gocr-0.48/gocr.spec +143 -0
  64. data/src/gocr-0.48/gpl.html +537 -0
  65. data/src/gocr-0.48/include/.cvsignore +2 -0
  66. data/src/gocr-0.48/include/config.h +36 -0
  67. data/src/gocr-0.48/include/config.h.in +36 -0
  68. data/src/gocr-0.48/include/version.h +2 -0
  69. data/src/gocr-0.48/install-sh +3 -0
  70. data/src/gocr-0.48/make.bat +57 -0
  71. data/src/gocr-0.48/man/.cvsignore +2 -0
  72. data/src/gocr-0.48/man/Makefile +29 -0
  73. data/src/gocr-0.48/man/Makefile.in +29 -0
  74. data/src/gocr-0.48/man/man1/gocr.1 +166 -0
  75. data/src/gocr-0.48/src/.cvsignore +4 -0
  76. data/src/gocr-0.48/src/Makefile +132 -0
  77. data/src/gocr-0.48/src/Makefile.in +132 -0
  78. data/src/gocr-0.48/src/amiga.h +31 -0
  79. data/src/gocr-0.48/src/barcode.c +846 -0
  80. data/src/gocr-0.48/src/barcode.c.orig +593 -0
  81. data/src/gocr-0.48/src/barcode.h +11 -0
  82. data/src/gocr-0.48/src/box.c +372 -0
  83. data/src/gocr-0.48/src/database.c +462 -0
  84. data/src/gocr-0.48/src/detect.c +943 -0
  85. data/src/gocr-0.48/src/gocr.c +373 -0
  86. data/src/gocr-0.48/src/gocr.h +288 -0
  87. data/src/gocr-0.48/src/jconv.c +168 -0
  88. data/src/gocr-0.48/src/job.c +84 -0
  89. data/src/gocr-0.48/src/lines.c +350 -0
  90. data/src/gocr-0.48/src/list.c +334 -0
  91. data/src/gocr-0.48/src/list.h +90 -0
  92. data/src/gocr-0.48/src/ocr0.c +6756 -0
  93. data/src/gocr-0.48/src/ocr0.h +63 -0
  94. data/src/gocr-0.48/src/ocr0n.c +1475 -0
  95. data/src/gocr-0.48/src/ocr1.c +85 -0
  96. data/src/gocr-0.48/src/ocr1.h +3 -0
  97. data/src/gocr-0.48/src/otsu.c +289 -0
  98. data/src/gocr-0.48/src/otsu.h +23 -0
  99. data/src/gocr-0.48/src/output.c +289 -0
  100. data/src/gocr-0.48/src/output.h +37 -0
  101. data/src/gocr-0.48/src/pcx.c +153 -0
  102. data/src/gocr-0.48/src/pcx.h +9 -0
  103. data/src/gocr-0.48/src/pgm2asc.c +2893 -0
  104. data/src/gocr-0.48/src/pgm2asc.h +105 -0
  105. data/src/gocr-0.48/src/pixel.c +537 -0
  106. data/src/gocr-0.48/src/pnm.c +533 -0
  107. data/src/gocr-0.48/src/pnm.h +35 -0
  108. data/src/gocr-0.48/src/progress.c +87 -0
  109. data/src/gocr-0.48/src/progress.h +42 -0
  110. data/src/gocr-0.48/src/remove.c +703 -0
  111. data/src/gocr-0.48/src/tga.c +87 -0
  112. data/src/gocr-0.48/src/tga.h +6 -0
  113. data/src/gocr-0.48/src/unicode.c +1314 -0
  114. data/src/gocr-0.48/src/unicode.h +1257 -0
  115. data/src/jpeg-7/Makefile.am +133 -0
  116. data/src/jpeg-7/Makefile.in +1089 -0
  117. data/src/jpeg-7/README +322 -0
  118. data/src/jpeg-7/aclocal.m4 +8990 -0
  119. data/src/jpeg-7/ansi2knr.1 +36 -0
  120. data/src/jpeg-7/ansi2knr.c +739 -0
  121. data/src/jpeg-7/cderror.h +132 -0
  122. data/src/jpeg-7/cdjpeg.c +181 -0
  123. data/src/jpeg-7/cdjpeg.h +187 -0
  124. data/src/jpeg-7/change.log +270 -0
  125. data/src/jpeg-7/cjpeg.1 +325 -0
  126. data/src/jpeg-7/cjpeg.c +616 -0
  127. data/src/jpeg-7/ckconfig.c +402 -0
  128. data/src/jpeg-7/coderules.txt +118 -0
  129. data/src/jpeg-7/config.guess +1561 -0
  130. data/src/jpeg-7/config.sub +1686 -0
  131. data/src/jpeg-7/configure +17139 -0
  132. data/src/jpeg-7/configure.ac +317 -0
  133. data/src/jpeg-7/depcomp +630 -0
  134. data/src/jpeg-7/djpeg.1 +251 -0
  135. data/src/jpeg-7/djpeg.c +617 -0
  136. data/src/jpeg-7/example.c +433 -0
  137. data/src/jpeg-7/filelist.txt +215 -0
  138. data/src/jpeg-7/install-sh +520 -0
  139. data/src/jpeg-7/install.txt +1097 -0
  140. data/src/jpeg-7/jaricom.c +148 -0
  141. data/src/jpeg-7/jcapimin.c +282 -0
  142. data/src/jpeg-7/jcapistd.c +161 -0
  143. data/src/jpeg-7/jcarith.c +921 -0
  144. data/src/jpeg-7/jccoefct.c +453 -0
  145. data/src/jpeg-7/jccolor.c +459 -0
  146. data/src/jpeg-7/jcdctmgr.c +482 -0
  147. data/src/jpeg-7/jchuff.c +1612 -0
  148. data/src/jpeg-7/jcinit.c +65 -0
  149. data/src/jpeg-7/jcmainct.c +293 -0
  150. data/src/jpeg-7/jcmarker.c +667 -0
  151. data/src/jpeg-7/jcmaster.c +770 -0
  152. data/src/jpeg-7/jcomapi.c +106 -0
  153. data/src/jpeg-7/jconfig.bcc +48 -0
  154. data/src/jpeg-7/jconfig.cfg +45 -0
  155. data/src/jpeg-7/jconfig.dj +38 -0
  156. data/src/jpeg-7/jconfig.mac +43 -0
  157. data/src/jpeg-7/jconfig.manx +43 -0
  158. data/src/jpeg-7/jconfig.mc6 +52 -0
  159. data/src/jpeg-7/jconfig.sas +43 -0
  160. data/src/jpeg-7/jconfig.st +42 -0
  161. data/src/jpeg-7/jconfig.txt +155 -0
  162. data/src/jpeg-7/jconfig.vc +45 -0
  163. data/src/jpeg-7/jconfig.vms +37 -0
  164. data/src/jpeg-7/jconfig.wat +38 -0
  165. data/src/jpeg-7/jcparam.c +632 -0
  166. data/src/jpeg-7/jcprepct.c +358 -0
  167. data/src/jpeg-7/jcsample.c +545 -0
  168. data/src/jpeg-7/jctrans.c +381 -0
  169. data/src/jpeg-7/jdapimin.c +396 -0
  170. data/src/jpeg-7/jdapistd.c +275 -0
  171. data/src/jpeg-7/jdarith.c +762 -0
  172. data/src/jpeg-7/jdatadst.c +151 -0
  173. data/src/jpeg-7/jdatasrc.c +212 -0
  174. data/src/jpeg-7/jdcoefct.c +736 -0
  175. data/src/jpeg-7/jdcolor.c +396 -0
  176. data/src/jpeg-7/jdct.h +393 -0
  177. data/src/jpeg-7/jddctmgr.c +382 -0
  178. data/src/jpeg-7/jdhuff.c +1309 -0
  179. data/src/jpeg-7/jdinput.c +384 -0
  180. data/src/jpeg-7/jdmainct.c +512 -0
  181. data/src/jpeg-7/jdmarker.c +1360 -0
  182. data/src/jpeg-7/jdmaster.c +663 -0
  183. data/src/jpeg-7/jdmerge.c +400 -0
  184. data/src/jpeg-7/jdpostct.c +290 -0
  185. data/src/jpeg-7/jdsample.c +361 -0
  186. data/src/jpeg-7/jdtrans.c +136 -0
  187. data/src/jpeg-7/jerror.c +252 -0
  188. data/src/jpeg-7/jerror.h +304 -0
  189. data/src/jpeg-7/jfdctflt.c +174 -0
  190. data/src/jpeg-7/jfdctfst.c +230 -0
  191. data/src/jpeg-7/jfdctint.c +4348 -0
  192. data/src/jpeg-7/jidctflt.c +242 -0
  193. data/src/jpeg-7/jidctfst.c +368 -0
  194. data/src/jpeg-7/jidctint.c +5137 -0
  195. data/src/jpeg-7/jinclude.h +91 -0
  196. data/src/jpeg-7/jmemansi.c +167 -0
  197. data/src/jpeg-7/jmemdos.c +638 -0
  198. data/src/jpeg-7/jmemdosa.asm +379 -0
  199. data/src/jpeg-7/jmemmac.c +289 -0
  200. data/src/jpeg-7/jmemmgr.c +1118 -0
  201. data/src/jpeg-7/jmemname.c +276 -0
  202. data/src/jpeg-7/jmemnobs.c +109 -0
  203. data/src/jpeg-7/jmemsys.h +198 -0
  204. data/src/jpeg-7/jmorecfg.h +369 -0
  205. data/src/jpeg-7/jpegint.h +395 -0
  206. data/src/jpeg-7/jpeglib.h +1135 -0
  207. data/src/jpeg-7/jpegtran.1 +272 -0
  208. data/src/jpeg-7/jpegtran.c +546 -0
  209. data/src/jpeg-7/jquant1.c +856 -0
  210. data/src/jpeg-7/jquant2.c +1310 -0
  211. data/src/jpeg-7/jutils.c +179 -0
  212. data/src/jpeg-7/jversion.h +14 -0
  213. data/src/jpeg-7/libjpeg.map +4 -0
  214. data/src/jpeg-7/libjpeg.txt +3067 -0
  215. data/src/jpeg-7/ltmain.sh +8406 -0
  216. data/src/jpeg-7/makcjpeg.st +36 -0
  217. data/src/jpeg-7/makdjpeg.st +36 -0
  218. data/src/jpeg-7/makeadsw.vc6 +77 -0
  219. data/src/jpeg-7/makeasln.vc9 +33 -0
  220. data/src/jpeg-7/makecdep.vc6 +82 -0
  221. data/src/jpeg-7/makecdsp.vc6 +130 -0
  222. data/src/jpeg-7/makecmak.vc6 +159 -0
  223. data/src/jpeg-7/makecvcp.vc9 +186 -0
  224. data/src/jpeg-7/makeddep.vc6 +82 -0
  225. data/src/jpeg-7/makeddsp.vc6 +130 -0
  226. data/src/jpeg-7/makedmak.vc6 +159 -0
  227. data/src/jpeg-7/makedvcp.vc9 +186 -0
  228. data/src/jpeg-7/makefile.ansi +220 -0
  229. data/src/jpeg-7/makefile.bcc +291 -0
  230. data/src/jpeg-7/makefile.dj +226 -0
  231. data/src/jpeg-7/makefile.manx +220 -0
  232. data/src/jpeg-7/makefile.mc6 +255 -0
  233. data/src/jpeg-7/makefile.mms +224 -0
  234. data/src/jpeg-7/makefile.sas +258 -0
  235. data/src/jpeg-7/makefile.unix +234 -0
  236. data/src/jpeg-7/makefile.vc +217 -0
  237. data/src/jpeg-7/makefile.vms +142 -0
  238. data/src/jpeg-7/makefile.wat +239 -0
  239. data/src/jpeg-7/makejdep.vc6 +423 -0
  240. data/src/jpeg-7/makejdsp.vc6 +285 -0
  241. data/src/jpeg-7/makejdsw.vc6 +29 -0
  242. data/src/jpeg-7/makejmak.vc6 +425 -0
  243. data/src/jpeg-7/makejsln.vc9 +17 -0
  244. data/src/jpeg-7/makejvcp.vc9 +328 -0
  245. data/src/jpeg-7/makeproj.mac +213 -0
  246. data/src/jpeg-7/makerdep.vc6 +6 -0
  247. data/src/jpeg-7/makerdsp.vc6 +78 -0
  248. data/src/jpeg-7/makermak.vc6 +110 -0
  249. data/src/jpeg-7/makervcp.vc9 +133 -0
  250. data/src/jpeg-7/maketdep.vc6 +43 -0
  251. data/src/jpeg-7/maketdsp.vc6 +122 -0
  252. data/src/jpeg-7/maketmak.vc6 +131 -0
  253. data/src/jpeg-7/maketvcp.vc9 +178 -0
  254. data/src/jpeg-7/makewdep.vc6 +6 -0
  255. data/src/jpeg-7/makewdsp.vc6 +78 -0
  256. data/src/jpeg-7/makewmak.vc6 +110 -0
  257. data/src/jpeg-7/makewvcp.vc9 +133 -0
  258. data/src/jpeg-7/makljpeg.st +68 -0
  259. data/src/jpeg-7/maktjpeg.st +30 -0
  260. data/src/jpeg-7/makvms.opt +4 -0
  261. data/src/jpeg-7/missing +376 -0
  262. data/src/jpeg-7/rdbmp.c +439 -0
  263. data/src/jpeg-7/rdcolmap.c +253 -0
  264. data/src/jpeg-7/rdgif.c +38 -0
  265. data/src/jpeg-7/rdjpgcom.1 +63 -0
  266. data/src/jpeg-7/rdjpgcom.c +515 -0
  267. data/src/jpeg-7/rdppm.c +459 -0
  268. data/src/jpeg-7/rdrle.c +387 -0
  269. data/src/jpeg-7/rdswitch.c +365 -0
  270. data/src/jpeg-7/rdtarga.c +500 -0
  271. data/src/jpeg-7/structure.txt +945 -0
  272. data/src/jpeg-7/testimg.bmp +0 -0
  273. data/src/jpeg-7/testimg.jpg +0 -0
  274. data/src/jpeg-7/testimg.ppm +4 -0
  275. data/src/jpeg-7/testimgp.jpg +0 -0
  276. data/src/jpeg-7/testorig.jpg +0 -0
  277. data/src/jpeg-7/testprog.jpg +0 -0
  278. data/src/jpeg-7/transupp.c +1533 -0
  279. data/src/jpeg-7/transupp.h +205 -0
  280. data/src/jpeg-7/usage.txt +605 -0
  281. data/src/jpeg-7/wizard.txt +211 -0
  282. data/src/jpeg-7/wrbmp.c +442 -0
  283. data/src/jpeg-7/wrgif.c +399 -0
  284. data/src/jpeg-7/wrjpgcom.1 +103 -0
  285. data/src/jpeg-7/wrjpgcom.c +583 -0
  286. data/src/jpeg-7/wrppm.c +269 -0
  287. data/src/jpeg-7/wrrle.c +305 -0
  288. data/src/jpeg-7/wrtarga.c +253 -0
  289. data/test/isbn_test.rb +7 -0
  290. data/test/test_helper.rb +7 -0
  291. metadata +345 -0
@@ -0,0 +1,22 @@
1
+ % test font converted to pgm file for testing OCR software
2
+ \documentstyle[german,12pt]{article}
3
+ \topmargin=-25mm \textheight=140mm
4
+ \oddsidemargin=-10mm \evensidemargin=-10mm \textwidth=160mm
5
+ \parindent0mm \pagestyle{empty}
6
+ %\renewcommand{\baselinestretch}{2.0}
7
+ \begin{document}
8
+ \def\f{
9
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
10
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u\'a\`a \3 (01234 56789) $<>$ \&\$
11
+ }
12
+ 12pt TeX-font - generated for OCR testing - Mai99 JS
13
+ \\ \rm Roman \tt Typewriter \it Italic \bf Bold-Face
14
+ \sl Slanted \sc Small-Caps \sf Sans-Serif
15
+ \rm \f
16
+ \tt \f
17
+ \it \f
18
+ \bf \f
19
+ \sl \f
20
+ \sc \f
21
+ \sf \f
22
+ \end{document}
@@ -0,0 +1,46 @@
1
+ % Testfonts zur Konvertierung in PGM fuer OCR-Software
2
+ \documentstyle[german,12pt]{article}
3
+ %\input{layout.sty}
4
+ % a4.tex=210*297
5
+ % a3.tex=297*420
6
+ %\topmargin=-12mm \textheight=236mm % new:410-2*27=236
7
+ %\oddsidemargin=-11mm \evensidemargin=-11mm
8
+ %\textwidth=138mm % default:138mm new:296-2*27=242
9
+ \topmargin=-25mm \textheight=140mm % new:410-2*27=236
10
+ \oddsidemargin=-10mm \evensidemargin=-10mm
11
+ \textwidth=160mm % default:138mm new:296-2*27=242
12
+
13
+ \setlength{\parskip}{1.5ex plus0.5ex minus 0.5ex} % elastischer Absatz
14
+ \parindent0mm
15
+
16
+ %\pagestyle{plain}
17
+ \pagestyle{empty}
18
+ \renewcommand{\arraystretch}{1.5} % zeilenabstand von arrays
19
+ %\renewcommand{\baselinestretch}{2.0}
20
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%M
21
+ \begin{document}
22
+ 12pt TeX-font - generated for OCR testing - Mai99 JS
23
+ \\ \rm Roman \tt Typewriter \it Italic \bf Bold-Face
24
+ \sl Slanted \sc Small-Caps \sf Sans-Serif
25
+ \rm %\\ Roman:
26
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
27
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
28
+ \tt %\\ \tt Typewriter:
29
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
30
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
31
+ \it %\\ \it Italic:
32
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
33
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
34
+ \bf %\\ \bf Bold Face:
35
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
36
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
37
+ \sl %\\ \sl Slanted:
38
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
39
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
40
+ \sc %\\ \sc Small Caps:
41
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
42
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
43
+ \sf %\\ \sf Sans Serif:
44
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U. !?-+=/ '' `` ft ff
45
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u \3 (01234 56789) $<>$ \&\$
46
+ \end{document}
@@ -0,0 +1,27 @@
1
+ #FIG 3.2
2
+ Landscape
3
+ Center
4
+ Metric
5
+ A4
6
+ 100.00
7
+ Single
8
+ -2
9
+ 1200 2
10
+ 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
11
+ 360 225 585 225
12
+ 2 1 0 1 0 7 100 0 -1 0.000 0 0 -1 0 0 2
13
+ 6120 3825 6300 3825
14
+ 4 0 0 100 0 0 12 0.0000 4 180 5445 450 495 Xfig-font - generated for OCR testing - Mai2001 JS using fig2dev -L png\001
15
+ 4 0 0 100 0 0 12 0.0000 4 210 4620 450 720 ABCDEF abcdef, MNOPQR mnopq XYZ\304\305\306\326\334. !?-+=/ " '' ft ff\001
16
+ 4 0 0 100 0 16 12 0.0000 4 180 4620 450 1170 ABCDEF abcdef, MNOPQR mnopq XYZ. !?-+=/ " '' ft ff\001
17
+ 4 0 0 100 0 16 12 0.0000 4 180 4695 450 1395 GHIJKL ghijkl; STUVWr stuvw xyz (01234 56789) <> &$\001
18
+ 4 0 0 100 0 12 12 0.0000 4 180 5250 450 1665 ABCDEF abcdef, MNOPQR mnopq XYZ. !?-+=/ " '' ft ff\001
19
+ 4 0 0 100 0 12 12 0.0000 4 180 5355 450 1890 GHIJKL ghijkl; STUVWr stuvw xyz (01234 56789) <> &$\001
20
+ 4 0 0 100 0 1 12 0.0000 4 180 4200 450 2160 ABCDEF abcdef, MNOPQR mnopq XYZ. !?-+=/ " '' ft ff\001
21
+ 4 0 0 100 0 1 12 0.0000 4 195 4290 450 2385 GHIJKL ghijkl; STUVWr stuvw xyz (01234 56789) <> &$\001
22
+ 4 0 0 100 0 24 12 0.0000 4 180 4605 450 2655 ABCDEF abcdef, MNOPQR mnopq XYZ. !?-+=/ " '' ft ff\001
23
+ 4 0 0 100 0 24 12 0.0000 4 195 4725 450 2880 GHIJKL ghijkl; STUVWr stuvw xyz (01234 56789) <> &$\001
24
+ 4 0 0 100 0 28 12 0.0000 4 165 4635 450 3195 ABCDEF abcdef, MNOPQR mnopq XYZ. !?-+=/ " '' ft ff\001
25
+ 4 0 0 100 0 28 12 0.0000 4 165 4845 450 3420 GHIJKL ghijkl; STUVWr stuvw xyz (01234 56789) <> &$\001
26
+ 4 0 0 100 0 0 12 0.0000 4 225 3615 450 3690 Special chars: \340\341\342\343\344\345\346\347\300\305\306 \337 &$#% \370\330\253\273\242\265\001
27
+ 4 0 0 100 0 0 12 0.0000 4 195 4410 450 945 GHIJKL ghijkl; STUVWr stuvw xyz (01234 56789) <> &$\001
@@ -0,0 +1,24 @@
1
+ % test font converted to pgm file for testing OCR software
2
+ \documentclass[12pt]{article}
3
+ \usepackage{german}
4
+ \topmargin=-25mm \textheight=140mm
5
+ \oddsidemargin=-10mm \evensidemargin=-10mm \textwidth=160mm
6
+ \parindent0mm \pagestyle{empty}
7
+ %\renewcommand{\baselinestretch}{2.0}
8
+ \begin{document}
9
+ \def\f{
10
+ \\ ABCDEF abcdef, MNOPQR mnopq XYZ"A"O"U{\AE}{\O}{\AA}. !?-+=/ '' `` ft ff
11
+ \\ GHIJKL ghijkl; STUVWr stuvw xyz"a"o"u{\ae}{\o}{\aa}\'a\`a \3 (01234 56789) $<>$ \&\$
12
+ }
13
+ 12pt TeX-font - generated for OCR testing - Mai99 JSi\\
14
+ (Norwegian character added Sept01)\\
15
+ \\ \rm Roman \tt Typewriter \it Italic \bf Bold-Face
16
+ \sl Slanted \sc Small-Caps \sf Sans-Serif
17
+ \rm \f
18
+ \tt \f
19
+ \it \f
20
+ \bf \f
21
+ \sl \f
22
+ \sc \f
23
+ \sf \f
24
+ \end{document}
Binary file
@@ -0,0 +1,10 @@
1
+
2
+ cs=GrayLevel=90..104..120 should work
3
+ cs=104: 84 boxes = 53 chars + 20 holes + 3 miniholes + 4 dots_above + 4 dust
4
+ 1 white pixel
5
+
6
+ <text>
7
+ This is a handwritten
8
+ example for GOCR.
9
+ Write as good as you can.
10
+ </text>
@@ -0,0 +1,20 @@
1
+ #FIG 3.2
2
+ Landscape
3
+ Center
4
+ Metric
5
+ A4
6
+ 100.00
7
+ Single
8
+ -2
9
+ 1200 2
10
+ 2 2 0 1 0 0 70 0 20 0.000 0 0 -1 0 0 5
11
+ 900 450 4500 450 4500 3150 900 3150 900 450
12
+ 2 2 0 1 7 7 60 0 20 0.000 0 0 -1 0 0 5
13
+ 1125 2880 4365 2880 4365 1485 1125 1485 1125 2880
14
+ 2 2 0 1 0 0 55 0 20 0.000 0 0 -1 0 0 5
15
+ 2475 2700 4185 2700 4185 1935 2475 1935 2475 2700
16
+ 4 0 7 50 0 0 20 0.0000 4 210 3090 1170 1080 Inner-1 Times-Roman 20\001
17
+ 4 0 0 50 0 0 20 0.0000 4 225 2685 1305 1800 This is a box in a box.\001
18
+ 4 0 0 50 0 0 20 0.0000 4 255 720 1350 2160 step 2\001
19
+ 4 0 7 50 0 0 20 0.0000 4 270 1245 2700 2385 step 3 box\001
20
+ 4 0 0 60 0 16 20 0.0000 4 225 2475 990 360 outer text Helvetica 20\001
Binary file
@@ -0,0 +1,4 @@
1
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ
2
+ abcdefghijklmnopqrstuvwxyz
3
+ 1234567890 !"$%&/()=?\{}[]
4
+ +*#'<>,;.:-
Binary file
@@ -0,0 +1,6 @@
1
+ # OCR-A-Font: monospaced 10x16 x-centered on 15..16x29 m=0,+4,+12,+4
2
+ #
3
+ ABCDEFGHIJKLMNOPQRSTUVWXYZ
4
+ abcdefghijklmnopqrstuvwxyz
5
+ 1234567890 !"$%&/()=?\{}[]
6
+ +*#'<>,;.:- S_Y_
Binary file
@@ -0,0 +1,4 @@
1
+ ABCDEFGHIJKLMNOPQRSTUVWXYZÄÖÜ
2
+ abcdefghijklmnopqrstuvwxyzäöüß
3
+ 1234567890 !"$%&/()=?\{}[]+*#'
4
+ <>,;.:-_
@@ -0,0 +1,28 @@
1
+ \documentclass[12pt]{article}
2
+ \usepackage[polish]{babel}
3
+ \usepackage[T1]{fontenc}
4
+ \usepackage[latin2]{inputenc}
5
+ % Thanks to Paul Artyl, who has send me his file.
6
+ % note: ���� are not polish chars
7
+ \begin{document}
8
+ \thispagestyle{empty}
9
+ \def\f{
10
+ a � � b c � d e � f g h i j k l � m n � o � � p q r s � � \\
11
+ t u � v w x y z � � ---
12
+ ����󶼿���ߡ�ʣ�Ӧ�����\\
13
+ A � � B C � D E � F G H I J K L � M N � O � � P Q R S � \\
14
+ T U � V W X Y Z � � ---
15
+ 0 1 2 3 4 5 6 7 8 9\\
16
+ }
17
+
18
+ {\rm \f}
19
+ {\tt \f}
20
+ {\it \f}
21
+ {\bf \f}
22
+ {\sl \f}
23
+ {\sc \f}
24
+ {\sf \f}
25
+
26
+ \end{document}
27
+
28
+
@@ -0,0 +1,14 @@
1
+ #FIG 3.2
2
+ Landscape
3
+ Center
4
+ Metric
5
+ A4
6
+ 100.00
7
+ Single
8
+ -2
9
+ 1200 2
10
+ 2 1 0 1 0 7 50 0 -1 0.000 0 0 -1 0 0 2
11
+ 1485 1170 1845 810
12
+ 4 0 0 50 0 0 12 0.7854 4 150 735 1065 1875 45 degree.\001
13
+ 4 0 0 50 0 0 12 0.7854 4 120 1230 725 1535 Times-Roman 12\001
14
+ 4 0 0 50 0 0 12 0.7854 4 135 1530 895 1705 The text is rotated by \001
@@ -0,0 +1,36 @@
1
+ #!/bin/bash
2
+ #
3
+ # score - compute a character-based error score
4
+ #
5
+ # usage: score file1 file2
6
+ #
7
+ spread(){
8
+ # write each input character to a separate line
9
+ expand $1 | awk '
10
+ {
11
+ n=length($0);
12
+ for (i=1; i<=n; i++) printf("%c\n", substr($0,i,1));
13
+ printf("end of line\n");
14
+ }'
15
+ }
16
+
17
+ # count the character deletions and insertions
18
+ numerator=`diff <(spread $1) <(spread $2) | egrep -c '<|>'`
19
+ # count the characters in both files
20
+ denominator=`cat $1 $2 | wc -c`
21
+ perl -e "printf(\"%9.6f\\n\", $numerator/$denominator )"
22
+
23
+ diff <(spread $1) <(spread $2) | awk '
24
+ /^[1-9]/{
25
+ if (length(del)+length(add)){
26
+ printf("s/%s/%s/\n",del,add);
27
+ del="";
28
+ add="";
29
+ next;
30
+ }
31
+ }
32
+ /^< end of line/{printf("s//\\n/\n"); next;} # delete a line
33
+ /^> end of line/{printf("s/\\n//\n"); next;} # insert a line
34
+ /^</{if (NF>1) {del=del $2;} else printf("s/ //\n");} # delete a character
35
+ /^>/{if (NF>1) {add=add $2;} else printf("s// /\n");} # insert a character
36
+ ' | sort | uniq -c | sort -n | tail
@@ -0,0 +1,28 @@
1
+ % Testfonts zur Konvertierung in PGM fuer OCR-Software
2
+ \documentstyle[german,12pt]{article}
3
+ %\input{layout.sty}
4
+ % a4.tex=210*297
5
+ % a3.tex=297*420
6
+ %\topmargin=-12mm \textheight=236mm % new:410-2*27=236
7
+ %\oddsidemargin=-11mm \evensidemargin=-11mm
8
+ %\textwidth=138mm % default:138mm new:296-2*27=242
9
+ \topmargin=-25mm \textheight=140mm % new:410-2*27=236
10
+ \oddsidemargin=-10mm \evensidemargin=-10mm
11
+ \textwidth=160mm % default:138mm new:296-2*27=242
12
+
13
+ \setlength{\parskip}{1.5ex plus0.5ex minus 0.5ex} % elastischer Absatz
14
+ \parindent0mm
15
+
16
+ %\pagestyle{plain}
17
+ \pagestyle{empty}
18
+ \renewcommand{\arraystretch}{1.5} % zeilenabstand von arrays
19
+ %\renewcommand{\baselinestretch}{2.0}
20
+ %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%M
21
+ \begin{document}
22
+ %\\ \rm Roman \tt Typewriter \it Italic \bf Bold-Face
23
+ % \sl Slanted \sc Small-Caps \sf Sans-Serif
24
+ %\\ \rm Roman
25
+ \Huge Mai \Large Mai \normalsize Mai \small Mai \normalsize
26
+ \\ \rm ABC DEF GHI JKL MNO PQR STU VW XYZ "A"O"U
27
+ \\ \rm abc def ghi jkl mno pqr stu vw xyz "a"o"u
28
+ \end{document}
@@ -0,0 +1,143 @@
1
+ %define name gocr
2
+ %define version 0.48
3
+ %define release 1
4
+
5
+ %define prefix %{_prefix}
6
+ %define _xprefix /usr
7
+ %define _xbindir %{_xprefix}/bin
8
+
9
+ Summary: Gocr is an OCR (Optical Character Recognition) program.
10
+ Name: %{name}
11
+ Version: %{version}
12
+ Release: %{release}
13
+ URL: http://jOCR.sourceforge.net/
14
+ License: GPL
15
+ Group: Graphics
16
+ Source0: http://prdownloads.sourceforge.net/jocr/%{name}-%{version}.tar.gz
17
+ #Source1: %{name}-16x16.xpm.bz2
18
+ #Source2: %{name}-32x32.xpm.bz2
19
+ #Patch0: %{name}-DESTDIR.patch.bz2
20
+ #Patch1: %{name}-paths.patch.bz2
21
+ #following packages are not really needed, but recommended
22
+ #BuildRequires: libnetpbm1-devel
23
+ #BuildRequires: gtk+-devel >= 1.2.8
24
+ #BuildRequires: transfig
25
+ # set RPM_BUILD_ROOT to /var/tmp/gocr-buildroot , overwritten by .rpmmacros
26
+ BuildRoot: %{_tmppath}/%{name}-buildroot
27
+
28
+ %description
29
+ GOCR is an optical character recognition program.
30
+ It reads images in many formats and outputs a text file.
31
+ Possible image formats are pnm, pbm, pgm, ppm, some pcx and
32
+ tga image files. Other formats like pnm.gz, pnm.bz2, png, jpg, tiff, gif,
33
+ bmp will be automatically converted using the netpbm-progs, gzip and bzip2
34
+ via unix pipe.
35
+ A simple graphical frontend written in tcl/tk and some
36
+ sample files (you need transfig for the sample files) are included.
37
+ Gocr is also able to recognize and translate barcodes.
38
+ You do not have to train the program or store large font bases.
39
+ Simply call gocr from the command line and get your results.
40
+
41
+
42
+ #%package -n %{name}-devel
43
+ #Summary: Development tools for gocr.
44
+ #Group: Development/C
45
+
46
+ #%description -n %{name}-devel
47
+ #GOCR is an optical character recognition program.
48
+ #If you want to develop programs which will manipulate gocr, you should
49
+ #install gocr-devel. You'll also need to install the gocr package.
50
+
51
+
52
+ # not tested, what about gocr.tcl ???
53
+ # switched off because gtk-devel was not available on my PC (joerg Aug06)
54
+ # and you dont need it to get gocr working
55
+ #%package -n %{name}-gtk
56
+ #Summary: Gtk+ frontend for gocr
57
+ #Group: Graphics
58
+ #Requires: %{name} = %{version}
59
+ #BuildRequires: gtk-devel >= 1.2.8
60
+
61
+ #% description -n %{name}-gtk
62
+ #Gtk-gocr is a graphical frontend to GOCR the
63
+ #optical character recognition program.
64
+ #
65
+ #Gtk+-based frontend for gocr.
66
+
67
+ # rpmbuild -bp: unpacking sources and applaying patches
68
+ %prep
69
+ rm -rf $RPM_BUILD_ROOT
70
+
71
+ %setup -q
72
+ #%patch0 -p1
73
+ #%patch1 -p1
74
+
75
+ # rpmbuild -bc: build, after prep, invokes make
76
+ # please help
77
+ %build
78
+ %configure --with-netpbm=no
79
+ %{__make} DESTDIR=$RPM_BUILD_ROOT
80
+ echo "build end"
81
+
82
+ # [ -e config.cache ] && rm -f config.cache
83
+ # % configure --with-netpbm=no --prefix=%{_xprefix} --bindir=%{_xbindir}
84
+ # % {__make}
85
+
86
+ # rpmbuild -bi: install-stage
87
+ %install
88
+
89
+ %{__make} install DESTDIR=$RPM_BUILD_ROOT
90
+
91
+ # not needed anymore
92
+ # % post -n %name-gtk
93
+ # % {update_menus}
94
+ #
95
+ # % postun -n %name-gtk
96
+ # % {clean_menus}
97
+ echo "install end"
98
+
99
+ %clean
100
+ rm -rf $RPM_BUILD_ROOT
101
+ echo "clean end"
102
+
103
+ # rpmbuild -bl: list check, check that every file exists
104
+ %files -n %{name}
105
+ %defattr(-, root, root)
106
+ %doc AUTHORS BUGS CREDITS HISTORY README REMARK.txt TODO
107
+ %doc doc/{examples.txt,gocr.html,unicode.txt}
108
+ %doc examples/{ex.fig,font2.fig,ocr-a.png,ocr-b.png}
109
+ %{_mandir}/man1/*
110
+ %attr(755,root,root) %{_bindir}/*
111
+
112
+ #%files -n %{name}-devel
113
+ #%defattr(-, root, root)
114
+ #%doc AUTHORS REVIEW
115
+ #%{_libdir}/libPgm2asc.a
116
+ #%{_includedir}/gocr.h
117
+
118
+ #%files -n %{name}-gtk
119
+ #%defattr(-, root, root)
120
+ #%doc frontend/gnome/{AUTHORS,README,TODO}
121
+ ##%{_menudir}/*
122
+ ##%{_iconsdir}/*
123
+ #%attr(755,root,root) %{_xbindir}/*
124
+
125
+ %changelog
126
+ * Tue Feb 5 2008 Joerg Schulenburg, 0.46
127
+ - remove devel part (for simplicity)
128
+
129
+ * Wed Aug 30 2006 Joerg Schulenburg, 0.41
130
+ - remove gtk-part (dont work on my PC)
131
+
132
+ * Sat Dec 27 2003 Nick Urbanik <nicku(at)vtc.edu.hk> 0.38-1.1nu
133
+ - Change %make to %{__make}
134
+ - check config.cache exists before trying to delete it
135
+ - Fix the files list for documentation.
136
+ - add back the gtk frontend
137
+ - Added the correct build require for gtk frontend
138
+ - various other fixes to get it to build.
139
+
140
+ * Tue Jan 29 2001 Joerg Schulenburg <jschulen-at-gmx.de-NOSPAM> 0.3.6-1
141
+ - gocr.spec taken krom Marcel Pol <mpol(at)gmx.net>
142
+
143
+ # check: rpmbuild -ba --nobuild gocr.spec