component

class hanlp.common.component.Component[source]
abstract predict(data: Any, **kwargs)[source]

Predict on data. This is the base class for all components, including rule based and statistical ones.

Parameters
  • data – Any type of data subject to sub-classes

  • kwargs – Additional arguments

Returns: Any predicted annotations.