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

Text Converter

The Text Convertor object enables users to extract text from various file formats, including documents, images, and audio files. It supports Optical Character Recognition (OCR) for enhanced performance in text extraction.

The Text Convertor object provides conversion for:

  • Document to Text: Extract text from PDFs, Doc/Docx and TXT files.

  • Image to Text: Use Optical Character Recognition (OCR) to extract text from images in JPG, PNG and JPEG formats.

  • HTML to Text: Extract text from HTML, HTM, and XHTML files.

  • Markdown to Text: Extract text from MD, MARKDOWN, MKD, MKDN, MDWN, and MDOWN files.

  • Excel to Text: Extract text from XLS, XLSX, and CSV files.

Overview

In this guide, we will cover how to:

How to Use the Text Convertor Object

Getting the Text Convertor Object

  1. To get a Text Converter object, go to Toolbox > Sources > Text Converter. If you are unable to see the Toolbox, go to View > Toolbox or press Ctrl + Alt + X.

  1. Drag-and-drop the Text Convertor object onto the designer.

Configuring the Text Convertor Object

  1. Configure the object, by right-clicking on its header and select Properties from the context menu.

A dialog box will open.

This is where you can configure the properties for the Text Converter object.

Convert documents using OCR to Text

  1. Specify the File Path to the scanned PDF/Image file that needs to be converted.

  1. Next, define an Output Directory where the converted text will be stored in another file. (optional)

  1. Configure the PDF Converter Options.

  • Pdf Password: Provide the password if the pdf file is password protected.

  • Pages To Read: Specify which pages need to be read. Leaving this empty means read all pages.

  • Text Converter Model: Select from the available models:

    • CustomOCRApi

    • GoogleOCR

    • TesseractOCR

    • TextractOCR

Note: TesseractOCR is free to use, while GoogleOCR and Textract require subscriptions. Tesseract is a third-party open-source component and may not provide the highest quality. For the best results, GoogleOCR is recommended.

  • Resolution: This option is available with TesseractOCR and TextractOCR. There are three types of resolutions to choose from: Auto, High, Low, and Medium. To learn more on which resolution would suit your needs best, click here.

  • Force OCR: This option applies OCR to both digital and scanned files, regardless of their format. When unchecked (the default setting), the system first determines whether an incoming file is scanned or an image. OCR is applied only if the file is detected as scanned or image based.

  • Split Output: Check this box to split the text for each page into a separate output record.

  • Apply Rotation Correction: Corrects page rotation before text extraction. Available only when using GoogleOCR. Options are None (no correction), OCR_Based (uses OCR to detect and correct rotation), and ML_Based (uses a machine learning model to detect and correct rotation).

  • Deskew: Straightens pages that are slightly tilted due to scanning misalignment before text extraction. Applies to PDF files only, regardless of the selected OCR model. Enable this when scanned documents produce garbled or misread text caused by skewed pages.

  1. Once you have configured the Text Convertor object, click OK.

  2. Right-click on the Text Convertor object’s header and select Preview Output from the context menu.

  1. A Data Preview window will open and will show you the preview of the extracted text.

Using Custom OCR API Model

The Custom OCR API model lets you connect any external OCR service via a Centerprise API flow. Instead of a built-in engine, the Text Converter executes an API flow you build, which calls your OCR endpoint and returns the extracted text. Refer to this document to understand this option in detail.

Extract Text from Excel files

  1. Specify the File Path to the Excel file that needs to be converted.

  2. Next, configure the Excel Converter Options

  • Work Sheet Name: Specify the name of your worksheet that you want to read data from.

  • Space Between Excel Columns: Specify the space between the Excel Columns.

  • Blank Lines Before End of File: Specify the number of blank lines at which the file ends.

  • Tab Size: Specify the tab spacing to be used in the extracted text.

  1. Once you have configured the Text Convertor object, click OK.

  2. Right-click on the Text Convertor object’s header and select Preview Output from the context menu.

  1. A Data Preview window will open, displaying the extracted text from the Excel file.

Use the Text Converter Object as a Transformation

  1. We can also use the Text Converter object as a transformation. To do so, right click on the header of the object and select Transformation.

  1. You’ll see the color of the header changing from green to purple. Depicting its transition from a source to transformation. You can also notice an input node being added along with the output node.

  1. You can now provide the input from any source object to the Text Converter object in your dataflow directly.

This concludes working with the Text Converter object in Astera Data Stack.

Last updated

Was this helpful?