Skip to content

Commit

Permalink
test model testing and model dump
Browse files Browse the repository at this point in the history
  • Loading branch information
irshadbhat committed Aug 7, 2016
1 parent 5da5b4c commit 68853a7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions indictrans/trunk/tests/test_trunk.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,10 @@ def test_sp_train(self):
for i in xrange(len(y_out)):
# each token of sequence should get a tag
self.assertEqual(len(y[i]), len(y_out[i]))
# test direct testing
trunk.test_sp(clf, enc, '%s/hin2rom.tnt' % self.test_dir)
# test model dump
trunk.save_models(clf, enc, '/tmp/models')

def test_parser(self):
parser = trunk.parse_args(['--data-file', 'path/to/train_file',
Expand Down

0 comments on commit 68853a7

Please sign in to comment.