class hanlp_common.configurable.Configurable[source]
static from_config(config: dict, **kwargs)[source]

Build an object from config.

  • config – A dict holding parameters for its constructor. It has to contain a classpath key, which has a classpath str as its value. classpath will determine the type of object being deserialized.

  • kwargs – Arguments not used.

Returns: A deserialized object.

class hanlp_common.configurable.AutoConfigurable[source]
property config: dict

The config of this object, which are public properties. If any properties needs to be excluded from this config, simply declare it with prefix _.