POS-tagger

Path pimlico.modules.opennlp.pos
Executable yes

Part-of-speech tagging using OpenNLP’s tools.

By default, uses the pre-trained English model distributed with OpenNLP. If you want to use other models (e.g. for other languages), download them from the OpenNLP website to the models dir (models/opennlp) and specify the model name as an option.

Inputs

Name Type(s)
text grouped_corpus <TokenizedDocumentType>

Outputs

Name Type(s)
pos grouped_corpus <WordAnnotationsDocumentType>

Options

Name Description Type
model POS tagger model, full path or filename. If a filename is given, it is expected to be in the opennlp model directory (models/opennlp/) string

Example config

This is an example of how this module can be used in a pipeline config file.

[my_opennlp_pos_tagger_module]
type=pimlico.modules.opennlp.pos
input_text=module_a.some_output

This example usage includes more options.

[my_opennlp_pos_tagger_module]
type=pimlico.modules.opennlp.pos
input_text=module_a.some_output
model=en-pos-maxent.bin

Test pipelines

This module is used by the following test pipelines. They are a further source of examples of the module’s usage.