opencog / relex

English Dependency Relationship Extractor

Home Page:http://wiki.opencog.org/w/RelEx

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Load RelEx resources (such as *.algs) from .jar if it cannot be found in filesystems

vsbogd opened this issue · comments

RelEx uses following data files to perform analysis:

  • data:
    • relex-semantic.algs
    • relex-penn-tagging.algs
    • relex-tagging.algs
    • relex-stanford.algs
    • sentence-detector/EnglishSD.bin.gz
    • wordnet/file_properties.xml
    • opennlp/models-1.5/en-sent.bin

By default they are loaded from working folder. Loading path can be changed via JVM properties such as -Dwordnet.configfile or -Drelex.algpath. Also these files are packed into relex.jar but they are not loaded from it which makes it impossible to run relex applications without having these files in place.

This issue is to revisit all places where resources are loaded and implement the following loading sequence:

  • if resource file name is defined by property then try loading using this property
  • try to load resource from working folder
  • load resource from *.jar file

All data is located at https://github.com/opencog/relex/tree/master/data
It is packed into .jar file:

relex/pom.xml

Lines 181 to 217 in 8026817

<resources>
<resource>
<targetPath>./</targetPath>
<filtering>false</filtering>
<directory>${basedir}/data</directory>
<includes>
<include>relex-penn-tagging.algs</include>
<include>relex-semantic.algs</include>
<include>relex-stanford.algs</include>
<include>relex-tagging.algs</include>
</includes>
</resource>
<resource>
<targetPath>./</targetPath>
<filtering>false</filtering>
<directory>${basedir}/data/wordnet</directory>
<includes>
<include>file_properties.xml</include>
</includes>
</resource>
<resource>
<targetPath>./</targetPath>
<filtering>false</filtering>
<directory>${basedir}/data/sentence-detector</directory>
<includes>
<include>EnglishSD.bin.gz</include>
</includes>
</resource>
<resource>
<targetPath>./</targetPath>
<filtering>false</filtering>
<directory>${basedir}/data/opennlp/models-1.5</directory>
<includes>
<include>en-sent.bin</include>
</includes>
</resource>
</resources>

But not used from it.

Closed by #268