Nutrient Web SDK

ReferenceAIADocumentChangesAnalysisResponse

Interface AIADocumentChangesAnalysisResponse

Response from AI analysis service containing a high-level summary and categorization of document changes. This is returned when using NutrientViewer.AIComparisonOperationType.ANALYZE.

Interface

Example

// After running an ANALYZE operation
if (NutrientViewer.isAIDocumentAnalysisResult(result)) {
console.log(`Summary: ${result.summary}`);
// Example: "The document has undergone significant legal revisions with updated terminology and new clauses."

console.log(`Categories: ${result.categories.join(', ')}`);
// Example: ["Legal Changes", "Terminology Updates", "Content Addition"]

// Access detailed changes
console.log(`Total changes: ${result.changes.changes.size}`);
}

Properties

string[]

Array of AI-detected change categories representing the types of modifications (e.g., "Formatting", "Content Addition", "Legal Changes", "Rewording")

The underlying standard document comparison result containing detailed text hunks and change operations

string

AI-generated natural language summary describing the overall nature of changes between the compared documents