@lynxflow/seo-engine 2.1.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,31 @@
1
+ /**
2
+ * ✍️ Readability, Passive Voice & Sentence Complexity Analyzer
3
+ * Analyzes sentence length variance, passive voice frequency, and paragraph density
4
+ * across English, French, German, and Spanish.
5
+ */
6
+ export interface SentenceDetail {
7
+ text: string;
8
+ wordCount: number;
9
+ isPassive: boolean;
10
+ isTooLong: boolean;
11
+ }
12
+ export interface ReadabilityComplexityReport {
13
+ totalSentences: number;
14
+ totalWords: number;
15
+ averageWordsPerSentence: number;
16
+ passiveVoiceRatio: number;
17
+ passiveSentencesCount: number;
18
+ complexSentencesCount: number;
19
+ gradeLevelEstimate: number;
20
+ readabilityEaseScore: number;
21
+ status: "clear_and_punchy" | "acceptable" | "hard_to_read";
22
+ keyWarnings: string[];
23
+ sentences: SentenceDetail[];
24
+ }
25
+ export declare class PassiveVoiceComplexityAnalyzer {
26
+ private static readonly PASSIVE_PATTERNS;
27
+ /**
28
+ * Analyzes text for passive voice, sentence complexity, and readability.
29
+ */
30
+ static analyze(text: string, language?: string): ReadabilityComplexityReport;
31
+ }
@@ -0,0 +1,43 @@
1
+ /**
2
+ * 🔍 Semantic Cannibalization & Keyword Overlap Detector
3
+ * Analyzes large programmatic page hubs (10,000+ pages) to detect semantic collisions,
4
+ * title duplicates, and keyword cannibalization between neighboring locations or services.
5
+ */
6
+ export interface PageCrawlNode {
7
+ urlPath: string;
8
+ title: string;
9
+ h1: string;
10
+ targetKeywords?: string[];
11
+ }
12
+ export interface CannibalizationAlert {
13
+ primaryUrl: string;
14
+ conflictingUrl: string;
15
+ similarityScore: number;
16
+ conflictType: "exact_title" | "high_semantic_overlap" | "keyword_collision";
17
+ sharedTokens: string[];
18
+ recommendation: string;
19
+ }
20
+ export interface CannibalizationAuditSummary {
21
+ totalPagesAudited: number;
22
+ totalAlerts: number;
23
+ criticalCount: number;
24
+ moderateCount: number;
25
+ alerts: CannibalizationAlert[];
26
+ }
27
+ export declare class SemanticCannibalizationDetector {
28
+ /**
29
+ * Tokenizes text and strips common punctuation for n-gram comparison.
30
+ */
31
+ private static tokenize;
32
+ /**
33
+ * Computes Jaccard similarity between two token sets (0.0 to 1.0).
34
+ */
35
+ private static jaccardSimilarity;
36
+ /**
37
+ * Audits a collection of pages and returns cannibalization risks.
38
+ */
39
+ static auditPages(pages: PageCrawlNode[], options?: {
40
+ similarityThreshold?: number;
41
+ maxAlerts?: number;
42
+ }): CannibalizationAuditSummary;
43
+ }
@@ -0,0 +1,34 @@
1
+ /**
2
+ * 📏 SERP Content Length Comparator
3
+ * Analyzes top 10-20 SERP competitor word counts, computes statistical benchmarks
4
+ * (Median, 75th Percentile, Top 3 Average), and recommends the optimal content length.
5
+ */
6
+ export interface CompetitorWordCount {
7
+ url: string;
8
+ title?: string;
9
+ rank: number;
10
+ wordCount: number;
11
+ }
12
+ export interface SerpLengthAnalysis {
13
+ userWordCount: number;
14
+ targetQuery: string;
15
+ competitorCount: number;
16
+ competitors: CompetitorWordCount[];
17
+ stats: {
18
+ min: number;
19
+ max: number;
20
+ median: number;
21
+ p75: number;
22
+ top3Average: number;
23
+ recommendedTargetWords: number;
24
+ };
25
+ gapToTarget: number;
26
+ status: "insufficient" | "optimal" | "excessive";
27
+ actionPlan: string;
28
+ }
29
+ export declare class SerpLengthComparator {
30
+ /**
31
+ * Evaluates content length against real or simulated SERP competitor word counts.
32
+ */
33
+ static compareLength(userWordCount: number, targetQuery: string, competitors?: CompetitorWordCount[]): SerpLengthAnalysis;
34
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lynxflow/seo-engine",
3
- "version": "2.1.1",
3
+ "version": "2.3.0",
4
4
  "description": "High-Performance Universal Programmatic SEO & AI Search Engine SDK",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",