feat: Add text analysis checks for CV verification
Implement four new CV verification checks without external APIs: 1. Buzzword detection - flags excessive clichés (50+ patterns) 2. Vague achievement detection - identifies weak language vs quantified results 3. Skills/job title alignment - checks skills match claimed roles (25+ role mappings) 4. Unrealistic metrics detection - flags implausible claims (>200% growth, etc.) New files: - ITextAnalysisService interface - TextAnalysisResult models - TextAnalysisService implementation (~400 lines) Integration: - Added "Analysing Content" processing stage - Flags appear under Plausibility category - TextAnalysis section added to veracity report 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
66
src/RealCV.Application/Models/TextAnalysisResult.cs
Normal file
66
src/RealCV.Application/Models/TextAnalysisResult.cs
Normal file
@@ -0,0 +1,66 @@
|
||||
namespace RealCV.Application.Models;
|
||||
|
||||
public sealed record TextAnalysisResult
|
||||
{
|
||||
public BuzzwordAnalysis BuzzwordAnalysis { get; init; } = new();
|
||||
public AchievementAnalysis AchievementAnalysis { get; init; } = new();
|
||||
public SkillsAlignmentAnalysis SkillsAlignment { get; init; } = new();
|
||||
public MetricsAnalysis MetricsAnalysis { get; init; } = new();
|
||||
public List<TextAnalysisFlag> Flags { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed record BuzzwordAnalysis
|
||||
{
|
||||
public int TotalBuzzwords { get; init; }
|
||||
public List<string> BuzzwordsFound { get; init; } = [];
|
||||
public double BuzzwordDensity { get; init; }
|
||||
}
|
||||
|
||||
public sealed record AchievementAnalysis
|
||||
{
|
||||
public int TotalStatements { get; init; }
|
||||
public int VagueStatements { get; init; }
|
||||
public int QuantifiedStatements { get; init; }
|
||||
public int StrongActionVerbStatements { get; init; }
|
||||
public List<string> VagueExamples { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed record SkillsAlignmentAnalysis
|
||||
{
|
||||
public int TotalRolesChecked { get; init; }
|
||||
public int RolesWithMatchingSkills { get; init; }
|
||||
public List<SkillMismatch> Mismatches { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed record SkillMismatch
|
||||
{
|
||||
public required string JobTitle { get; init; }
|
||||
public required string CompanyName { get; init; }
|
||||
public required List<string> ExpectedSkills { get; init; }
|
||||
public required List<string> MatchingSkills { get; init; }
|
||||
}
|
||||
|
||||
public sealed record MetricsAnalysis
|
||||
{
|
||||
public int TotalMetricsClaimed { get; init; }
|
||||
public int PlausibleMetrics { get; init; }
|
||||
public int SuspiciousMetrics { get; init; }
|
||||
public int RoundNumberCount { get; init; }
|
||||
public double RoundNumberRatio { get; init; }
|
||||
public List<SuspiciousMetric> SuspiciousMetricsList { get; init; } = [];
|
||||
}
|
||||
|
||||
public sealed record SuspiciousMetric
|
||||
{
|
||||
public required string ClaimText { get; init; }
|
||||
public required double Value { get; init; }
|
||||
public required string Reason { get; init; }
|
||||
}
|
||||
|
||||
public sealed record TextAnalysisFlag
|
||||
{
|
||||
public required string Type { get; init; }
|
||||
public required string Severity { get; init; }
|
||||
public required string Message { get; init; }
|
||||
public int ScoreImpact { get; init; }
|
||||
}
|
||||
@@ -8,6 +8,7 @@ public sealed record VeracityReport
|
||||
public List<CompanyVerificationResult> EmploymentVerifications { get; init; } = [];
|
||||
public List<EducationVerificationResult> EducationVerifications { get; init; } = [];
|
||||
public required TimelineAnalysisResult TimelineAnalysis { get; init; }
|
||||
public TextAnalysisResult? TextAnalysis { get; init; }
|
||||
public List<FlagResult> Flags { get; init; } = [];
|
||||
public required DateTime GeneratedAt { get; init; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user