File size: 1,709 Bytes
00bdc86
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
from scoring.corpus import corpus_score, corpus_recommendation
from scoring.structure import structure_score, structure_recommendation
from scoring.quality import quality_score, quality_recommendation
from scoring.hygiene import hygiene_score, hygiene_recommendation

def compute_full_geo(input_text: str) -> dict:
    """
    Combine all four scoring modules. Compute:
      - corpus_score     (0–100)
      - structure_score  (0–100)
      - quality_score    (0–100)
      - hygiene_score    (0–100)
      - geo_score        = average of all four
      - recommendations: dict with four strings
    """
    # 1. Corpus Presence & Authority
    c_score = corpus_score(input_text)
    c_rec   = corpus_recommendation(input_text, c_score)

    # 2. Extractability & Structure
    s_score = structure_score(input_text)
    s_rec   = structure_recommendation(input_text, s_score)

    # 3. Content Quality & E-E-A-T
    q_score = quality_score(input_text)
    q_rec   = quality_recommendation(input_text, q_score)

    # 4. Technical AI-Crawl Hygiene
    h_score = hygiene_score(input_text)
    h_rec   = hygiene_recommendation(input_text, h_score)

    # Weighted GEO Score (equal 25% each)
    geo_score = int(
        0.25 * c_score +
        0.25 * s_score +
        0.25 * q_score +
        0.25 * h_score
    )

    recommendations = {
        "corpus":    c_rec,
        "structure": s_rec,
        "quality":   q_rec,
        "hygiene":   h_rec
    }

    return {
        "corpus_score":    c_score,
        "structure_score": s_score,
        "quality_score":   q_score,
        "hygiene_score":   h_score,
        "geo_score":       geo_score,
        "recommendations": recommendations
    }