How to Master Document Parsing

Reading time:
3
min
Published on:
Sep 13, 2023

Sam Johnson

Sam Johnson

Summary

Share the article

Mastering Document Parsing with Mindee’s API Builder

Document parsing – extracting structured information from unstructured or semi-structured documents – is a crucial aspect of many business processes. Whether it’s extracting data from invoices, tax forms, or any other structured document, the ability to accurately and quickly parse documents can significantly streamline operations. We offer a powerful tool for developers to build their custom document parsing APIs. In this blog post, we’ll walk you through the steps to create your very own document parsing API using Mindee, focusing on the W-9 tax form as an example.

Prerequisites for Building a Document Parsing API

Before you embark on this journey, ensure you have the following:

  1. A free account with us. Make sure to sign up and confirm your email address.
  2. A sample training set, which will be used to train the machine learning model.
mindee document parsing

Setting Up Your API

Once you’ve logged into our platform:

  1. Click on the “Create a new API” button in the Studio tab.
  2. Provide essential details about your custom document parsing API. This includes the document type (e.g., “W-9 Tax Form”), an API name, a brief description, and an illustrative image.

Defining Your Document Data Model

After setting up your API:

  1. Define the data model by specifying the fields you want to extract from the document.
  2. For each field, select its data type (e.g., Text Field) and provide a field name and an API response key.
  3. For our W-9 example, we’ll extract fields like Name, Street Address, City, State, Zip Code, and Social Security Number.
document parsing w-9

Training the Model

With the data model in place, it’s time to train the deep learning model:

  1. Upload your training documents. You can upload individual files or a zip archive containing multiple files.
  2. For each uploaded document, assign values to each field by selecting the appropriate sections in the document. Our interface highlights potential candidates for each field, making this process intuitive.
  3. Once you’ve tagged 20 documents, the model training will commence. The more documents you train with, the more accurate the model becomes.

Monitoring Training Progress

We provide a “Models Training Page” where you can:

  1. Track the training progress in real-time.
  2. Monitor when the model is deployed.
  3. View training sessions that have been canceled.

The frequency of model re-training varies based on the number of trained documents. For instance, with under 100 documents, a new model is trained every 20 documents. As the number of documents increases, the frequency changes, ensuring optimal model performance.

Using the Trained Model

Once the model is trained:

  1. You can test its accuracy by uploading new documents. The model will automatically fill out fields based on its training.
  2. Continue to feed more data to the model to enhance its accuracy.

API Integration and Settings

With a trained model in place:

  1. Navigate to the “Documentation” tab to explore your API endpoints and download the API definition.
  2. Use the “API Keys” tab to generate your first key and test the API.
  3. The “Settings” tab allows you to update API information and download the data model configuration.

Your Solution for Efficient Data Extraction

Document parsing doesn’t have to be a tedious task. With our API Builder, developers can create custom APIs tailored to their specific needs, ensuring accurate and efficient data extraction. Whether you’re dealing with tax forms, invoices, or any other structured document, we’ve got a robust solution to all your document parsing challenges. Log into the platform here or reach out to chat to our team.

This blog post is based on the Mindee documentation. For more technical details on document parsing visit the Mindee docs.