Changeset 100
- Timestamp:
- 10.12.2006 01:29:31 (2 years ago)
- Files:
-
- trunk/devel/FuzzyOcr.cf (modified) (4 diffs)
- trunk/devel/FuzzyOcr.preps (modified) (1 diff)
- trunk/devel/FuzzyOcr.scansets (modified) (5 diffs)
- trunk/devel/FuzzyOcr/Config.pm (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/devel/FuzzyOcr.cf
r93 r100 134 134 # This saves resources, but lowers the scores because not the best, 135 135 # but the first best scanset is taken as result. 136 # Default value: 0137 #focr_minimal_scanset 1136 # Default value: 1 137 #focr_minimal_scanset 0 138 138 139 139 # This option is only used when focr_minimal_scanset is enabled. … … 246 246 # Allowed values: 247 247 # 1 ... use digest_hash only (deprecated) 248 # 2 ... use digest_db w/digest_hash import (see requirements )249 # 3 ... use mysql database (see requirements )248 # 2 ... use digest_db w/digest_hash import (see requirements, recommended) 249 # 3 ... use mysql database (see requirements, experimental) 250 250 #-- 251 251 # The score is saved with the hash in the database, allowing the plugin to … … 260 260 261 261 # Automatically add hashes of spam images recognized by OCR to the Image 262 # Hash database, to disable, set to 0 .0262 # Hash database, to disable, set to 0 263 263 # Default value: 1 (learn) 264 264 #focr_hashing_learn_scanned 1 … … 289 289 290 290 ### 291 ### MySQL options 291 ### MySQL options (Type 3 Hashing) 292 292 ### 293 293 trunk/devel/FuzzyOcr.preps
r70 r100 2 2 # Do not modify this on your own unless you have read the manual and know what you're doing 3 3 4 # Normalizes a PNM 4 5 preprocessor normalize { 5 6 command = pnmnorm 6 7 } 7 8 9 # Inverts a PNM 8 10 preprocessor invert { 9 11 command = pnminvert 10 12 } 11 13 12 # requires ImageMagic convert 14 # Converts PPM (Color PNM) to PGM (Greyscale PNM) 15 preprocessor ppmtopgm { 16 command = ppmtopgm 17 } 18 19 # Converts PAM to PNM 20 preprocessor pamtopnm { 21 command = pamtopnm 22 } 23 24 # Uses thresholding on the PAM file 25 preprocessor pamthreshold { 26 command = pamthreshold 27 args = -simple -threshold 0.5 28 } 29 30 # converts PNM to TIFF (this is used for tesseract) 13 31 preprocessor maketiff { 14 command = convert15 args = $input tiff:$output32 command = pnmtotiff 33 args = -color -truecolor 16 34 } trunk/devel/FuzzyOcr.scansets
r70 r100 2 2 # Do not modify this on your own unless you have read the manual and know what you're doing 3 3 4 # Note: If the focr_minimal_scanset option is enabled (default), 5 # not all of these scansets run for every picture. But be aware 6 # that for ham images, all of them will always run. 7 8 9 # Standard Ocrad Scanset 4 10 scanset ocrad { 5 11 command = $ocrad … … 7 13 } 8 14 15 # Inverted Ocrad scanset 9 16 scanset ocrad-invert { 10 17 command = $ocrad … … 12 19 } 13 20 21 # Inverted Ocrad scanset 22 scanset ocrad-invert { 23 preprocessors = ppmtopgm, pamthreshold, pamtopnm 24 command = $ocrad 25 args = -s5 -i $input 26 } 27 28 # Standard Gocr Scanset 14 29 scanset gocr { 15 30 command = $gocr … … 17 32 } 18 33 34 # Tweaked Gocr Scanset 19 35 scanset gocr-180 { 20 36 command = $gocr … … 22 38 } 23 39 24 scanset gocr-invert { 25 preprocessors = normalize, invert, normalize 26 command = $gocr 27 args = -i $input 28 } 40 # An example Scanset how to use tesseract (disabled by default) 41 #scanset tesseract { 42 # preprocessors = maketiff 43 # command = $tesseract 44 # args = $input $output 45 # force_output_in = $output.txt 46 #} 29 47 30 scanset tesseract { 31 preprocessors = maketiff 32 command = $tesseract 33 args = $input $output batch 34 force_output_in = $output.txt 35 } 48 # Another example, this basically does the same as the inverted Ocrad Scanset 49 # Only listed here to serve as example, ocrad-invert does this already 50 # 51 #scanset gocr-invert { 52 # preprocessors = normalize, invert, normalize 53 # command = $gocr 54 # args = -i $input 55 #} trunk/devel/FuzzyOcr/Config.pm
r99 r100 432 432 push (@cmds, { 433 433 setting => 'focr_minimal_scanset', 434 default => 0,434 default => 1, 435 435 type => $Mail::SpamAssassin::Conf::CONF_TYPE_BOOL 436 436 });
