Organízate con las colecciones
Guarda y clasifica el contenido según tus preferencias.
Form Parser extrae pares clave-valor, tablas, marcas de selección (como casillas de verificación), campos genéricos y texto para mejorar y automatizar el procesamiento de documentos.
Se puede considerar el uso de Análisis de formularios en lugar de otros analizadores cuando el caso práctico implique lo siguiente:
Tratar con formularios estructurados: destaca por extraer pares clave-valor de formularios bien definidos que tienen el aspecto de formularios convencionales con espacios en blanco etiquetados para rellenar, como name: __. El modelo preentrenado de Form Parser ofrece una alta precisión en campos habituales, como nombres, fechas y direcciones.
Se necesita una extracción de tablas flexible: el analizador de formularios extrae datos de tablas sencillas (sin celdas que abarquen filas o columnas) que tienen el aspecto de tablas. No es necesario (ni posible) recibir formación. En el caso de la extracción de tablas entrenadas, el extractor personalizado se puede usar con un campo principal que contenga campos secundarios de columna (celda).
Necesidad de eficiencia: evita crear y mantener analizadores de extracción, sobre todo para tareas de extracción de gran volumen y variadas.
Funciones de extracción de datos
Las funciones de Analizador de formularios incluyen lo siguiente:
Par clave-valor: se trata de conjuntos de dos elementos de un documento: una etiqueta o clave y los datos correspondientes (un valor). Puede usar directamente los pares clave-valor (si las claves son coherentes) o crear una lógica personalizada para convertir las claves variadas en información estructurada coherente.
Entidades genéricas: analiza 11 campos diferentes de documentos de forma predeterminada. Por ejemplo:
email
phone
url
date_time
address
person
organization
quantity
price
id
page_number
Texto y diseño: usa nuestro motor de reconocimiento óptico de caracteres más reciente para extraer texto e información sobre el diseño. Esto incluye el texto insertado de PDFs digitales (solo en la versión 2.1) o el texto de imágenes.
Tablas: detecta y extrae tablas de imágenes y PDFs.
Casillas de verificación: detector de marcas de selección de alta calidad que extrae casillas de verificación de imágenes y archivos PDF como pares clave-valor. Para ello, usa el texto más cercano a la casilla de verificación, con un valueType
que indica si está marcada o no.
El modelo de casilla de verificación no admite el análisis de botones de radio. Es posible que algunas casillas de verificación detectadas no tengan claves correspondientes.
El modelo no analiza de forma fiable un KVP con un valor sin rellenar, como un formulario en blanco.
El análisis de KVP en documentos en determinados idiomas puede tener una calidad inferior a la de los idiomas latinos.
Procesar documentos con Form Parser
En esta guía de inicio rápido se presenta la función Analizador de formularios de Document AI. En este inicio rápido, usarás la Google Cloud consola para configurar tu proyecto Google Cloud y la autorización, crear un analizador de formularios y, a continuación, enviar una solicitud a Document AI para que procese un formulario PDF.
Descubre cómo:
Habilita Document AI en un Google Cloud proyecto.
Crea un procesador de analizador de formularios, que puede identificar y extraer texto, pares clave-valor, tablas y entidades genéricas de muchos tipos de documentos.
Usa el procesador para anotar un documento de muestra.
Para seguir las instrucciones paso a paso de esta tarea directamente en la Google Cloud consola, haga clic en Ayúdame:
Sign in to your Google Cloud account. If you're new to
Google Cloud,
create an account to evaluate how our products perform in
real-world scenarios. New customers also get $300 in free credits to
run, test, and deploy workloads.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
In the Google Cloud console, on the project selector page,
select or create a Google Cloud project.
Roles required to select or create a project
Select a project: Selecting a project doesn't require a specific
IAM role—you can select any project that you've been
granted a role on.
Create a project: To create a project, you need the Project Creator
(roles/resourcemanager.projectCreator), which contains the
resourcemanager.projects.create permission. Learn how to grant
roles.
To enable APIs, you need the Service Usage Admin IAM
role (roles/serviceusage.serviceUsageAdmin), which
contains the serviceusage.services.enable permission. Learn how to grant
roles.
Se trata de un archivo PDF que contiene un ejemplo de formulario médico manuscrito. Este documento está almacenado en un segmento de Cloud Storage de acceso público.
Haz clic en el botón Subir documento de prueba y selecciona el documento que acabas de descargar.
Ahora debería estar en la página Análisis del analizador de formularios. Puedes ver el texto detectado por el OCR, los pares clave-valor, las tablas y las entidades genéricas extraídas del documento.
Limpieza
Para evitar cargos innecesarios de Google Cloud , usa el
Google Cloud console para eliminar tu procesador y tu proyecto si no los necesitas.
[[["Es fácil de entender","easyToUnderstand","thumb-up"],["Me ofreció una solución al problema","solvedMyProblem","thumb-up"],["Otro","otherUp","thumb-up"]],[["Es difícil de entender","hardToUnderstand","thumb-down"],["La información o el código de muestra no son correctos","incorrectInformationOrSampleCode","thumb-down"],["Me faltan las muestras o la información que necesito","missingTheInformationSamplesINeed","thumb-down"],["Problema de traducción","translationIssue","thumb-down"],["Otro","otherDown","thumb-down"]],["Última actualización: 2025-09-10 (UTC)."],[[["\u003cp\u003eForm Parser is a pre-trained tool that extracts key-value pairs, tables, selection marks, generic entities, and text from documents, suitable for structured forms and flexible table extraction.\u003c/p\u003e\n"],["\u003cp\u003eIt can parse and return data for 11 different generic entities, such as email, phone, address, person, organization, price and date_time, and can also extract data from checkboxes, and tables.\u003c/p\u003e\n"],["\u003cp\u003eForm Parser supports over 200 languages and offers feature support in eight regions, but it cannot be up-trained, and it cannot process radio buttons, nor extract data from blank or empty values.\u003c/p\u003e\n"],["\u003cp\u003eYou can create a Form Parser processor through the Google Cloud console, and then test it using the test document option with a sample PDF file to see the resulting extractions.\u003c/p\u003e\n"],["\u003cp\u003eThe Form Parser tool is designed to be efficient, eliminating the need to build and maintain custom extraction parsers for various high volume form document processing.\u003c/p\u003e\n"]]],[],null,["Form Parser extracts key-value pairs (KVPs), tables, selection marks (like checkboxes),\ngeneric fields, and text to augment and automate document processing.\n| **Note:** Form Parser is pre-trained and cannot be up-trained.\n\nForm Parser can be considered over the other parsers when the use case involves:\n\n- Dealing with structured forms: It excels at extracting KVPs from well-defined forms that look like conventional forms with labeled blanks to fill in, such as `name: __`. Form Parser's pre-trained model offers high accuracy for common fields like names, dates, and addresses.\n- Flexible table extraction is needed: Form Parser extracts from simple (no cells that span rows or columns) tables that look like tables. No training is needed (nor possible). For trained table extraction, the custom extractor can be used with a parent field containing column (cell) child fields.\n- Need efficiency: Avoid building and maintaining extraction parsers, especially for high-volume and varied forms of extraction tasks.\n\nData-extraction features\n\nForm Parser features encompass:\n\n- **KVP:** These are sets of two items within a document---a label or key and its\n corresponding data (a value). You can directly use KVPs (if the keys are consistent)\n or build custom logic to resolve varied keys into consistent structured information.\n\n- **Generic entities:** Parse 11 different fields from documents out of the box. These include:\n\n - `email`\n - `phone`\n - `url`\n - `date_time`\n - `address`\n - `person`\n - `organization`\n - `quantity`\n - `price`\n - `id`\n - `page_number`\n- **Text and layout:** Use our latest OCR engine to extract text and layout\n information. This includes embedded text from digital PDFs (v2.1 only) or text from images.\n\n- **Tables:** Detect and extract tables from images and PDFs.\n\n- **Checkboxes:** A high-quality selection mark detector, which extracts checkboxes\n from images and PDF output as KVP, using the text nearest the checkbox, with a `valueType`\n indicating whether it is filled or unfilled.\n\nLanguages and regions\n\n- Form Parser 2.0 supports over 200 languages. [Learn more](/document-ai/docs/processors-list#expandable-1).\n- We provide feature support in eight regions. [Learn more](/document-ai/docs/regions).\n\nModel versions\n\nThe following processor versions are compatible with this feature. For more\ninformation, see [Managing processor versions](/document-ai/docs/manage-processor-versions).\n\nLimitations\n\n- Prior JPEG compressions for TIFF are unsupported. Type of JPEG encapsulation defined by the TIFF [version 6.0 specification](https://gitlab.com/libtiff/libtiff/-/commit/f0a54a4fa0cfa377f493d57ee2af393005d5bbe5).\n\n- The checkbox model doesn't support parsing radio buttons. Some detected checkboxes might not have corresponding keys.\n\n- The model doesn't reliably parse a KVP with an unfilled value, such as a blank form.\n\n- The KVP parsing on documents in certain languages may have lower quality than Latin languages.\n\n\u003cbr /\u003e\n\nProcess documents with Form Parser\n\nThis quickstart introduces you to the Form Parser feature in Document AI. In this quickstart,\nyou use the Google Cloud console to set up your Google Cloud project and\nauthorization, create a Form Parser, and then make a request for\nDocument AI to process a PDF form.\n\nLearn how to:\n\n1. Enable Document AI in a Google Cloud project.\n\n2. Create a Form Parser processor, which can identify\n and extract text, key-value pairs, tables, and generic entities from many types of documents.\n\n3. Use the processor to annotate a sample document.\n\n*** ** * ** ***\n\nTo follow step-by-step guidance for this task directly in the\nGoogle Cloud console, click **Guide me**:\n\n[Guide me](https://console.cloud.google.com/ai/document-ai?tutorial=document-ai--documentai_form_parser_console)\n\n*** ** * ** ***\n\n- Sign in to your Google Cloud account. If you're new to Google Cloud, [create an account](https://console.cloud.google.com/freetrial) to evaluate how our products perform in real-world scenarios. New customers also get $300 in free credits to run, test, and deploy workloads.\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Document AI API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=documentai.googleapis.com)\n\n- In the Google Cloud console, on the project selector page,\n select or create a Google Cloud project.\n\n | **Note**: If you don't plan to keep the resources that you create in this procedure, create a project instead of selecting an existing project. After you finish these steps, you can delete the project, removing all resources associated with the project.\n\n [Go to project selector](https://console.cloud.google.com/projectselector2/home/dashboard)\n-\n [Verify that billing is enabled for your Google Cloud project](/billing/docs/how-to/verify-billing-enabled#confirm_billing_is_enabled_on_a_project).\n\n-\n\n\n Enable the Document AI API.\n\n\n [Enable the API](https://console.cloud.google.com/flows/enableapi?apiid=documentai.googleapis.com)\n\nCreate a Form Parser processor\n\nUse the Google Cloud console to create a Form Parser processor. See [creating and managing processors](/document-ai/docs/create-processor) for more information.\n\n1. In the Google Cloud console navigation menu, click **Document AI** and\n select **Processor Gallery**.\n\n [Processor\n Gallery](https://console.cloud.google.com/ai/document-ai/processor-library)\n2. In the **Processor Gallery** ,\n search for\n **Form Parser** and select **Create**.\n\n\n3. In the side window, enter a **Processor name** , such as `quickstart-form-processor`.\n\n4. Select the region closest to you.\n\n5. Click the **Create** button.\n\nYou're taken to the **Processor Details** page of your new form parser processor.\n\nTest processor\n\nAfter creating your processor, you can send annotation requests to it.\n\n1. [Download the sample document](https://storage.googleapis.com/cloud-samples-data/documentai/GeneralProcessors/FormParser/intake-form.pdf).\n\n It's a PDF file containing a sample handwritten medical intake form. This document is stored in a publicly accessible Cloud Storage bucket.\n2. Click the\n **Upload Test Document** button and select the document you just downloaded.\n\n3. You should now be on the **Form Parser analysis** page. You can view the OCR detected text, key-value pairs, tables, and generic entities extracted from the document.\n\n\nClean up\n\nTo avoid unnecessary Google Cloud charges, use the\n[Google Cloud console](https://console.cloud.google.com/) to delete your processor and [project](https://console.cloud.google.com/cloud-resource-manager) if you don't need\nthem.\n\nWhat's next\n\n- Review the [Processors list](/document-ai/docs/processors-list)."]]