How to Extract Text and Predict Sentiment from Scanned Forms?

You work for a hotel and have a dataset that contains customers’ written comments scanned from paper-based customer feedback forms, which are stored as PDF files. Every form has the same layout. You need to quickly predict an overall satisfaction score from the customer comments on each form. How should you accomplish this task?

  1. Use the Vision API to parse the text from each PDF file. Use the Natural Language API analyzeSentiment feature to infer overall satisfaction scores.
  2. Use the Vision API to parse the text from each PDF file. Use the Natural Language API analyzeEntitySentiment feature to infer overall satisfaction scores.
  3. Uptrain a Document AI custom extractor to parse the text in the comments section of each PDF file. Use the Natural Language API analyzeSentiment feature to infer overall satisfaction scores. Source Reference Answer
  4. Uptrain a Document AI custom extractor to parse the text in the comments section of each PDF file. Use the Natural Language API analyzeEntitySentiment feature to infer overall satisfaction scores.

Community Votes

C
57%
A
43%

57% of anonymous learners picked answer C. Votes are pick records left by other test-takers — they are not the verified answer.

Community Insight

It tests your ability to match document layout characteristics with the correct extraction tool while avoiding the trap of misusing entity-level sentiment analysis for holistic scoring.

This question evaluates selecting appropriate Google Cloud services for structured document extraction and sentiment analysis. The community consensus prioritizes Document AI for reliable form parsing combined with the Natural Language API's overall sentiment endpoint.

Option A is frequently selected because candidates focus on the word 'quickly' and assume pre-trained Vision API avoids training overhead, ignoring that production-grade ML exams prioritize extraction accuracy and scalability over initial setup speed.

Community Discussion (13 comments)

fitri001 👍 5 Selected: C
Document AI custom extractor: Since the layout of the feedback forms is consistent, training a custom extractor in Document AI allows for efficient and accurate extraction of the specific comments section. This ensures the Natural Language API receives the relevant text for sentiment analysis. Natural Language API - analyzeSentiment: This functionality within the Natural Language API is specifically designed to analyze sentiment in a piece of text. It provides an overall sentiment score that can be mapped to a satisfaction score (e.g., high positive sentiment translates to high satisfaction).
Kalai_1 👍 1 Selected: C
Document AI best fit for this use case.
Ankit267 👍 1 Selected: A
"quickly" is the differentiator between A & C
Pau1234 👍 1 Selected: C
DocumentAI is perfect for the case. Since the question says: "overall satisfaction", then entity is not needed.
lunalongo 👍 1 Selected: A
In summary, option A offers the optimal balance of speed, accuracy, and simplicity for this specific task. Using the pre-trained APIs is faster and requires less expertise than training a custom model. The analyzeSentiment function directly addresses the need for an overall satisfaction score. Why not D? If speed is the absolute priority and the layout is truly consistent, the Vision API's speed might outweigh the potential for slightly improved accuracy from a custom extractor.
Foxy2021 👍 1
My vote is a. It is simple and do the job.
AzureDP900 👍 1
C is right Document AI custom extractor: Allows you to train a custom model to extract relevant information (in this case, customer comments) from the PDF files. Natural Language API analyzeSentiment feature: Analyzes the sentiment of the extracted text to predict an overall satisfaction score.
bobjr 👍 2 Selected: A
C & D are overkill We don't care about entities sentiment -> B is out Left with A and https://cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeSentiment
pinimichele01 👍 2 Selected: A
quickly predict an overall satisfaction -> a
edoo 👍 3 Selected: A
I go with A, because "you need quickly predict", no time for fine-tunning.
guilhermebutzke 👍 2 Selected: C
My answer: Letter C Document AI is a suitable tool for cases where there are patterns of forms or documentation. Additionally, it is possible to directly read PDF files. In the Natural Language API, the analyzeSentiment function can determine the overall sentiment, as the text asks, "You need to quickly predict an overall satisfaction." The analyzeEntitySentiment function provides a score for each entity or word found. https://cloud.google.com/natural-language/docs/basics
ddogg 👍 1 Selected: C
Document AI custom extractor: This allows you to tailor the text extraction specifically to the layout and format of your customer feedback forms, ensuring accurate capture of the comments section. Natural Language API analyzeSentiment: This feature analyzes the extracted text and provides an overall sentiment score, which can be used to gauge customer satisfaction.
pikachu007 👍 2 Selected: C
Precision in text extraction: Document AI is specifically designed for extracting text from structured documents like forms, ensuring accurate extraction of comments, even with varying handwriting styles. Custom model for form layout: Training a custom extractor tailored to the hotel's feedback form layout further enhances accuracy and targets the relevant comments section effectively. Sentiment analysis: Natural Language API's analyzeSentiment feature analyzes overall sentiment in a text block, aligning with the goal of deriving overall satisfaction scores.

Comments & Corrections

No comments yet — spotted an error or have a note? Share it below.

Log in to comment, report an error, or add a note about this question.

Submitted for moderation before publishing. Keep it helpful and respectful.

Expert Analysis

Why the Answer Is Correct

Document AI custom extractors are purpose-built for processing high volumes of structured documents with consistent layouts. Training a custom model guarantees precise isolation of the comments section, filtering out static form elements. When paired with the Natural Language API's analyzeSentiment feature, this architecture directly yields a single polarity score aligned with the overall satisfaction requirement.

Why the Other Options Are Wrong

Options B and D incorrectly utilize analyzeEntitySentiment, which calculates sentiment per extracted entity rather than providing a unified document-level assessment. Option A relies on the Vision API, which performs broad OCR but lacks the contextual awareness needed to consistently target specific form regions. In certification scenarios, architectural robustness and data precision consistently outweigh assumptions about raw inference speed.

Community Comment Notes

Several candidates debate the 'quickly predict' phrasing, arguing that pre-trained APIs eliminate model training time [2][8]. However, seasoned professionals emphasize that Document AI custom extractors are specifically optimized for repetitive form structures, ensuring higher long-term accuracy [6][12]. Multiple comments correctly dismiss entity-based sentiment as unnecessary when only a global satisfaction metric is requested [9][13].

Official Reference

Exam Strategy

Prioritize Document AI custom models whenever a question specifies consistent layouts or requires extracting data from specific regions of a document. Disregard speed-related keywords if they push you toward generic APIs; cloud engineering exams reward scalable, accurate pipelines over temporary workarounds.

Related Analysis

Practice All PMLE Questions

Access 65 questions with complete answers and detailed explanations.

View Full PMLE Practice Test →

← Back to PMLE Study Guide