For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

  1. 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.

  2. Collect documents: gather all PDF documents you wish to process and place them in a single directory.

  3. 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:

  • apiKey should contain your API Key obtained as described in the "Getting started" section,

  • apiUrl should contain the API Url as described in the "Getting started" section,

  • inputDirectory should point to the directory where you have collected your PDF documents,

  • outputDirectory should 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.

Document text will be parsed up to 2 000 000 characters due to Smabbler's maximum text length limit.

As a result, file-export.csv file will be produced. Upload it on the Files page and build a graph model from it.