NetBeans在GATE上找不到build.properties

阿明·法瓦尔丁(Amin Farvardin)

我正在GATE从法语文档中提取文本。我已经有一个问题TreeTagger,并CygwinWindows在GATE GUI,这是我解决了投入的系统环境,而不是如下所示的线C:\Cygwin\bin\sh.exe;C:\cygwin\bin C:/cygwin2/bin/sh.exe;C:/cygwin2/bin,并创造了build.properties在GATE的根文件,并把下面的线就可以了

run.shell.path: C\:\\cygwin2\\bin\\sh.exe

现在,我有我最喜欢的管道,它可以通过GATE GUI在法语文本上正常工作。我通过“保存应用程序状态”保存了管道,并且知道我想通过NetBeans加载并执行它。

但是,当Netbeans初始化GATE并加载我保存的管道并添加我的语料库和文档时,它找不到POS的cygwin路径。我得到了error = 193,并且我想这意味着它找不到build.properties文件路径,该路径用于解决由TreeTagger标记的sh.exe文件。

这是我的代码:

public static void main(String[] args) throws Exception {

   CorpusController FrenchController;

   Gate.init();
   MainFrame.getInstance().setVisible(true);

   File GateHome = Gate.getGateHome();
   File FrenchGapp = new File(GateHome,"appTest.xgapp");
   FrenchController =   (CorpusController)PersistenceManager.loadObjectFromFile(FrenchGapp);

   Corpus corpus = Factory.newCorpus("TestCorpus");
   FrenchController.setCorpus(corpus);

   File docFile = new File("D:\\Amin\\Project\\DropBox\\Donnees\\7_doc.xml"); 
   Document doc = Factory.newDocument(docFile.toURL(), "utf-8");   //encoding

   corpus.add(doc);

   FrenchController.execute();

   corpus.clear();
} 

------------------------执行后在GATE上出现错误--------------------- ---

C:\GATE\plugins\Tagger_Framework\resources\TreeTagger\tree-tagger-french-gate-utf8 C:\Users\Amin\AppData\Local\Temp\tagger6897917088215914126.txt
Exception in thread "main" gate.creole.ExecutionException: java.io.IOException: Cannot run program "C:\GATE\plugins\Tagger_Framework\resources\TreeTagger\tree-tagger-french-gate-utf8": CreateProcess **error=193**, %1 is not a valid Win32 application
    at gate.taggerframework.GenericTagger.runTagger(GenericTagger.java:489)
    at gate.taggerframework.GenericTagger.execute(GenericTagger.java:245)
    at gate.util.Benchmark.executeWithBenchmarking(Benchmark.java:291)
    at gate.creole.SerialController.runComponent(SerialController.java:221)
    at gate.creole.SerialController.executeImpl(SerialController.java:153)
    at gate.creole.SerialAnalyserController.executeImpl(SerialAnalyserController.java:125)
    at gate.creole.AbstractController.execute(AbstractController.java:75)
    at secondshot.SecondShot.main(SecondShot.java:84)
Caused by: java.io.IOException: Cannot run program "C:\GATE\plugins\Tagger_Framework\resources\TreeTagger\tree-tagger-french-gate-utf8": CreateProcess error=193, %1 is not a valid Win32 application
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1041)
    at java.lang.Runtime.exec(Runtime.java:617)
    at gate.util.ProcessManager.runProcess(ProcessManager.java:84)
    at gate.util.ProcessManager.runProcess(ProcessManager.java:66)
    at gate.taggerframework.GenericTagger.runTagger(GenericTagger.java:478)
    ... 7 more
Caused by: java.io.IOException: CreateProcess error=193, %1 is not a valid Win32 application
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:385)
    at java.lang.ProcessImpl.start(ProcessImpl.java:136)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:1022)
    ... 11 more

谢谢你的时间

祖父

我认为,该build.properties文件仅在运行GATE Developer时是只读的。请参阅文档http://gate.ac.uk/userguide/sec:gettingstarted:sysprop

...使用GATE Embedded时,可以在调用Gate.init()之前设置这些属性的值。

在您的应用程序中,可以shell.path在调用之前检查属性是否设置正确FrenchController.execute()只是打电话System.getProperty("shell.path")看看...

如果不是,则可以使用

System.setProperty("shell.path", "C:\\cygwin2\\bin\\sh.exe")

在调用之前,在代码中的某个位置FrenchController.execute()

