NCOpenNLPTokenEnricher

class NCOpenNLPTokenEnricher(posMdlRes: String, lemmaDicRes: String) extends NCTokenEnricher with LazyLogging

OpenNLP-based language independent token enricher. This enricher adds lemma and pos (part-of-speech) string metadata property to the token instance. Learn more about lemmas here and about part-of-speech here.

This OpenNLP enricher requires PoS and lemma models. Some of free OpenNLP community-maintained models can be found here. Note that at least one of model must be defined.

Value parameters:
lemmaDicRes

Relative path, absolute path, classpath resource or URL to DictionaryLemmatizer model. Can be null if lemmatizer model is not configured, so lemma property will not be set. Note that at least one of the model must be provided.

posMdlRes

Relative path, absolute path, classpath resource or URL to POSTaggerME model. Can be null if part-of-speech model is not configured, so pos property will not be set. Note that at least one of the model must be provided.

Source:
NCOpenNLPTokenEnricher.scala
trait LazyLogging
class Object
trait Matchable
class Any

Value members

Concrete methods

override def enrich(req: NCRequest, cfg: NCModelConfig, toks: List[NCToken]): Unit

Enriches, or otherwise modifies, previously parsed tokens.

Enriches, or otherwise modifies, previously parsed tokens.

Definition Classes
Source:
NCOpenNLPTokenEnricher.scala

Inherited methods

Called when the component starts. Default implementation is no-op.

Called when the component starts. Default implementation is no-op.

Value parameters:
cfg

Configuration of the model this component is associated with.

Inherited from:
NCLifecycle
Source:
NCLifecycle.scala

Called when the component stops. Default implementation is no-op.

Called when the component stops. Default implementation is no-op.

Value parameters:
cfg

Configuration of the model this component is associated with.

Inherited from:
NCLifecycle
Source:
NCLifecycle.scala

Inherited fields

lazy protected val logger: Logger
Inherited from:
LazyLogging
Source:
Logging.scala