Skip to content

Commit

Permalink
Fix: Vocab jaccard formula.
Browse files Browse the repository at this point in the history
  • Loading branch information
Labbeti committed Jun 28, 2024
1 parent 19702a4 commit 37a9f6b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/aac_metrics/functional/vocab.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def vocab(
vocab_precision = len(inter) / len(corpus_vocab_cands)
vocab_recall = len(inter) / (len(inter) + len(diff))
vocab_f1 = 2 * vocab_precision * vocab_recall / (vocab_precision + vocab_recall)
vocab_jaccard = len(inter) + len(union)
vocab_jaccard = len(inter) / len(union)

vocab_mrefs_len_full = _corpus_vocab_size(
[ref for refs in tok_mrefs for ref in refs], dtype
Expand Down

0 comments on commit 37a9f6b

Please sign in to comment.