ItsMaxNorm commited on
Commit
0cc41fc
·
1 Parent(s): a23c0ea

Fix conference name case sensitivity - normalize iclr→ICLR, nips→NeurIPS

Browse files
Files changed (1) hide show
  1. app.py +48 -2
app.py CHANGED
@@ -122,6 +122,52 @@ app.add_middleware(
122
  )
123
 
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  # =============================================================================
126
  # Endpoints
127
  # =============================================================================
@@ -163,7 +209,7 @@ async def get_community_papers(
163
  params.append(year)
164
  if conference:
165
  where_clauses.append("conference = ?")
166
- params.append(conference)
167
  if source:
168
  where_clauses.append("source = ?")
169
  params.append(source)
@@ -328,7 +374,7 @@ async def search_papers(
328
  if not ready:
329
  raise HTTPException(status_code=503, detail="Database loading")
330
 
331
- conf_list = [c.strip() for c in conferences.split(",")] if conferences else None
332
 
333
  # Try FTS first
334
  try:
 
122
  )
123
 
124
 
125
+ # =============================================================================
126
+ # Conference Name Normalization
127
+ # =============================================================================
128
+
129
+ # Map of lowercase aliases → canonical names stored in the parquet
130
+ _CONFERENCE_ALIASES = {
131
+ "nips": "NeurIPS",
132
+ "neurips": "NeurIPS",
133
+ "iclr": "ICLR",
134
+ "icml": "ICML",
135
+ "cvpr": "CVPR",
136
+ "iccv": "ICCV",
137
+ "eccv": "ECCV",
138
+ "aaai": "AAAI",
139
+ "ijcai": "IJCAI",
140
+ "acl": "ACL",
141
+ "emnlp": "EMNLP",
142
+ "naacl": "NAACL",
143
+ "coling": "COLING",
144
+ "colm": "COLM",
145
+ "icra": "ICRA",
146
+ "iros": "IROS",
147
+ "rss": "RSS",
148
+ "corl": "CoRL",
149
+ "kdd": "KDD",
150
+ "www": "WWW",
151
+ "aistats": "AISTATS",
152
+ "uai": "UAI",
153
+ "colt": "COLT",
154
+ "acml": "ACML",
155
+ "wacv": "WACV",
156
+ "siggraph": "SIGGRAPH",
157
+ "siggraphasia": "SIGGRAPHASIA",
158
+ "acmmm": "ACMMM",
159
+ "3dv": "3DV",
160
+ "automl": "AutoML",
161
+ "alt": "ALT",
162
+ "ai4x": "AI4X",
163
+ }
164
+
165
+
166
+ def _normalize_conference(name: str) -> str:
167
+ """Normalize conference name to match parquet data (uppercase)."""
168
+ return _CONFERENCE_ALIASES.get(name.lower(), name.upper())
169
+
170
+
171
  # =============================================================================
172
  # Endpoints
173
  # =============================================================================
 
209
  params.append(year)
210
  if conference:
211
  where_clauses.append("conference = ?")
212
+ params.append(_normalize_conference(conference))
213
  if source:
214
  where_clauses.append("source = ?")
215
  params.append(source)
 
374
  if not ready:
375
  raise HTTPException(status_code=503, detail="Database loading")
376
 
377
+ conf_list = [_normalize_conference(c.strip()) for c in conferences.split(",")] if conferences else None
378
 
379
  # Try FTS first
380
  try: