gpt4 book ai didi

python - 属性错误 : module 'regex' has no attribute 'Pattern'

转载 作者:行者123 更新时间:2023-12-02 01:57:56 50 4
gpt4 key购买 nike

尝试在 google colab 中运行此代码时出现此错误:

!pip install dataprep
from dataprep.eda import create_report

错误:

NumExpr defaulting to 2 threads.
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-2-db62224f8a79> in <module>()
----> 1 from dataprep.eda import create_report

10 frames
/usr/local/lib/python3.7/dist-packages/nltk/tokenize/casual.py in TweetTokenizer()
355
356 @property
--> 357 def WORD_RE(self) -> regex.Pattern:
358 """Core TweetTokenizer regex"""
359 # Compiles the regex for this and all future instantiations of TweetTokenizer.

AttributeError: module 'regex' has no attribute 'Pattern'

事情很奇怪,因为这段代码昨天运行良好。有什么想法吗?

Error

最佳答案

这看起来像一个 known issue in NLTK .也许更新 NLTK 版本。

关于python - 属性错误 : module 'regex' has no attribute 'Pattern' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69405949/

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