Skip to content

User Guide

adoxography edited this page Jun 7, 2018 · 3 revisions

Downloading NEAM

For instructions on how to download NEAM, please refer to this page for instructions for your particular OS. Instructions are available both for Github Desktop and through Terminal.

Requirements

NEAM is written in Python and Java, and requires both to be installed. (For Python, it requires Python 3, and the Java version must be 1.8.) There are also language-specific dependencies, which are given below. NEAM can run on Windows, however instructions cannot be provided for this operating system as they vary too much depending on the particular version and setup.

Java dependencies

NEAM is built on Stanford CoreNLP, which in turn requires Java 1.8 installed and JAVA_HOME properly configured. Navigate to this page and scroll to Java SE 8u171/ 8u172. Click the download link below "JDK" and download Java SE Development Kit 8u171. Next, follow the Installation Instructions link from the previous page in the Java SE 8u171/ 8u172 section to find specific installation instructions for your operating system.

Your JAVA_HOME environment variable should point to the folder that contains bin/java. You can follow the appropriate platform-specific instructions below to set this up. You do not need to install Stanford CoreNLP yourself; NEAM will do this for you the first time you call it.

Linux

Start a terminal. (In Ubuntu, this can be done by typing Ctrl + Alt + T; if you are using a different Linux distribution and this command does not work for you, please consult your particular distribution's documentation.) From the terminal, run the following command:

export JAVA_HOME="/path/to/java"

If you're going to be running NEAM a lot, it is recommended to put this command inside your .bashrc file (or the comparable file if you're using a shell other than Bash).

Mac OS X

Your configuration should work without any changes, but if it does not work you can follow the instructions in the Linux section above. To access Terminal on Mac, type CMD + Space to open Spotlight, then type "terminal" and hit Enter.

Python dependencies

Navigate to this page and download and install Python 3. NEAM uses pip to manage its Python dependencies. If it is not already installed, please do so by navigating to this page and following the instructions there. If you have more than one version of Python installed on your system, you will need to install it using the Python command for Python 3. You may be able to do this by typing python3 instead of python in the pip installation instructions. If not, you will need to find the path to the Python 3 binary on your system and use that.

Once pip is installed, if you have root privileges, you can install all of NEAM's Python dependencies by typing

pip install -r requirements.txt

in a terminal from the NEAM root directory. Note: if you have multiple versions of pip installed (e.g., one for Python 2.7 and one for Python 3), you will need to use the command pip3 instead of pip. Root/administrative privileges are required to install dependencies through this method. If you do not have root privileges, see "Usage" below for running NEAM in a virtual environment.

Usage

Tagging

If you were able to install NEAM's Python dependencies, NEAM can be run by calling ./neam.py <file> in a terminal, where <file> is a text document to be tagged.

If you were not able to install its dependencies, running ./neam.sh <file> will initialize a virtual environment and install the dependencies before running NEAM. The virtual environment will be left in place, so this install will only need to be done once, even though you will need to continue to call neam.sh instead of neam.py.

Evaluation

Evaluation of the system against a gold standard is a development-related task. Users wishing only to tag named entities in texts need not carry out evaluation.

Nevertheless, valuation of the system's output against a gold standard can be carried out by executing

./evaluate.sh <output> <gold> [eval_tag ...]

where <output> is the XML file you are evaluating, and <gold> is the gold standard XML file. You can optionally include a sequence of tags you want evaluated after this. If no tags are included, persname, placename, and orgname are evaluated by default. The evaluation script will dump all incorrect taggings to stderr. This can be redirected to a file using 2> at the end of the call followed by the desired filename when executing the script.

Web interface

NEAM is capable of running as a web application; however, it is not presently located on a server able to handle its dependencies. A non-functional (i.e. visual-only; no annotation) demo can be found here. On a functional web application, texts can be annotated by uploading a file, and then filling out as much metadata about the file as possible. After the file has been annotated, a complete TEI XML file will automatically be downloaded. At the present time, you would need to remain on the page until the annotation completes. In the future, we hope to implement a feature where the site could email the file to you, so that you would not need to remain on the page.