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 lines9697989910010110210395 unmodified linesif re.search(r'published as a conference|under review|preprint|anonymous author|proceedings of|copyright|workshop',txt,re.I): continueauthor_lines.append(txt)authors=' '.join(author_lines)authors=re.sub(r'\{[^}]*\}?|\S+@\S+','',authors) # e-mail listsauthors=re.sub(r'\s+([\u0300-\u036f])',r'\1',authors) # 'Balunovi ́c' -> 'Balunović'authors=clean_text(unicodedata.normalize('NFC',authors))[:500] or clean_text(doc.metadata.get('author',''))[:500]asset_lines=[];assets=[]for a in chosen:95 unmodified lines9697989910010110210395 unmodified linesif re.search(r'published as a conference|under review|preprint|anonymous author|proceedings of|copyright|workshop',txt,re.I): continueauthor_lines.append(txt)authors=' '.join(author_lines)authors=re.sub(r'\{[^}]*\}?|\S*@\S+','',authors) # e-mail listsauthors=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