Agent_studio / modules /company_score.py
Corin1998's picture
Create company_score.py
36a9c8a verified
from __future__ import annotations
from dataclasses import dataclass
@dataclass
class CompanyScore:
fit: float
urgency: float # 直近のニーズ感
size: float # 事業規模
tech_readiness: float # 技術導入度
overall: float #総合
def score_company(name: str, website: str) -> dict:
"""
実務ではCRMや外部データを加味。ここではダミー(サイトURL有→導入度↑など)。
"""
base = 50.0
fit = base + (10.0 if name else 0)
urgency = base + (5.0 if "contact" in (website or "") else 0)
size = base + (10.0 if website and len(website) > 12 else 0)
tech = base + (10.0 if website and website.startswith("https") else 0)
overall = round((fit + urgency + sie + tech) / 4.0, 1)
return {
"name": name,
"websaite": website,
"fit": round(fit,1),
"urgency": round(urgency,1),
"size": round(size, 1),
"tech_readiness": round(tech, 1),
"overall": overall
}