Spaces:
Running on Zero
Running on Zero
hanhaonan02 Claude Fable 5.1 commited on
Commit ·
f1b7085
1
Parent(s): 96e4fd5
Author line: drop bare e-mail domains, attach combining marks to the following letter
Browse files- pdf_pipeline.py +2 -2
pdf_pipeline.py
CHANGED
|
@@ -96,8 +96,8 @@ def prepare(pdf, job, instruction, canvas, accent, columns, custom_spec=''):
|
|
| 96 |
if re.search(r'published as a conference|under review|preprint|anonymous author|proceedings of|copyright|workshop',txt,re.I): continue
|
| 97 |
author_lines.append(txt)
|
| 98 |
authors=' '.join(author_lines)
|
| 99 |
-
authors=re.sub(r'\{[^}]*\}?|\S
|
| 100 |
-
authors=re.sub(r'\s+([\u0300-\u036f])',r'\1',authors)
|
| 101 |
authors=clean_text(unicodedata.normalize('NFC',authors))[:500] or clean_text(doc.metadata.get('author',''))[:500]
|
| 102 |
asset_lines=[];assets=[]
|
| 103 |
for a in chosen:
|
|
|
|
| 96 |
if re.search(r'published as a conference|under review|preprint|anonymous author|proceedings of|copyright|workshop',txt,re.I): continue
|
| 97 |
author_lines.append(txt)
|
| 98 |
authors=' '.join(author_lines)
|
| 99 |
+
authors=re.sub(r'\{[^}]*\}?|\S*@\S+','',authors) # e-mail lists
|
| 100 |
+
authors=re.sub(r'\s+([\u0300-\u036f])(\w)',r'\2\1',authors) # 'Balunovi ́c' -> 'Balunović' (mark belongs to the next letter)
|
| 101 |
authors=clean_text(unicodedata.normalize('NFC',authors))[:500] or clean_text(doc.metadata.get('author',''))[:500]
|
| 102 |
asset_lines=[];assets=[]
|
| 103 |
for a in chosen:
|