Genia Tagger 在 Python2.7 中找不到文件(使用 Windows)

Genia Tagger cannot find file in Python2.7 (using Windows)

(我电脑上的OS是Windows8) 我尝试按照以下步骤安装和 运行 geniatagger:

在命令中:

python setup.py install

在Python shell:

from geniatagger import Geniatagger
tagger = GeniaTagger('C:\Users\wen\Downloads\geniatagger\geniatagger')

错误信息:

Traceback (most recent call last):
File "<pyshell#20>", line 1, in <module>
    tagger = GeniaTagger('C:\Users\wen\Downloads\geniatagger\geniatagger')
  File "build\bdist.win-amd64\egg\geniatagger.py", line 21, in __init__
    stdin=subprocess.PIPE, stdout=subprocess.PIPE)
  File "D:\Program Files\Python27\lib\subprocess.py", line 710, in __init__
    errread, errwrite)
  File "D:\Program Files\Python27\lib\subprocess.py", line 958, in _execute_child
    startupinfo)
WindowsError: [Error 2] The system cannot find the file specified

我找了很多解决方案,还是无法解决错误。 我该如何解决?

请注意错误显示 D: 而不是 C:。您的 shell 设置中的某些内容似乎默认为 D 驱动器。这个脚本是运行从C盘还是D盘?如果是 C 盘,您可以尝试使用相对路径而不是绝对路径。如果是从 D 盘 运行ning,你可以从 C 盘 运行 吗?如果它必须 运行 来自 D,您将不得不深入研究 genia tagger 文档以弄清楚如何进行一些自定义配置。