[ContentUnderstanding] Add ContentRange samples for document, video, and audio.#48366
Draft
changjian-wang wants to merge 1 commit intomainfrom
Draft
[ContentUnderstanding] Add ContentRange samples for document, video, and audio.#48366changjian-wang wants to merge 1 commit intomainfrom
changjian-wang wants to merge 1 commit intomainfrom
Conversation
- Enhance ContentRangeTest with additional unit tests for various scenarios including: - Handling same start and end times. - Rejecting negative start times. - Validating time ranges and content range combinations. - Update Sample01_AnalyzeBinaryAsyncTest and Sample01_AnalyzeBinaryTest to include tests for analyzing binary documents with page content ranges. - Introduce new tests in Sample02_AnalyzeUrlAsyncTest and Sample02_AnalyzeUrlTest for analyzing URLs with page and time content ranges, ensuring proper functionality for both document and audio/video analyses.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request enhances the Azure AI Content Understanding Java SDK samples by adding comprehensive demonstrations of the
ContentRangefeature. The updates show how to analyze specific parts of documents, images, audio, and video by specifying page or time ranges, both synchronously and asynchronously. This helps users understand how to target analysis to particular sections of their content rather than processing entire files.Key additions and improvements:
ContentRange usage in binary document analysis:
Sample01_AnalyzeBinary.javashowing how to analyze specific pages or page ranges of a multi-page document usingContentRangemethods likepagesFrom,page,pages, andcombine. Demonstrates both standard and out-of-range scenarios. [1] [2] [3]ContentRange usage in asynchronous binary document analysis:
Sample01_AnalyzeBinaryAsync.javato include asynchronous demonstrations ofContentRange, using reactive streams to analyze specific pages and combinations of pages in a multi-page document. Includes error handling and sequential chaining of operations. [1] [2] [3]ContentRange usage in URL-based analysis:
Sample02_AnalyzeUrl.javato introduce examples for analyzing specific content ranges in documents, images, audio, and video accessed via URLs, including the necessary imports and method calls. [1] [2] [3]