Uncategorized

Hazina Content Analysis: AI-Powered Style, Topic, and Sentiment Detection

Importing content is step one. Understanding it is step two. Hazina’s Content Analysis Pipeline uses AI to automatically analyze every piece of content for writing style, topics, sentiment, and more.

What Gets Analyzed

  • Writing style – Formal vs. casual, technical vs. accessible
  • Topic extraction – Key subjects and themes
  • Sentiment – Positive, negative, neutral
  • Readability – Grade level, complexity score
  • Keywords – SEO-relevant terms and phrases

Analyzing Content

var analyzer = serviceProvider.GetRequiredService<IContentAnalyzer>();

var analysis = await analyzer.AnalyzeAsync(content);

Console.WriteLine($"Style: {analysis.WritingStyle}");
Console.WriteLine($"Topics: {string.Join(", ", analysis.Topics)}");
Console.WriteLine($"Sentiment: {analysis.Sentiment.Label} ({analysis.Sentiment.Score:P0})");
Console.WriteLine($"Readability: Grade {analysis.ReadabilityGrade}");

Building a Writing Profile

Analyze multiple pieces of content to build a writing profile:

var profile = await analyzer.BuildWritingProfileAsync(
    contents: allBlogPosts,
    profileName: "My Blog Voice"
);

Console.WriteLine($"Typical sentence length: {profile.AvgSentenceLength} words");
Console.WriteLine($"Vocabulary level: {profile.VocabularyLevel}");
Console.WriteLine($"Preferred topics: {string.Join(", ", profile.TopTopics)}");
Console.WriteLine($"Tone: {profile.Tone}");

AI Inspiration Engine

Use the writing profile to generate content suggestions that match your voice:

var engine = serviceProvider.GetRequiredService<IContentInspirationEngine>();

var suggestions = await engine.GenerateIdeasAsync(new InspirationContext {
    WritingProfile = profile,
    RecentTopics = recentPosts.Select(p => p.Title),
    TargetAudience = "Tech-savvy business owners",
    Count = 5
});

foreach (var idea in suggestions)
{
    Console.WriteLine($"Title: {idea.SuggestedTitle}");
    Console.WriteLine($"Hook: {idea.OpeningHook}");
    Console.WriteLine($"Keywords: {string.Join(", ", idea.SuggestedKeywords)}");
}

Batch Analysis

Analyze your entire content library at once:

var results = await analyzer.AnalyzeBatchAsync(allContent, new AnalysisOptions {
    IncludeStyle = true,
    IncludeTopics = true,
    IncludeSentiment = true,
    ParallelDegree = 4  // Process 4 at a time
});

In the next post, we’ll explore Hazina’s Observability features – monitoring, health checks, and logging.

Terug naar overzicht
ENNL