Spaces:
Sleeping
Sleeping
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 files95 unmodified lines969798991009910010110210395 unmodified lines if re.search(r'published as a conference|under review|preprint|anonymous author|proceedings of|copyright|workshop',txt,re.I): continue author_lines.append(txt) authors=' '.join(author_lines) authors=re.sub(r'\{[^}]*\}?|\S+@\S+','',authors) # e-mail lists authors=re.sub(r'\s+([\u0300-\u036f])',r'\1',authors) # 'Balunovi ́c' -> 'Balunović' authors=re.sub(r'\{[^}]*\}?|\S*@\S+','',authors) # e-mail lists authors=re.sub(r'\s+([\u0300-\u036f])(\w)',r'\2\1',authors) # 'Balunovi ́c' -> 'Balunović' (mark belongs to the next letter) authors=clean_text(unicodedata.normalize('NFC',authors))[:500] or clean_text(doc.metadata.get('author',''))[:500] asset_lines=[];assets=[] for a in chosen:pdf_pipeline.py+2-2