2019-07-20T23:43:53+12:00 (4 years ago)

Updated README.

1 edited


  • gs3-extensions/maori-lang-detection/README.txt

    r33335 r33339  
     40. The code and its necessary helper files and libraries, and this README, live at:
     5    http://trac.greenstone.org/browser/gs3-extensions/maori-lang-detection
     7You can checkout from svn with:
     8    svn co http://svn.greenstone.org/gs3-extensions/maori-lang-detection
     10- It contains the OpenNLP that was current at the time of the commit, but you can also get it from its original site http://opennlp.apache.org/download.html
     11- The LanguageDetectionModel to be used by OpenNLP is also included (again, current at the time of commit), but you can get it from http://opennlp.apache.org/models.html (direct link: https://www.apache.org/dyn/closer.cgi/opennlp/models/langdetect/1.8.3/langdetect-183.bin)
     131. Once you've svn checked it out, create a folder called "models" and put the langdetect-183.bin file into it.
     14(This is just a zip file, but has to remain with the .bin extension in order for OpenNLP to use it. If you ever wish to see its contents, you can rename to .zip and use the Archive Manager or other Zip tool to inspect the contents.)
     162. Next extract the apache-opennlp-1.9.1-bin.tar.gz.
     17This will create a folder called apache-opennlp-1.9.1. Move the "models" folder you created in step 1 into this folder.
     193. Before you can compile or run the MaoriTextDetector program, you always have to prepare a terminal by setting up the environment for OpenNLP as follows:
     20   cd /type/here/path/to/your/extracted/apache-opennlp-1.9.1
     21   export OPENNLP_HOME=`pwd`
     244. If you want to recompile, go up into the checked out maori-lang-detection folder's "src" subfolder. To compile, make sure you have the JDK7+ bin folder on your PATH environment variable.
     25Still in the SAME terminal as where you set up the OPENNLP_HOME environment in step 3, you can now run:
     26      maori-lang-detection/src$ javac -cp ".:$OPENNLP_HOME/lib/opennlp-tools-1.9.1.jar" MaoriTextDetector.java
     285. To run the MaoriTextDetector program, you will need the JDK or JRE 7+ bin folder on your PATH and still in the SAME terminal as where you set up the OPENNLP_HOME environment in step 3,
     29type one of the following:
     30   maori-lang-detection/src$ java -cp ".:$OPENNLP_HOME/lib/*" MaoriTextDetector --help
     31   (prints the usage, including other options)                 
     33   maori-lang-detection/src$ java -cp ".:$OPENNLP_HOME/lib/*" MaoriTextDetector --file <full/path/to/textfile>
     35   maori-lang-detection/src$ java -cp ".:$OPENNLP_HOME/lib/*" MaoriTextDetector -
     36       which expects text to stream in from standard input.
     37       If entering text manually, then remember to press Ctrl-D to indicate the usual end of StdIn.
     42For reading materials, see the OLD README section below.
     45     OLD README
    250Language Detector Model for Apache OpenNLP released
Note: See TracChangeset for help on using the changeset viewer.