避免作者名拆分Python

2024-10-03 19:31:17 发布

您现在位置:Python中文网/ 问答频道 /正文

我正在读一个PDF文件,并以分隔符('')为基础拆分整个文本,但是PDF也包含这样的作者姓名

Similar to the work of Valenzuela et al. [1] and Zhu et al. [2], we use features like citations from citing to cited paper, citations per section, and author overlap.

我的代码把这一行分成3行

  • 类似于Valenzuela等人
  • [1] 朱等人
  • [2] ,我们使用从引用到被引用论文的引文等功能, 每节引文和作者重叠

这里是我的代码读取pdf文本和分裂它

from tika import parser
import re

rege x = re.compile(r'\[\d]')

objFile = parser.from_file('read.pdf')
text = objFile['content']
lstString = text.strip()
lstString = lstString.split(".")

有人能帮我怎样才能避免作者名字分裂吗


Tags: andto代码from文本importparserpdf