或者在中NetBeans,您可以按照此答案中的说明进行设置:https : //stackoverflow.com/a/7839141/1857897

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

Spring找不到messages.properties

来自分类Dev

Crashlytics找不到带有fabric.properties的清单

来自分类Dev

错误:找不到或加载主类config.zookeeper.properties

来自分类Dev

server.sh:2:。:properties.conf:找不到

来自分类Dev

Titan启动失败:找不到management.properties

来自分类Dev

Boxfuse运行命令在application.properties中找不到文件

来自分类Dev

Titan启动失败:找不到management.properties

来自分类Dev

错误:找不到或加载主类config.zookeeper.properties

来自分类Dev

Boxfuse运行命令在application.properties中找不到文件

来自分类Dev

从properties.ini中读取值并找不到文件

来自分类Dev

logstash找不到log4j2.properties文件

来自分类Dev

找不到version.properties文件IBM watson bot sdk

来自分类Dev

在Windows 10上全新安装intellij idea 2020.1.2社区版后找不到gradle-wrapper.properties

来自分类Dev

Netbeans在您的路径上找不到Cordova或Git

来自分类Dev

该项目使用另一个NetBeans安装中的build.properties

来自分类Dev

运行此C#项目-找不到资源文件“ Properties \ Resources.resx”。

来自分类Dev

Apache Axis2:[TaskDef]无法从资源axis-tasks.properties加载定义。找不到

来自分类Dev

导出到jar后找不到Spring Boot application.properties

来自分类Dev

找不到插件“ proposal-class-properties”。如何解决呢?

来自分类Dev

执行时显示错误的ant命令:找不到资源axis-tasks.properties

来自分类Dev

找不到oauth_consumer.properties社交身份验证android

来自分类Dev

用什么替换 set_target_properties 找不到要添加属性的目标:myTarget?

来自分类Dev

GATE JAPE找不到字符串?

来自分类Dev

GATE JAPE找不到字符串?

来自分类Dev

错误:在Cloud Build上找不到模块'/ app / __ sapper __ / build'

来自分类Dev

Eclipse RCP:多个平台的build.properties

来自分类Dev

read & write properties file in gradle build script

来自分类Dev

Eclipse RCP:多个平台的build.properties

来自分类Dev

For循环找不到符号Netbeans

Related 相关文章

  1. 1

    Spring找不到messages.properties

  2. 2

    Crashlytics找不到带有fabric.properties的清单

  3. 3

    错误:找不到或加载主类config.zookeeper.properties

  4. 4

    server.sh:2:。:properties.conf:找不到

  5. 5

    Titan启动失败:找不到management.properties

  6. 6

    Boxfuse运行命令在application.properties中找不到文件

  7. 7

    Titan启动失败:找不到management.properties

  8. 8

    错误:找不到或加载主类config.zookeeper.properties

  9. 9

    Boxfuse运行命令在application.properties中找不到文件

  10. 10

    从properties.ini中读取值并找不到文件

  11. 11

    logstash找不到log4j2.properties文件

  12. 12

    找不到version.properties文件IBM watson bot sdk

  13. 13

    在Windows 10上全新安装intellij idea 2020.1.2社区版后找不到gradle-wrapper.properties

  14. 14

    Netbeans在您的路径上找不到Cordova或Git

  15. 15

    该项目使用另一个NetBeans安装中的build.properties

  16. 16

    运行此C#项目-找不到资源文件“ Properties \ Resources.resx”。

  17. 17

    Apache Axis2:[TaskDef]无法从资源axis-tasks.properties加载定义。找不到

  18. 18

    导出到jar后找不到Spring Boot application.properties

  19. 19

    找不到插件“ proposal-class-properties”。如何解决呢?

  20. 20

    执行时显示错误的ant命令:找不到资源axis-tasks.properties

  21. 21

    找不到oauth_consumer.properties社交身份验证android

  22. 22

    用什么替换 set_target_properties 找不到要添加属性的目标:myTarget?

  23. 23

    GATE JAPE找不到字符串?

  24. 24

    GATE JAPE找不到字符串?

  25. 25

    错误:在Cloud Build上找不到模块'/ app / __ sapper __ / build'

  26. 26

    Eclipse RCP:多个平台的build.properties

  27. 27

    read & write properties file in gradle build script

  28. 28

    Eclipse RCP:多个平台的build.properties

  29. 29

    For循环找不到符号Netbeans

热门标签

归档