Skip to content

Commit 84e77ea

Browse files
committed
add test_mention_score_perfect_when_same_docs
1 parent 4758149 commit 84e77ea

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

tests/test_score.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
from typing import List
2+
from hypothesis import given, assume
3+
import hypothesis.strategies as st
4+
from tibert import score_mention_detection, CoreferenceDocument
5+
from tests.strategies import coref_docs
6+
7+
8+
@given(docs=st.lists(coref_docs(min_size=1, max_size=32), min_size=1, max_size=3))
9+
def test_mention_score_perfect_when_same_docs(docs: List[CoreferenceDocument]):
10+
assume(all([len(doc.coref_chains) > 0 for doc in docs]))
11+
assert score_mention_detection(docs, docs) == (1.0, 1.0, 1.0)

0 commit comments

Comments
 (0)