Word Object Members
Explore Word object members in SuiteScript 2.1 for text extraction and confidence processing in document capture.
The Word object in SuiteScript 2.1 includes key members for processing extracted text from documents. These members allow developers to utilize confidence levels and text strings effectively, facilitating more accurate document handling in NetSuite applications.
What Are Word Object Members?
Word object members consist of properties that provide details about text extracted from documents processed via the document capture features in SuiteScript. Two main properties are defined for this object:
| Member Name | Return Type | Supported Script Types | Description |
|---|---|---|---|
Word.confidence | number | Server scripts | Indicates the confidence level of the extracted word. |
Word.text | string | Server scripts | Contains the actual text of the extracted word. |
Detailed Description of Properties
Confidence Property
Word.confidence: This property returns a number between 0 and 1, reflecting the confidence level of the extracted text. For instance, a value of0.95implies a 95% confidence in the word's accuracy. Developers can use this property to set acceptance thresholds, filtering out lower-confidence words to minimize errors.
Text Property
Word.text: This property fetches the actual text that has been extracted from the document. It is important for cases where precise text representation is necessary for further processing.
Error Handling
Errors can arise while processing these properties, notably:
READ_ONLY: Triggered when attempting to set values for these properties, which are designed to be read-only.
Example Usage in SuiteScript
Here’s a syntax example illustrating how to work with Word object members in SuiteScript:
1const extractedData = documentCapture.documentToStructure({2 file: file.load("SuiteScripts/sample_parking_application.pdf"),3 documentType: documentCapture.DocumentType.OTHERS,4 features: [documentCapture.Feature.TEXT_EXTRACTION]5});6 7const wordToProcess = extractedData.pages[0].words[0];8 9if (wordToProcess.confidence > 0.9) {10 // Accept the word11} else {12 // Reject the word13}In this example, the script checks the confidence level of the first word extracted from a document. If the confidence is over 0.9, it accepts the word; otherwise, it rejects it.
Who This Affects
This content is particularly relevant for:
- Developers who implement document processing features using SuiteScript.
- Administrators managing configurations related to document capture and text extraction processes.
Key Takeaways
- Word object members in SuiteScript 2.1 are essential for handling text extraction from documents.
- The
Word.confidenceproperty assists in establishing thresholds to ensure data accuracy. - Developers should handle read-only properties carefully to avoid runtime errors.
Frequently Asked Questions (4)
How can I use the Word.confidence property in SuiteScript 2.1?
What types of scripts support the Word object members in SuiteScript 2.1?
What error might occur when using the Word object properties, and how can it be avoided?
Is it possible to modify the text contained in the Word.text property?
Was this article helpful?
More in Integration
- Natural Language Queries in NetSuite AI
MCP Standard Tools SuiteApp enables AI-driven data tasks in NetSuite, aligned with role permissions.
- Square Connector Integration in NetSuite 2026.1
Discover the Square Connector for seamless integration with NetSuite 2026.1, synchronizing transactions, orders, and inventory effortlessly.
- SuiteTalk Web Services Updates for NetSuite Integrations
SuiteTalk Web Services adds new Item Supply Plan support, enhancing integrations for efficient data management.
- SuiteTalk Web Services Enhancements in NetSuite
Explore the latest enhancements to SuiteTalk Web Services, improving integration and API functionalities in NetSuite.
Advertising
Reach Integration Professionals
Put your product in front of NetSuite experts who work with Integration every day.
Sponsor This Category