We're currently using wikisource/google-cloud-vision-php (first released 2016-03-19) with google/cloud-vision (first released 2017-03-10). We forked the former back in the day because there wasn't an official one (so we resorted to fixing and releasing a fork of an unofficial one). There now is an official one, so we should use it.
Description
Related Objects
- Mentioned In
- T279610: Adjust how we handle exceptions
Event Timeline
I had a brief look at this today, and it's not a simple drop-in replacement. The authentication process changes. I don't think it'll be a very difficult thing, but more than half an hour. :-)
This should be on our board and estimated. @Samwilson, how many points would this be? Thanks!
And I assume assigned to Sam, since he has a patch? @Samwilson, feel free to change things if I misunderstood what's going on!
Yes, that's all correct @ifried, sorry I forgot to move it before!
It's also ready for review now.
Some differences I am finding comparing Test (https://ocr-test.wmcloud.org) to Production (https://ocr.wmcloud.org):
- Support for columns appears to be better on Test. E.g. compare https://ocr-test.wmcloud.org/?image=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F2%2F20%2FENC_9-0379.jpg&langs[]=&engine=google to https://ocr.wmcloud.org/?image=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2F2%2F20%2FENC_9-0379.jpg&lang=&engine=google
- You will also notice for the above image that Production interprets ſ correctly but Test turns it into f. On the other hand, Test is more likely to correctly recognise à. Production turns it into &.
- Test might have better support for ligatures, e.g. Sphæria in https://ocr-test.wmcloud.org/?image=https%3A%2F%2Fupload.wikimedia.org%2Fwikipedia%2Fcommons%2Fb%2Fb8%2FThe_Annals_and_magazine_of_natural_history_%25281841%2529_%252817788871594%2529.jpg&langs%5B%5D=&engine=google
(Bear in mind this is based on very little data. I suspect the above observations will not be true universally. The quality of the OCR tends to depend a lot on the quality of the image and of the original print.)
I am moving this along. This seems to be working fine.
There are differences in OCR text as mentioned above, but, as discussed in standup, the official package is the one we have to use now, as the other is not maintained.
@dom_walden hey dom, thanks for documenting your testing methodologies on this ticket! it's v helpful for me as i am still understanding how to best test all of this!