我想在我的mapreduce程序中使用nltk数据,但是当我导入nltk并从中使用函数时,它失败了。
我在某个论坛上读到我需要将所有 nltk 导入远程任务节点或类似的东西?
任何人都可以向我建议一个在我的mapreduce程序中运行nltk函数的解决方案吗
谢谢
nltk.data.path.append("/home/uname/nltk_data/")
您可以尝试使用上面的代码来指定 NLTK 将搜索数据的路径。