-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TextAnalytics] Implemented ExtractiveSummarization input (#22791)
Co-authored-by: Mariana Rios Flores <[email protected]>
- Loading branch information
Showing
13 changed files
with
200 additions
and
65 deletions.
There are no files selected for viewing
This file contains 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
46 changes: 46 additions & 0 deletions
46
sdk/textanalytics/Azure.AI.TextAnalytics/src/ExtractSummaryAction.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
namespace Azure.AI.TextAnalytics | ||
{ | ||
/// <summary> | ||
/// Configurations that allow callers to specify details about how to execute | ||
/// an Extractive Text Summarization action in a set of documents. | ||
/// For example, set the model version, specify the order in which extracted | ||
/// sentences are returned, and more. | ||
/// </summary> | ||
public class ExtractSummaryAction | ||
{ | ||
/// <summary> | ||
/// Initializes a new instance of the <see cref="ExtractSummaryAction"/> | ||
/// class which allows callers to specify details about how to execute | ||
/// an Extractive Text Summarization action in a set of documents. | ||
/// For example, set the model version, specify the order in which extracted | ||
/// sentences are returned, and more. | ||
/// </summary> | ||
public ExtractSummaryAction() | ||
{ | ||
} | ||
|
||
/// <summary> | ||
/// Gets or sets a value that, if set, indicates the version of the text | ||
/// analytics model that will be used to generate the result. For supported | ||
/// model versions, see operation-specific documentation, for example: | ||
/// <see href="https://docs.microsoft.com/azure/cognitive-services/text-analytics/concepts/model-versioning#available-versions"/>. | ||
/// </summary> | ||
public string ModelVersion { get; set; } | ||
|
||
/// <summary> | ||
/// If set, specifies the maximum limit of sentences returned in the result. Defaults to 3. | ||
/// </summary> | ||
public int? MaxSentenceCount { get; set; } | ||
|
||
/// <summary> | ||
/// If set, specifies the order in which the extracted sentences will be returned in the result. Use | ||
/// <see cref="SummarySentencesOrder.Offset"/> to keep the original order in which the sentences appear | ||
/// in the input. Use <see cref="SummarySentencesOrder.Rank"/> to order them according to their relevance | ||
/// to the document input, as decided by the service. Defaults to <see cref="SummarySentencesOrder.Offset"/>. | ||
/// </summary> | ||
public SummarySentencesOrder? OrderBy { get; set; } | ||
} | ||
} |
3 changes: 2 additions & 1 deletion
3
...TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.Serialization.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 3 additions & 1 deletion
4
...tics/Azure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParameters.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
51 changes: 0 additions & 51 deletions
51
...zure.AI.TextAnalytics/src/Generated/Models/ExtractiveSummarizationTaskParametersSortBy.cs
This file was deleted.
Oops, something went wrong.
28 changes: 28 additions & 0 deletions
28
...lytics/Azure.AI.TextAnalytics/src/Generated/Models/SummarySentencesOrder.Serialization.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
9 changes: 0 additions & 9 deletions
9
...lytics/Azure.AI.TextAnalytics/src/Internal/ExtractiveSummarizationTaskParametersSortBy.cs
This file was deleted.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
sdk/textanalytics/Azure.AI.TextAnalytics/src/SummarySentencesOrder.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
// Copyright (c) Microsoft Corporation. All rights reserved. | ||
// Licensed under the MIT License. | ||
|
||
using Azure.Core; | ||
|
||
namespace Azure.AI.TextAnalytics | ||
{ | ||
/// <summary> | ||
/// The order in which extracted sentences will be returned on extractive text summarization. | ||
/// </summary> | ||
[CodeGenModel("ExtractiveSummarizationTaskParametersSortBy")] | ||
public enum SummarySentencesOrder | ||
{ | ||
/// <summary> | ||
/// Keeps the original order in which the sentences appear in the input. | ||
/// </summary> | ||
Offset, | ||
|
||
/// <summary> | ||
/// Orders sentences according to their relevance to the document input, as decided by the service. | ||
/// </summary> | ||
Rank | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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