Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public sealed partial class QualityEvaluationDone
public required global::System.Collections.Generic.IList<global::DeepL.QualityEvaluationSegment> Segments { get; set; }

/// <summary>
/// Aggregate counts of issues across all segments.
/// Aggregate quality results across all segments.
/// </summary>
[global::System.Text.Json.Serialization.JsonPropertyName("summary")]
[global::System.Text.Json.Serialization.JsonRequired]
Expand All @@ -54,7 +54,7 @@ public sealed partial class QualityEvaluationDone
/// One entry per submitted segment, in request order.
/// </param>
/// <param name="summary">
/// Aggregate counts of issues across all segments.
/// Aggregate quality results across all segments.
/// </param>
/// <param name="status">
/// Example: done
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,19 @@
namespace DeepL
{
/// <summary>
/// Aggregate counts of issues across all segments.
/// Aggregate quality results across all segments.
/// </summary>
public sealed partial class QualityEvaluationDoneSummary
{
/// <summary>
/// Overall translation quality, from 0 (lowest) to 100 (highest). See [Summary](/api-reference/quality-evaluation/poll#summary).<br/>
/// Example: 72
/// </summary>
/// <example>72</example>
[global::System.Text.Json.Serialization.JsonPropertyName("overall_score")]
[global::System.Text.Json.Serialization.JsonRequired]
public required int OverallScore { get; set; }

/// <summary>
/// Nested counts keyed by `type`, then `sub_type`, then `severity`. Leaf values are integer counts.<br/>
/// Example: {"Accuracy":{"Mistranslation":{"Critical":1,"Minor":1},"Omission":{"Major":1}}}
Expand All @@ -26,6 +35,10 @@ public sealed partial class QualityEvaluationDoneSummary
/// <summary>
/// Initializes a new instance of the <see cref="QualityEvaluationDoneSummary" /> class.
/// </summary>
/// <param name="overallScore">
/// Overall translation quality, from 0 (lowest) to 100 (highest). See [Summary](/api-reference/quality-evaluation/poll#summary).<br/>
/// Example: 72
/// </param>
/// <param name="granularCounts">
/// Nested counts keyed by `type`, then `sub_type`, then `severity`. Leaf values are integer counts.<br/>
/// Example: {"Accuracy":{"Mistranslation":{"Critical":1,"Minor":1},"Omission":{"Major":1}}}
Expand All @@ -34,8 +47,10 @@ public sealed partial class QualityEvaluationDoneSummary
[global::System.Diagnostics.CodeAnalysis.SetsRequiredMembers]
#endif
public QualityEvaluationDoneSummary(
int overallScore,
object granularCounts)
{
this.OverallScore = overallScore;
this.GranularCounts = granularCounts ?? throw new global::System.ArgumentNullException(nameof(granularCounts));
}

Expand Down
10 changes: 9 additions & 1 deletion src/libs/DeepL/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3471,6 +3471,7 @@ paths:
- start: 38
end: 48
summary:
overall_score: 72
granular_counts:
Accuracy:
Mistranslation:
Expand Down Expand Up @@ -6428,9 +6429,16 @@ components:
summary:
type: object
required:
- overall_score
- granular_counts
description: Aggregate counts of issues across all segments.
description: Aggregate quality results across all segments.
properties:
overall_score:
type: integer
minimum: 0
maximum: 100
description: Overall translation quality, from 0 (lowest) to 100 (highest). See [Summary](/api-reference/quality-evaluation/poll#summary).
example: 72
granular_counts:
type: object
description: Nested counts keyed by `type`, then `sub_type`, then `severity`. Leaf values are integer counts.
Expand Down