Created 08-23-2017 06:58 PM
Hi,
I've followed the following document and added ExtractText processor supported by TIKA.
Could you please help me what properties i need to add for the configuration? I used Getfile to ingest the pdf file, but i am not sure how this custom process should be configured. Any help would be appreciated.
SJ
Created on 08-31-2017 05:11 PM - edited 08-17-2019 06:20 PM
I just did a quick test using GetFile to ingest a PDF, and used the custom processor as is without any configuration. I then used a PutFile to drop the output of the Extracted text to a dir. As expected, the output is the text lifted from the original PDF, in a text file format. No special configuration required. If you are looking to play with the metadata using Tika, you can look at the ExtractMediaMetadata processor which comes with modern versions of NiFi out of the box and uses Tika under the hood.
Created on 08-31-2017 05:11 PM - edited 08-17-2019 06:20 PM
I just did a quick test using GetFile to ingest a PDF, and used the custom processor as is without any configuration. I then used a PutFile to drop the output of the Extracted text to a dir. As expected, the output is the text lifted from the original PDF, in a text file format. No special configuration required. If you are looking to play with the metadata using Tika, you can look at the ExtractMediaMetadata processor which comes with modern versions of NiFi out of the box and uses Tika under the hood.
Created 09-06-2017 05:46 AM
Hi Sonu,
Thanks for the advice. Just a question, what if i want to extract specific text from pdf and not extract the whole pdf to text.Is it possible?
Thanks
Created 09-06-2017 03:36 PM
You could probably achieve that by combining processors. Use the Tika-based processor to extract everything from the pdf in txt form, and then use another processor (ExtractText with RegEx to find your content for example) to extract the specific text you want, and decide what to do with that content from there.
Created 09-08-2017 02:47 PM
Thanks Sonu
Created 05-07-2018 01:30 PM
My custom processor is pretty easy to customize.
https://github.com/tspannhw/nifi-extracttext-processor
You can tweak it to extract just somethings, Apache Tika is very powerful.