sparknlp_jsl.utils.ner_utils
#
Module Contents#
Functions#
|
Evaluate performance of a sequence tagger. |
|
Prints overall performance, as well as performance per chunk type. |
|
Plots the figures of metrics ( precision, recall, f1) vs epochs. |
|
Plots the figure of loss vs epochs. |
- evaluate(true_seqs: List[str], pred_seqs: List[str], verbose=True)#
Evaluate performance of a sequence tagger.
If verbose, returns overall performance, as well as performance per chunk type; otherwise, simply returns overall precision, recall, f1 scores
- Parameters:
true_seqs (List[str]) – a list of true tags
pred_seqs (List[str]) – a list of predicted tags
verbose (bool) – whether to print overall performance, as well as performance per chunk type (default is True).
- evaluate_conll_file(fileIterator)#
Prints overall performance, as well as performance per chunk type.
- get_charts(log_file: str, threshold: float = 0.0)#
Plots the figures of metrics ( precision, recall, f1) vs epochs.
- Parameters:
log_file (str) – path to the log file
threshold (float) – threshold, default 0.0
- loss_plot(log_path: str)#
Plots the figure of loss vs epochs.
- Parameters:
log_path (str) – path to the log file