bat-6 commited on
Commit
6459fd1
·
1 Parent(s): 1a4b635
src/recommendation_engine/chatbot_engine.py CHANGED
@@ -1233,6 +1233,10 @@ Choose what you want:
1233
 
1234
  analysis["domain"] = detected
1235
  analysis["intent"] = "idea"
 
 
 
 
1236
 
1237
  else:
1238
 
 
1233
 
1234
  analysis["domain"] = detected
1235
  analysis["intent"] = "idea"
1236
+
1237
+ # Prevent treating the domain name as a weak project title
1238
+ if "project_title" in analysis:
1239
+ del analysis["project_title"]
1240
 
1241
  else:
1242
 
src/recommendation_engine/context_builder.py CHANGED
@@ -21,80 +21,48 @@ from src.recommendation_engine.config import (
21
  logger = logging.getLogger(__name__)
22
 
23
  DOMAIN_KEYWORDS = {
24
- "artificial intelligence": [
25
- "ai",
26
- "artificial intelligence",
27
- "machine learning",
28
- "ml",
29
- "deep learning",
30
- "neural network",
31
- "nlp",
32
- "computer vision"
33
  ],
34
-
35
- "healthcare": [
36
- "hospital",
37
- "health",
38
- "medical",
39
- "healthcare",
40
- "clinic",
41
- "patient"
42
  ],
43
-
44
- "fintech": [
45
- "fintech",
46
- "finance",
47
- "bank",
48
- "payment",
49
- "crypto",
50
- "blockchain"
51
  ],
52
-
53
- "education": [
54
- "education",
55
- "school",
56
- "learning",
57
- "edtech",
58
- "student",
59
- "university"
60
  ],
61
-
62
- "ecommerce": [
63
- "ecommerce",
64
- "shopping",
65
- "retail",
66
- "store",
67
- "marketplace"
68
  ],
69
-
70
- "agriculture": [
71
- "agriculture",
72
- "farming",
73
- "crop",
74
- "livestock",
75
- "smart farming"
76
  ],
77
-
78
- "security": [
79
- "security",
80
- "cyber",
81
- "cybersecurity",
82
- "threat",
83
- "attack",
84
- "malware"
85
  ],
86
-
87
- "general": [
88
- "general",
89
- "random",
90
- "anything",
91
- "any",
92
- "whatever",
93
- "surprise me",
94
- "mixed",
95
- "all",
96
- "open",
97
- "everything"
 
 
 
 
 
 
 
 
98
  ]
99
  }
100
 
@@ -222,7 +190,7 @@ def extract_domain(text: str) -> str:
222
 
223
  return domain
224
 
225
- return ""
226
 
227
  @lru_cache(maxsize=100)
228
  def cached_similarity(
 
21
  logger = logging.getLogger(__name__)
22
 
23
  DOMAIN_KEYWORDS = {
24
+ "AI & Machine Learning": [
25
+ "ai", "artificial intelligence", "machine learning", "ml", "deep learning",
26
+ "neural network", "nlp", "computer vision"
 
 
 
 
 
 
27
  ],
28
+ "Business & Finance": [
29
+ "fintech", "finance", "bank", "payment", "crypto", "blockchain", "business", "trading"
 
 
 
 
 
 
30
  ],
31
+ "Cloud & DevOps": [
32
+ "cloud", "devops", "aws", "azure", "docker", "kubernetes", "infrastructure"
 
 
 
 
 
 
33
  ],
34
+ "Cybersecurity": [
35
+ "security", "cyber", "cybersecurity", "threat", "attack", "malware", "hacking"
 
 
 
 
 
 
36
  ],
37
+ "Education": [
38
+ "education", "school", "learning", "edtech", "student", "university", "academic"
 
 
 
 
 
39
  ],
40
+ "Healthcare": [
41
+ "hospital", "health", "medical", "healthcare", "clinic", "patient", "care"
 
 
 
 
 
42
  ],
43
+ "IoT & Embedded Systems": [
44
+ "iot", "embedded", "hardware", "sensor", "arduino", "raspberry", "smart home"
 
 
 
 
 
 
45
  ],
46
+ "Web & Mobile Development": [
47
+ "web", "mobile", "app", "ios", "android", "frontend", "backend", "fullstack", "website"
48
+ ],
49
+ "Data Science & Analytics": [
50
+ "data", "analytics", "science", "big data", "dashboard", "statistics"
51
+ ],
52
+ "E-Commerce & Marketplaces": [
53
+ "ecommerce", "shopping", "retail", "store", "marketplace", "shop"
54
+ ],
55
+ "Smart Systems": [
56
+ "smart system", "automation", "smart city", "smart"
57
+ ],
58
+ "Networking & Communication": [
59
+ "networking", "communication", "telecom", "5g", "network"
60
+ ],
61
+ "Game Development": [
62
+ "game", "gaming", "unity", "unreal", "ar", "vr"
63
+ ],
64
+ "Others": [
65
+ "general", "random", "anything", "any", "whatever", "surprise me", "mixed", "all", "open", "everything", "other"
66
  ]
67
  }
68
 
 
190
 
191
  return domain
192
 
193
+ return "Others"
194
 
195
  @lru_cache(maxsize=100)
196
  def cached_similarity(
src/recommendation_engine/validator.py CHANGED
@@ -208,15 +208,11 @@ def smart_split(text: str) -> List[str]:
208
  if not p:
209
  continue
210
 
211
-
212
- subparts = re.split(r"\s*[-•▪]\s*", p)
213
-
214
- for sp in subparts:
215
-
216
- sp = sp.strip()
217
 
218
- if sp:
219
- lines.append(sp)
220
 
221
  return lines
222
 
 
208
  if not p:
209
  continue
210
 
211
+ # Remove leading bullets or hyphens instead of splitting the whole string
212
+ p = re.sub(r"^[-•▪*]\s*", "", p).strip()
 
 
 
 
213
 
214
+ if p:
215
+ lines.append(p)
216
 
217
  return lines
218