Live data from Hacker News

Project Naptha: a browser extension that enables text selection on any image

projectnaptha.com

81–90 of 141 posts

Re: Project Naptha: a browser extension that enables text selection on any image

#82
post #2

This looks very cool and could come in quite handy. In case anyone from the project is monitoring - text selection did seem to work fine for me in FireFox (ESR 24.3) despite the "Not Supported" text being displayed.

I think the developer just meant that he hasn't yet made a FF add-on yet; the code works great for me in FF as well.

Re: Project Naptha: a browser extension that enables text selection on any image

#85
post #57

Reminds me of Powersnap on the Amiga. Many applications did their own text rendering without supporting cut and paste, and so this guy called Nico Francois had the bright idea of letting you select a region of a window, and matching the standard fonts against the windows bitmap. Of course then it was "easy": almost all the text would have been rendered with one of a tiny number of fonts available on the system, with…

Powersnap was amazing. I seem to recall it was usually able to figure out what font each program was using and only had to search for letters for that specific font, and only fall back to a bigger search if that failed. I might be misremembering, but regardless, it was essentially as fast as any copy-paste today, in an environment where many programs weren't even written to support it.

Even though it solved a problem we don't usually have today (this story notwithstanding), it was still one of the most amazingly useful programs ever.

Re: Project Naptha: a browser extension that enables text selection on any image

#86
post #61

Earlier quoted context omitted.

There's actually been a bit of research on the error rates you need to beat for OCR to be cost-effective vs. having people re-type. I don't have the references handy, but I believe it's generally cost effective to OCR with error rates up to nearly 2%, and most current "consumer grade" OCR is well below 1% error rates for scans that aren't absolutely atrociously poor quality. My Msc thesis was on reducing OCR error ra…

It was suggested to me by a friend that to get good OCR results, run it through the scanner/OCR twice, then diff the results. Usually one or the other will get it right, and if you run the two results through a difference editor like 'meld', it's quick to fix.

That may work for some cases, and especially with horrible OCR engines and low quality scanners, but frankly when I did my research into this, the results varied extremely little from run to run, and you could usually easily identify specific artefacts in the source that tripped the engine up (rather than problems with the quality of the scan). E.g. letters that were damaged, or had run together, creases in the paper etc.

With really low res scanners I can image it could make a big difference.

Re: Project Naptha: a browser extension that enables text selection on any image

#87
post #62

Every time I click "Allow" on "Access data on all sites" for an extension I creep closer to my security hole paranoia threshold. If it was all in JS, who cares? But this sends ajax to remote servers of course. Am I alone?

No. I only watched demo, because of that.

Re: Project Naptha: a browser extension that enables text selection on any image

#88
post #61

Earlier quoted context omitted.

There's actually been a bit of research on the error rates you need to beat for OCR to be cost-effective vs. having people re-type. I don't have the references handy, but I believe it's generally cost effective to OCR with error rates up to nearly 2%, and most current "consumer grade" OCR is well below 1% error rates for scans that aren't absolutely atrociously poor quality. My Msc thesis was on reducing OCR error ra…

"There's actually been a bit of research on the error rates you need to beat for OCR to be cost-effective vs. having people re-type." Doesn't that depend entirely on what you're using the text for and how accurate it needs to be?

To a certain extent, of course. The 2% was based on the assumption that if you are benchmarking against re-typing, you expect the same kind of quality you'd get from having a good typist re-typing the documents.

From my own experiments, I tend to find that you can read through and correct errors only relatively marginally faster than you can type because you either follow along with the cursor or need to be able to position the cursor very quickly when you find an error, and as the error rate increases, trying to position the cursor to each error very quickly gets too slow.

Dropping accuracy in your effort to correct the text doesn't really seem to speed things up much. You likely speed it up if you're willing to assume that anything that passes the spellchecker is ok (but it won't be, especially as modern OCR's often try to rely on data about sequences of letters, or dictionaries, when they're uncertain about characters)

If you're ok with lower accuracy, e.g. for search, and the alternative is not processing the document at all, then it'd be drastically different.

Re: Project Naptha: a browser extension that enables text selection on any image

#89

Earlier quoted context omitted.

Yeah, I just haven't gotten around packaging the whole thing as a Firefox Addon. It's actually technically possible to run the whole thing on a normal unprivileged webpage (in fact, that's my development environment).

Please give us a Firefox version! I'm begging you!

Seconded. This is one of the most incredibly useful projects I've seen in a long time.

Re: Project Naptha: a browser extension that enables text selection on any image

#90
post #85
post #57

Reminds me of Powersnap on the Amiga. Many applications did their own text rendering without supporting cut and paste, and so this guy called Nico Francois had the bright idea of letting you select a region of a window, and matching the standard fonts against the windows bitmap. Of course then it was "easy": almost all the text would have been rendered with one of a tiny number of fonts available on the system, with…

Powersnap was amazing. I seem to recall it was usually able to figure out what font each program was using and only had to search for letters for that specific font, and only fall back to a bigger search if that failed. I might be misremembering, but regardless, it was essentially as fast as any copy-paste today, in an environment where many programs weren't even written to support it. Even though it solved a problem…

You're probably right - the manual says it did. It'd be able to get the last used font from the RastPort structure used to draw to the window [1].

If the window was rendered with multiple font that wouldn't be reliable, but I guess it'd likely be "good enough" to avoid a wider search most of the time.

[1] Here's the RastPort struct from AROS (open source re-implementation of AmigaOS): http://repo.or.cz/w/AROS.git/blob/HEAD:/compiler/include/gra...

Post reply on HN