我正在用java做一个使用treetagger.的应用程序,所以在eclipse上点击了这个
String commande="cmd /c C:\Program Files (x86)\tree-tagger-windows-3.2\TreeTagger\bin\\tag-english"+" "+path;
Process p=Runtime.getRuntime().exec(commande);但这不管用。
我对TreeTagger不太了解,我要测试是否在windows下安装TreeTagger,我在命令提示符cd C: \ Program Files (x86) \ tree-tagger-windows-3.2 \ TreeTagger \ bin上输入了这些命令,然后
tag-English nom_de_fichier_à_tagger,但cmd显示此错误消息'perl' is not recognized as an internal or external command, executable program or batch file.。
我安装的TreeTagger是我提取到一个文件夹的压缩文件,我把它放在C: \ Program Files (x86)中就是我所做的。
如果我在安装过程中犯了错误,你能帮我吗?因为我也在网上搜索,我什么也不懂。
发布于 2014-03-22 03:10:41
听起来你需要在windows上安装一个perl。我建议你使用Strawberry Perl。
我没有使用TreeTagger的经验,但是在谷歌上搜索一下这个引用:TreeTagger - a language independent part-of-speech tagger。向下滚动有一个zip形式的Windows版本,其中包含一个INSTALL.txt,它声明:
Installation
------------
1. Install a Perl interpreter (if you have not already installed one).
You can download a Perl interpreter for Windows for free at
http://www.activestate.com/activeperl/
2. Move the TreeTagger directory to the root directory of drive C:.
3. Download the PC parameter files for the languages you need, decompress
them (e.g. using Winzip or 7zip) and move them to the subdirectory lib.
Rename the parameter files to <language>.par
Example: Rename french-par-linux-3.1.bin to french.par
The UTF8 versions of the parameter files are not supported yet, but
see below some hints on how to build tagging scripts for the UTF8
parameter files.
4. Add the path C:\TreeTagger\bin to the PATH environment variable.
5. Open a shell and type the command
set PATH=C:\TreeTagger\bin;%PATH%
6. Change to the directory C:\TreeTagger
7. Now you can test the tagger, e.g. by analyzing this file with the command
tag-english INSTALL.txt显然您已经跳过了步骤1. :),您可以像他们建议的那样使用ActiveState,但是在我看来,草莓perl是一个更好的选择。
https://stackoverflow.com/questions/22564136
复制相似问题