我已经按照DKPro Core的安装文档进行自然语言处理,但是发现无论我在Debian Jessie下安装它的方式如何,我都无法使用它。它适用于Groovy,但不适用于Jython,如下所述:
https://dkpro.github.io/dkpro-core/pages/jython-intro/
我已经安装了Oracle Java,jip和jython,然后将jip jar编译(据说,我不确定)为jython。
我最后得到的错误是:
$ jython pipeline.jy
jip [Checking] pom file http://repo1.maven.org/maven2/de/tudarmstadt/ukp/dkpro/core/de.tudarmstadt.ukp.dkpro.core.opennlp-asl/1.6.2/de.tudarmstadt.ukp.dkpro.core.opennlp-asl-1.6.2.pom
Traceback (most recent call last):
File "pipeline.jy", line 9, in <module>
require('de.tudarmstadt.ukp.dkpro.core:de.tudarmstadt.ukp.dkpro.core.opennlp-asl:1.6.2')
File "__pyclasspath__/jip/embed$py.class", line 38, in require
File "__pyclasspath__/jip/commands$py.class", line 109, in _resolve_artifacts
File "__pyclasspath__/jip/commands$py.class", line 83, in _find_pom
File "__pyclasspath__/jip/repository$py.class", line 218, in download_pom
File "__pyclasspath__/jip/repository$py.class", line 218, in download_pom
File "__pyclasspath__/jip/util$py.class", line 71, in download_string
ImportError: No module named requests
我猜大多数人会给我答案,“使用apt-get或pip安装python-requests”。这不起作用。这不是python问题。它是一个jython问题或某种奇怪的环境问题。我很欣赏如何让它发挥作用。