using System.Text.Json.Serialization;
namespace FinlyticCore.Dtos.Sentiment;
///
/// Probabilities dictionary containing positive, negative, and neutral softmax scores.
///
public record FinBertProbabilities
{
///
/// Gets or sets the positive probability score (0.0 to 1.0).
///
[JsonPropertyName("positive")]
public double Positive { get; init; }
///
/// Gets or sets the negative probability score (0.0 to 1.0).
///
[JsonPropertyName("negative")]
public double Negative { get; init; }
///
/// Gets or sets the neutral probability score (0.0 to 1.0).
///
[JsonPropertyName("neutral")]
public double Neutral { get; init; }
}
///
/// Data transfer object holding the result of a FinBERT sentiment analysis.
///
public record FinBertResultDto
{
///
/// Gets or sets the dominant sentiment label ("POSITIVE", "NEGATIVE", "NEUTRAL").
///
[JsonPropertyName("label")]
public string Label { get; init; } = "NEUTRAL";
///
/// Gets or sets the compound score (-1.0 to +1.0).
///
[JsonPropertyName("compoundScore")]
public double CompoundScore { get; init; }
///
/// Gets or sets the highest confidence score (0.0 to 1.0).
///
[JsonPropertyName("confidence")]
public double Confidence { get; init; }
///
/// Gets or sets the probability breakdown.
///
[JsonPropertyName("probabilities")]
public FinBertProbabilities Probabilities { get; init; } = new();
///
/// Gets or sets the short summary snippet highlighting the impact of the article.
///
[JsonPropertyName("summarySnippet")]
public string? SummarySnippet { get; init; }
}