Skip to content

Commit

Permalink
Merge branch 'preparing-release-0.9.4' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
jmansilla committed May 11, 2015
2 parents f0cfa8c + ca3397f commit 92d84be
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ include ChangeLog
include iepy/version.txt

recursive-include iepy/instantiation *.template
recursive-include iepy/preprocess/utils *.jar
recursive-include iepy/webui/corpus/static *
recursive-include iepy/webui/corpus/templates *
recursive-include docs/setup requirements*.txt
Expand Down
24 changes: 19 additions & 5 deletions docs/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,29 @@ You need to install the following packages:

.. code-block:: bash
sudo apt-get install build-essential python3-dev liblapack-dev libatlas-dev gfortran openjdk-7-jre
sudo apt-get install build-essential python3-dev liblapack-dev libatlas-dev gfortran
They are needed for python Numpy installation, and for running
some java processes.

Once this is done, install numpy by doing:
They are needed for python Numpy installation. Once this is done, install numpy by doing:

.. code-block:: bash
pip install numpy
And later, for been able to run some java processes:

.. code-block:: bash
sudo apt-get install openjdk-7-jre
.. note::

Instead of openjdk-7-jre you can use any other java (version 1.6 or higher) you
may have.

**Java 1.8** will allow you to use the **newest preprocess models**.


Install IEPY package
--------------------

Expand Down Expand Up @@ -62,4 +73,7 @@ binaries.
iepy --download-third-party-data
.. note::

If the java binary pointed by your JAVAHOME is 1.8, newest preprocess models will
be acquired and used.
12 changes: 9 additions & 3 deletions iepy/preprocess/corenlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,19 @@ def download(lang='en'):
print("Downloading Stanford CoreNLP...")
unzip_from_url(DOWNLOAD_URL, DIRS.user_data_dir)

# Zip acquired. Make sure right Java is used, and file is executable
for directory in os.listdir(DIRS.user_data_dir):
if directory.startswith("stanford-corenlp-full"):
stanford_directory = os.path.join(DIRS.user_data_dir, directory)
if os.path.isdir(stanford_directory):
corenlp = os.path.join(stanford_directory, "corenlp.sh")
st = os.stat(corenlp)
os.chmod(corenlp, st.st_mode | stat.S_IEXEC)
runner_path = os.path.join(stanford_directory, "corenlp.sh")
st = os.stat(runner_path)
_content = open(runner_path).read()
_content = _content.replace('java', '$JAVAHOME')
with open(runner_path, 'w') as runner_file:
runner_file.write(_content)

os.chmod(runner_path, st.st_mode | stat.S_IEXEC)
break

# Download extra data for specific language
Expand Down
2 changes: 1 addition & 1 deletion iepy/version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.9.3
0.9.4

0 comments on commit 92d84be

Please sign in to comment.