system-prompts-and-models-o.../dealix/auto_client_acquisition/meeting_intelligence/objection_extractor.py
Sami Assiri b13cb389cc feat(dealix): sync full Dealix package to repo
- API routers, ACA modules, integrations (draft operators)
- Docs, landing pages, scripts (launch readiness, scorecard)
- Tests and CI workflow updates for Dealix

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-05-01 21:01:17 +03:00

18 lines
610 B
Python

"""Extract objection-like phrases from transcript text — keyword MVP."""
from __future__ import annotations
import re
from typing import Any
_KEYWORDS = ("ميزانية", "غالي", "لاحقاً", "نراجع", "ليس أولوية", "تكامل", "أمان", "عقد", "منافس")
def extract_objections(transcript_text: str) -> dict[str, Any]:
text = transcript_text or ""
found: list[str] = []
for kw in _KEYWORDS:
if re.search(re.escape(kw), text, flags=re.IGNORECASE):
found.append(kw)
return {"objections_ar": list(dict.fromkeys(found))[:8], "demo": True}