Analytics
Reads files from the specified directory and prints the result to the console.
TreeTagger Installation for Linux
- Go to the TreeTagger website
- From the download section, download the correct tagger package, i.e. PC-Linux
- Extract the .gz archive
- Copy the
tree-tagger-linux-3.2/bin/tree-tagger
file and place it in the same folder as the scripttreetagger.py
- From the parameter file section, download the correct model. For the example below download English parameter file (
english-par-linux-3.2-utf8.bin.gz
)- Unzip the file (e.g.
gunzip english-par-linux-3.2-utf8.bin.gz
) - Copy the file
english-par-linux-3.2-utf8.bin
into the same folder as thetreetagger.py
script. Ensure that the name for the model isenglish-par-linux-3.2-utf8.bin
- Unzip the file (e.g.
TreeTagger Installation for Windows 7
- Ensure that you have a program to unzip
.gz
files. For example you can use [http://www.7-zip.org 7zip] - Go to the TreeTagger website
- In the Windows section, you find the download link for the
tree-tagger-windows-3.2.zip
file.- Extract the zip-archive
- Copy the
tree-tagger-windows-3.2/bin/tree-tagger.exe
to your folder with with thetreetagger.py
script
- From the parameter file section, download the correct model. For the example below download English parameter file (
english-par-linux-3.2-utf8.bin.gz
)- Unzip the file (e.g. by using 7zip)
- Copy the file
english-par-linux-3.2-utf8.bin
into the same folder as thetreetagger.py
script. Ensure that the name for the model isenglish-par-linux-3.2-utf8.bin
- In the script below, you find a line
TreeTaggerPosLemmaTT4J.PARAM_EXECUTABLE_PATH, "tree-tagger"
, change the valuetree-tagger
totree-tagger.exe
If you already have TreeTagger installed on your system and or if you want to use another model file, you can also set in the script the parameters PARAM_EXECUTABLE_PATH
and PARAM_MODEL_PATH
to their respective locations.
Call with C:\jython-2.7b1\jython treetagger.py <foldername> <language>
, e.g. C:\jython-2.7b1\jython treetagger.py C:\example_folder\ en
.
Example output: