Skip to content

Commit

Permalink
Add a couple tests which check to see what happens at various augment…
Browse files Browse the repository at this point in the history
… levels
  • Loading branch information
AngledLuffa committed Oct 23, 2023
1 parent 360b7c4 commit 4a86e25
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions stanza/tests/pos/test_tagger.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,24 @@ def test_multiple_files(self, tmp_path, wordvec_pretrain_file):
assert ' hers ' in TRAIN_DATA_2
assert 'hers' in word_vocab

def test_train_zero_augment(self, tmp_path, wordvec_pretrain_file):
"""
Train with the punct augmentation set to zero
Distinguishs cases where training works w/ or w/o augmentation
"""
extra_args = ['--augment_nopunct', '0.0']
trainer = self.run_training(tmp_path, wordvec_pretrain_file, TRAIN_DATA, DEV_DATA, extra_args=extra_args)

def test_train_100_augment(self, tmp_path, wordvec_pretrain_file):
"""
Train with the punct augmentation set to 1.0
Distinguishs cases where training works w/ or w/o augmentation
"""
extra_args = ['--augment_nopunct', '1.0']
trainer = self.run_training(tmp_path, wordvec_pretrain_file, TRAIN_DATA, DEV_DATA, extra_args=extra_args)

def test_train_charlm(self, tmp_path, wordvec_pretrain_file, charlm_args):
trainer = self.run_training(tmp_path, wordvec_pretrain_file, TRAIN_DATA, DEV_DATA, extra_args=charlm_args)

Expand Down

0 comments on commit 4a86e25

Please sign in to comment.