News for hackers. Stuff that matters.
Re:What's so hard about PDF text extraction? by saradhi on Tuesday March 03, 2020 @10:20AM (#22475088)
I'm an ML engineer, worked as a part time data engineer consultant for a medical lines/claims extraction company, for 3 years, which majorly involved in extracting the tabular data from the PDFs and Images. Developer rules or parsers as such is JUST no help. You end up creating a new rule every time you miss the data extraction.

With that in consideration, and the existing resources are little help especially on skewed, blurry, handwritten and 2 different table structure in the input, I ended up creating an API service to extract tabular data from Images and PDFs - hosted as https://extracttable.com . We cared it to be robust, average extraction time on images is under 5 seconds. On top of maintaining accuracy, A bad extraction is eligible for credit usage refund, which literally not any service offer it.

i Invite HN users to give it a try and feel free to email [email protected] for extra API credits for the trail.

Re:What's so hard about PDF text extraction? by jazzido on Tuesday March 03, 2020 @11:40AM (#22476066)
Hi, author and maintainer of Tabula (https://github.com/tabulapdf/tabula). We've been trying to contact you about the "Tabula Pro" version that you are offering.

Feel free to reachme at manuel at jazzido dot com

Re:What's so hard about PDF text extraction? by staticautomatic on Tuesday March 03, 2020 @12:26PM (#22476599)
Edit: See reply below

Am I reading the repos correctly? It looks like Extractable copied Tabula (MIT) to its own repo rather than forking it, removed the attribution, and then tried to re-license it as Apache 2.0. If so, that would be pretty fucked up.

https://github.com/tabulapdf

https://github.com/ExtractTable/tabulapro

Re:What's so hard about PDF text extraction? by jazzido on Tuesday March 03, 2020 @12:57PM (#22476953)
Not really. They import tabula_py, which is a Python wrapper around tabula-java (the library of which I'm a maintainer).

Still, I would have loved at least a heads up from the team that sells Tabula Pro. I know they're not required to do so, but hey, they're kinda piggybacking on Tabula's "reputation".

Re:What's so hard about PDF text extraction? by bruckie on Tuesday March 03, 2020 @01:21PM (#22477219)
If you control the Tabula trademark (which doesn't necessarily require a formal registration), you may be able to prohibit them from using the TabulaPro name. That's exactly what trademark law is for.

(IANAL)

Re:What's so hard about PDF text extraction? by wpietri on Tuesday March 03, 2020 @03:06PM (#22478266)
You're being much more polite here than I would be. Even if it isn't illegal, what they've done is a giant dick move.
Re:What's so hard about PDF text extraction? by saradhi on Tuesday March 03, 2020 @09:22PM (#22480681)
William, the intention of "TabulaPro" is to give the developers a chance to use a single library instead of switching ExtractTable for images and tabula-py for text PDFs.

What do you recommend us to do, to not make you feel we made a dick move.

TIA

Re:What's so hard about PDF text extraction? by wpietri on Tuesday March 03, 2020 @11:24PM (#22481188)
Well, let me ask a few questions:

Did you ask permission of the original author to use a derived name?

Did you discuss your plan to commercialize the original author's work with the author? Before starting out?

Since starting a commercial project, how much money have you given to the original author?

Re:What's so hard about PDF text extraction? by saradhi on Wednesday March 04, 2020 @09:49AM (#22484162)
- No, No, Zero.

"commercialize the original author's work with the author" - No, but let me highlight this, any extraction with tabula-py is not commercialized - you can look into the wrapper too :) or even compare the results with tabula-py vs tabulaPro.

Copying the TabulaPro description here, "TabulaPro is a layer on tabula-py library to extract tables from Scan PDFs and Images." - we respect every effort of the contributors & author, never intended to plagiarize.

I understand the misinterpretation here is that we are charging for the open-sourced library because of the name. We already informed author in the email about unpublishing the library, this morning, I just deleted the project and came here to mention it is deleted :)

Re:What's so hard about PDF text extraction? by wpietri on Wednesday March 04, 2020 @10:07AM (#22484320)
Sorry, Saradhi, I don't think you can reasonably claim there was no intention to plagiarize. Adding a "pro" to something is clearly meant to suggest it's the paid version of something. And it's equally clear that "TabulaPro" is derived from "Tabula".

It may be that you didn't realize that people would see your appropriation as wrong, although I have a hard time believing that as well given that the author tried to contact you and was ignored. As they say, "The wicked flee when no man pursueth."

So what I see here is somebody knowingly doing something dodgy and then panicking when getting caught. If you'd really like to make amends, I'd start with some serious introspection on what you actually did, and an honest conversation with the original author that hopefully includes a proper [1] apology.

[1] Meaning it includes an explicit recognition of your error and the harms done, a clear expression of regret, and a sincere offer to make amends. E.g., https://greatergood.berkeley.edu/article/item/the_three_part...

Re:What's so hard about PDF text extraction? by wpietri on Wednesday March 04, 2020 @12:09PM (#22485520)
And I'm going add it's really weird that your answer ("No, No, Zero") is exactly the same as what the library author said [1] two hours before you posted. But you do that again without acknowledging the author, and with just enough format difference that it's not a copy-paste. It's extremely hard for me to imagine you didn't read what he said before writing that; it's just too similar.

[1] https://news.ycombinator.com/item?id=22483334

Re:What's so hard about PDF text extraction? by saradhi on Wednesday March 04, 2020 @12:41PM (#22485828)
I understand how the whole thing interpreted as, and I agree with you. I'll do a note as suggested. Thanks for guiding and the link too.

I would like to get the author's comment on "tried to contact you and was ignored", as I was the one who emailed yesterday.

Re:What's so hard about PDF text extraction? by jazzido on Wednesday March 04, 2020 @07:58AM (#22483334)
Author here.

1) No. 2) No. 3) Zero.

Re:What's so hard about PDF text extraction? by staticautomatic on Tuesday March 03, 2020 @01:01PM (#22477004)
Thanks for clarifying.
Re:What's so hard about PDF text extraction? by CaptArmchair on Tuesday March 03, 2020 @10:59AM (#22475580)
I chuckled at your "the worst image" sample. Which still looked quite decent all things considered.

You're "handwritten" example looks a bit "too decent" as well. I can see how that works. You first look for the edges of the table, and then you evaluate the symbol in each cell as something that matches unicode.

So, how well does this cope with increasing degradation? i.e. pencil written notes that bleed outside cell borders, curve around borders, etc.? Stamps and symbols (watermarks) across tables?

Re:What's so hard about PDF text extraction? by saradhi on Tuesday March 03, 2020 @09:34PM (#22480742)
"pencil written notes that bleed outside cell borders, curve around borders, etc.? Stamps and symbols (watermarks) across tables?"

"The Worst Image" is a close match to that, except it is a print.

Regarding increasing degradation - as stated above, the OCR engine is not proprietary - we confined ourselves to detect the structure at this moment, and started with the most common problems.