即使已安装Python Normalise模块,也未找到该模块

2024-09-28 19:00:16 发布

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

我已经为python版本0.1.8安装了normalise模块,如下所示: Installation

这是我调用模块的代码:

import normalise
exampletext= open("example_text2.txt").read()
user_abbr = {
    "N.A.T.O": "North Atlantic Treaty Organization"
}

normalized_tokens = normalise(word_tokenize(exampletext), user_abbrevs=user_abbr, verbose=False)
display(f"Normalized text: {' '.join(normalized_tokens)}")

但是,它总是返回一个错误,即找不到normalise模块:Error

谢谢你的帮助。谢谢


Tags: 模块代码import版本txtexampleinstallationopen