Skip to content

Commit

Permalink
Update pos_tag_transformers()
Browse files Browse the repository at this point in the history
argument `words` -> `sentence`
  • Loading branch information
bact committed Dec 11, 2023
1 parent 78ddc17 commit 4b80066
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions tests/test_tag.py
Original file line number Diff line number Diff line change
Expand Up @@ -365,30 +365,32 @@ def test_NNER_class(self):
def test_pos_tag_transformers(self):
self.assertIsNotNone(
pos_tag_transformers(
words="แมวทำอะไรตอนห้าโมงเช้า",
sentence="แมวทำอะไรตอนห้าโมงเช้า",
engine="bert",
corpus="blackboard",
)
)
self.assertIsNotNone(
pos_tag_transformers(
words="แมวทำอะไรตอนห้าโมงเช้า", engine="mdeberta", corpus="pud"
sentence="แมวทำอะไรตอนห้าโมงเช้า",
engine="mdeberta",
corpus="pud"
)
)
self.assertIsNotNone(
pos_tag_transformers(
words="แมวทำอะไรตอนห้าโมงเช้า",
sentence="แมวทำอะไรตอนห้าโมงเช้า",
engine="wangchanberta",
corpus="pud",
)
)
with self.assertRaises(ValueError):
pos_tag_transformers(
words="แมวทำอะไรตอนห้าโมงเช้า", engine="non-existing-engine"
sentence="แมวทำอะไรตอนห้าโมงเช้า", engine="non-existing-engine"
)
with self.assertRaises(ValueError):
pos_tag_transformers(
words="แมวทำอะไรตอนห้าโมงเช้า",
sentence="แมวทำอะไรตอนห้าโมงเช้า",
engine="bert",
corpus="non-existing corpus",
)

0 comments on commit 4b80066

Please sign in to comment.