How to prepare your PDF docs for Galaxia using Unstructured.io?
Described PDF docs processing will be presented using the Unstructured API.
Following example will be done using Python, due to Unstructured publishing a library for batch document ingest in this language.
Getting started
Create an Unstructured account: on the landing page click Get Started for Free. Then generate an API key as described in the Partition Endpoint overview (sign in, open API Keys and generate a key). The default API URL is
https://api.unstructuredapp.io/general/v0/general; use the URL given to your account if it differs.Collect documents: gather all PDF documents you wish to process and place them in a single directory.
Install the Unstructured ingest library with its extension for partitioning through the Unstructured API:
pip install "unstructured-ingest[remote]"Data processing
Before running the following code please make sure to properly set the variables in the code:
apiKeyshould contain your API Key obtained as described in the "Getting started" section,apiUrlshould contain the API Url as described in the "Getting started" section,inputDirectoryshould point to the directory where you have collected your PDF documents,outputDirectoryshould point to an existing directory where you wish to store the output files created by Unstructured during processing and the resulting CSV file.
All PDF documents in the directory will be processed, and the output will be saved to a CSV file.
As a result, file-export.csv file will be produced. Upload it on the Files page and build a graph model from it.