reconer.stats

The stats module implements utility functions for getting statistics for an NER dataset. It's useful for getting a quick overview of your data and checking that you have enough examples for each label (including examples with NO ENTITIES)


API

reconer.stats.ner_stats(data, serialize=False, no_print=False)

Compute statistics for NER data

Parameters


data: (List[Example]), required.

Data as a List of Examples

serialize: (bool, optional), Defaults to False.

Serialize to a JSON string for printing

no_print: (bool, optional), Defaults to False.

Don't print, return serialized string. Requires serialize to be True

Returns


(List[Example]):

List of examples or string if serialize and no_print are both True