How to Master Document Parsing4 min read
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.
Before you embark on this journey, ensure you have the following:
- A free account with us. Make sure to sign up and confirm your email address.
- A sample training set, which will be used to train the machine learning model.
Once you’ve logged into our platform:
- Click on the “Create a new API” button in the Studio tab.
- 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.
After setting up your API:
- Define the data model by specifying the fields you want to extract from the document.
- For each field, select its data type (e.g., Text Field) and provide a field name and an API response key.
- For our W-9 example, we’ll extract fields like Name, Street Address, City, State, Zip Code, and Social Security Number.
With the data model in place, it’s time to train the deep learning model:
- Upload your training documents. You can upload individual files or a zip archive containing multiple files.
- 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.
- Once you’ve tagged 20 documents, the model training will commence. The more documents you train with, the more accurate the model becomes.
We provide a “Models Training Page” where you can:
- Track the training progress in real-time.
- Monitor when the model is deployed.
- 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.
Once the model is trained:
- You can test its accuracy by uploading new documents. The model will automatically fill out fields based on its training.
- Continue to feed more data to the model to enhance its accuracy.
With a trained model in place:
- Navigate to the “Documentation” tab to explore your API endpoints and download the API definition.
- Use the “API Keys” tab to generate your first key and test the API.
- The “Settings” tab allows you to update API information and download the data model configuration.
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.