Giter VIP home page Giter VIP logo

Comments (1)

Careyjmac avatar Careyjmac commented on May 14, 2024

What you are seeing is expected with the JFK demo. It was built to work with scanned PDFs which are all images and have no native text (since that is what all the files in the JFK released document set are). What I can tell you is that the native text in your PDF is still being indexed and is therefore searchable, but the reason you don't see it in the UI is because we depend on being able to OCR the images in order to extract the layout information of the text to get the hOCR experience that the UI has.

It is still possible to use cognitive search/possibly even the JFK demo with your documents. You have two options that immediately come to my mind:

  1. If you really care about the hOCR experience, then you can make a small change to your indexer definition before running the JFKInitializer that will cause any PDF pages to be rendered to an image instead of smaller images being extracted. The change is to set the imageAction parameter to be generateNormalizedImagePerPage instead of just generateNormalizedImages. This allows us to be able to OCR that image and therefore get the layout info we need for the hOCR experience. Note that this only works with PDFs and not other document types, other document types will continue to have the images extracted as they are today. The other issue here is that obviously the OCR model isn't perfect and thus with this approach the text will likely be less accurate then using the actual native text. With this approach again we do still index the native text, so it will be part of the searches you make, but it won't appear in the JFK UI. It may also have slightly higher costs as we may end up generating and OCRing more images then we did with the original approach.
  2. If the hOCR experience isn't super important to you and you just want to explore the document set, take a look at the Azure Search Knowledge Mining Accelerator repo. There is a simpler template in there that does pretty much everything the JFK sample does just without the hOCR, and it displays the native text as part of the experience.

Hope that helps!

from azuresearch_jfk_files.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.