gpt4 book ai didi

python - 引用字符串解析器

转载 作者:太空宇宙 更新时间:2023-11-03 21:05:11 25 4
gpt4 key购买 nike

我有很多像这样的字符串。 Python 中有可以提取姓名、日记、日期、标题等的库吗?

Wallace, Kelly. "Bush Stands Pat on Stem Cell Policy." CNN. 13 Aug. 2001.

我尝试使用 pybtex,但没有返回任何字符串,它必须采用特定格式。

from pybtex.database import parse_file,parse_string
print(parse_string('Wallace, Kelly. "Bush Stands Pat on Stem Cell Policy." CNN. 13 Aug. 2001.','bibtex'))
# it returns nothing
BibliographyData(entries=OrderedCaseInsensitiveDict([]), preamble=[])

最佳答案

您似乎正在寻找 NLP 解决方案。查看 NLTK:https://www.nltk.org/

没有任何固定的格式,NLP 就是最佳选择。

关于python - 引用字符串解析器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55456745/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com