Skip to content

Commit c521be4

Browse files
committed
feat: add bug reporting guidance for hallucinated entries (@monperrus at work)
1 parent 7dd0d67 commit c521be4

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

check_hallucinations/main.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,10 @@ class MiscEntryError(Exception):
109109
pass
110110

111111

112+
def _report_bug():
113+
print(" If the paper truly exists in https://www.semanticscholar.org/ report a bug at https://github.com/ASSERT-KTH/check-hallucinations/ else report a bug at feedback@semanticscholar.org")
114+
115+
112116
def _extract_url(howpublished):
113117
m = re.search(r'\\url\{([^}]+)\}', howpublished)
114118
if m:
@@ -325,6 +329,7 @@ def process_bibtex_file(filepath):
325329
except Exception as e:
326330
print(e)
327331
print(f"\033[91m\nHallucinated ArXiv {i}/{len(bib_database.entries)}: {title}\033[0m")
332+
_report_bug()
328333
continue
329334

330335
howpublished = entry.get('howpublished', '')
@@ -339,6 +344,7 @@ def process_bibtex_file(filepath):
339344
except Exception as e:
340345
print(e)
341346
print(f"\033[91m\nHallucinated Misc {i}/{len(bib_database.entries)}: {title}\033[0m")
347+
_report_bug()
342348
continue
343349

344350
try:
@@ -348,6 +354,7 @@ def process_bibtex_file(filepath):
348354
except Exception as e:
349355
print(e)
350356
print(f"\033[91m\nHallucinated Entry {i}/{len(bib_database.entries)}: {title}\033[0m")
357+
_report_bug()
351358

352359

353360
def main():

0 commit comments

Comments
 (0)