Python Mosestokenizer问题:[WinError 2]系统找不到指定的文件

Python Mosestokenizer问题:[WinError 2]系统找不到指定的文件,python,nlp,anaconda,nltk,tokenize,Python,Nlp,Anaconda,Nltk,Tokenize,不明白为什么会出现这个问题 from mosestokenizer import MosesDetokenizer with MosesDetokenizer('en') as detokenize: print(detokenize(["hi", 'my', 'name', 'is', 'artem'])) 这就是我得到的: stdbuf was not found; communication with perl may hang due to stdio buffering.

不明白为什么会出现这个问题

from mosestokenizer import MosesDetokenizer

with MosesDetokenizer('en') as detokenize:
    print(detokenize(["hi", 'my', 'name', 'is', 'artem']))
这就是我得到的:

stdbuf was not found; communication with perl may hang due to stdio buffering.
Traceback (most recent call last):
  File "C:\Users\ArtemLaptiev\Documents\GitHub\temp\foo.py", line 3, in <module>
    with MosesDetokenizer('en') as detokenize:
  File "C:\ProgramFiles\Anaconda\lib\site-packages\mosestokenizer\detokenizer.py", line 47, in __init__
    super().__init__(argv)
  File "C:\ProgramFiles\Anaconda\lib\site-packages\toolwrapper.py", line 52, in __init__
    self.start()
  File "C:\ProgramFiles\Anaconda\lib\site-packages\toolwrapper.py", line 92, in start
    cwd=self.cwd
  File "C:\ProgramFiles\Anaconda\lib\subprocess.py", line 709, in __init__
    restore_signals, start_new_session)
  File "C:\ProgramFiles\Anaconda\lib\subprocess.py", line 997, in _execute_child
    startupinfo)
FileNotFoundError: [WinError 2] The system cannot find the file specified
stdbuf未找到;由于stdio缓冲,与perl的通信可能会挂起。
回溯(最近一次呼叫最后一次):
文件“C:\Users\ArtemLaptiev\Documents\GitHub\temp\foo.py”,第3行,在
将MosesDetokenizer(“en”)作为detokenize:
文件“C:\ProgramFiles\Anaconda\lib\site packages\mosestokenizer\detokenizer.py”,第47行,在\uuu init中__
super().\uuuu init\uuuu(argv)
文件“C:\ProgramFiles\Anaconda\lib\site packages\toolwrapper.py”,第52行,在uu init中__
self.start()
文件“C:\ProgramFiles\Anaconda\lib\site packages\toolwrapper.py”,第92行,在开始处
cwd=self.cwd
文件“C:\ProgramFiles\Anaconda\lib\subprocess.py”,第709行,在\uuu init中__
恢复信号,启动新会话)
文件“C:\ProgramFiles\Anaconda\lib\subprocess.py”,第997行,在执行子进程中
startupinfo)
FileNotFoundError:[WinError 2]系统找不到指定的文件

谢谢你的帮助

使用
圣器
代替
摩西

pip install -U sacremoses

有关完整的详细信息,请使用
from sacremoses import MosesTokenizer, MosesDetokenizer
with MosesDetokenizer() as detokenize:
    print(detokenize(["hi", 'my', 'name', 'is', 'artem']))