Ready Made Pipeline python-stanford-stanza
After loading the Python plugin, the prepared pipeline python-stanza
is available from Applications - Ready Made Applications - Python - python-stanford-stanza.
This pipeline allows to annotate a document using the Stanford Stanza NLP software.
In order to use this pipeline, the following requirements must be met:
- Python package stanza must be installed
- The Stanza model for the desired language must be installed
Installing Stanford Stanza
Run the following command:
python -m pip install -U stanza
Install the Model for the Language
See the Stanza documentation for this and Download Models For example to install the default English model run the following command:
python -c 'import stanza; stanza.download("en")'
Running the Pipeline
The following parameters can be set in the programParams runtime parameter for the ready made pipeline.
This contains a subset of what can be specified directly in Python when a Stanza Pipeline is created,
see the Stanza Documentation
outputAnnotationSet
: name of the annotation set where the Stanza annotations should be placed. Default isStanza
lang
: the language for the model to use, e.g.en
. Default is:en
dir
: directory where the downloaded model is stored. If not specified the default download location is used.logging_level
: one of “DEBUG”, “INFO”, “WARN”, “ERROR”, “CRITICAL”, “FATAL”, default depends onverbose
, see belowverbose
: ifTrue
, but now logging level is specified, loggin level is set toINFO
, otherwise toERROR
use_gpu
: ifTrue
, attemt to use the GPU, if available. Set toFalse
to avoid using the GPU if one is available.
NOTE: any parameter which is included in programParams
but not set / empty, is ignored.