[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: An improved method for scanning documents



In article <1eadnWL29OShWa_ZRVnzvA@telenor.com>,
Knut Roll-Lund  <kr-lund@nogarbage.online.no> wrote:
> I have OCR'ed some program listings. Using Caere OmniPage (came with the 
> AGFA scanner), it does have a monospaced/matrixprinter mode that works 
> fairly well. I would use it in an interactive way so I could tell it 
> legal words and after a while it got quite good (TRS-80 basic and at an 
> other time z80 assembly).
> 
> It could have been much better if I could tell it to assume basic syntax 
> and that it would assume numbers in certain places like after a goto or 
> gosub, at the beginning of a line etc. Applesoft basic wouldn't be as 
> bad as the TRS-80 basic I was doing since it adds/enforces spaces 
> between statements.

That can be accomplished by some post processing of the OCR'ed text.  I.e.
you write a special program which reads the uncorrected OCR'ed text, assumes
some things about it, and then applies correction, doing things like
exchanging 2/Z 5/S 8/S 1/l 1/I 0/O whenever suitable.  If the text is
supposed to be an Applesoft program, then each line shall start with a
number, reserved words shall not contain digits, and at some places (like
after a GOTO) there should always be a number.  If the text is a table
containing numerical quantities only, it shall only contain numbers.
Etc etc ....
 
> In all that I did it was fairly long listings and typing them in would 
> have taken a long time so all in all I think I saved quite a bit of time 
> OCR'ing. I would afterwards use MultiEdit (used for its good brief 
> emulation, actually better than the real brief) to substitute certain 
> bad guesses OmniPage did and look for 2/Z 5/S 1/l 8/S and 0/O by using 
> substitute in rectangles and the whole file. The final test would come 
> when loading/compiling it where the last bugs would be weeded out. One 
> feature of MultiEdit that came in handy was the configurable context 
> coloring. I defined the basic/asm statements and errors would stand out 
> as black...
> 
> It still took some time but it was well worth it, typing in is very 
> tedious when it is a long listing (and not very interesting to read).
> 
> One of the worst I remember from back then was Scott Adams' pirates 
> adventure, the version that was printed in Byte, December 1980. It was 
> awfully long and the adventure data was a lot of gibberish. Me and a 
> friend did it together taking turns reading and typing, then taking 
> turns reading back and verifying. We also did a lot of debugging during 
> gameplay... loading or saving took about 20 minutes on tape. Those were 
> the days. Playing the game in the end, was just wonderful.
> 
> :-)
> 
> Knut

-- 
----------------------------------------------------------------
Paul Schlyter,  Grev Turegatan 40,  SE-114 38 Stockholm,  SWEDEN
e-mail:  pausch at stockholm dot bostream dot se
WWW:     http://stjarnhimlen.se/