a960588a8dc68e5c6a9ff7ecc10549e521ce5150,tests/test_preprocess.py,TestIndexTransformer,test_transform_unknown_token,#TestIndexTransformer#,99
Before Change
self.assertEqual(len(chars), len(x_train))
self.assertEqual(len(y), len(y_train))
for doc_w, doc_c, labels in zip(words, chars, y):
for w, cl, l in zip(doc_w, doc_c, labels):
self.assertIsInstance(w, int)
self.assertIsInstance(l, int)
for c in cl:
self.assertIsInstance(c, int)
def test_inverse_transform(self):
it = IndexTransformer()
_, y = it.fit_transform(self.x, self.y)
inv_y = it.inverse_transform(y)
After Change
// Check sequence type.
self.assertIsInstance(words, np.ndarray)
self.assertIsInstance(chars, np.ndarray)
self.assertIsInstance(y, np.ndarray)
def test_inverse_transform(self):
it = IndexTransformer()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 9
Instances
Project Name: Hironsan/anago
Commit Name: a960588a8dc68e5c6a9ff7ecc10549e521ce5150
Time: 2018-05-31
Author: hiroki.nakayama.py@gmail.com
File Name: tests/test_preprocess.py
Class Name: TestIndexTransformer
Method Name: test_transform_unknown_token
Project Name: Hironsan/anago
Commit Name: a960588a8dc68e5c6a9ff7ecc10549e521ce5150
Time: 2018-05-31
Author: hiroki.nakayama.py@gmail.com
File Name: tests/test_preprocess.py
Class Name: TestIndexTransformer
Method Name: test_transform_unknown_token
Project Name: Hironsan/anago
Commit Name: a960588a8dc68e5c6a9ff7ecc10549e521ce5150
Time: 2018-05-31
Author: hiroki.nakayama.py@gmail.com
File Name: tests/test_preprocess.py
Class Name: TestIndexTransformer
Method Name: test_transform_with_character
Project Name: Hironsan/anago
Commit Name: a960588a8dc68e5c6a9ff7ecc10549e521ce5150
Time: 2018-05-31
Author: hiroki.nakayama.py@gmail.com
File Name: tests/test_preprocess.py
Class Name: TestIndexTransformer
Method Name: test_transform_without_character