模块“regex”没有属性“Pattern”

2024-06-02 12:26:08 发布

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

我试图导入daptaprep.eda,但得到一个“regex”模块错误。我寻找了类似的问题,答案经常是关于一个名为“re”ou“regex”的文件,但在colab(Python 3.7.12)上找不到任何问题

    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'

Tags: 模块文件答案redef错误ouproperty