4b77a98dd15b839635e1a484fe9bc87cb536a19a,pytext/data/test/simple_featurizer_test.py,SimpleFeaturizerTest,test_tokenize_dont_lowercase,#SimpleFeaturizerTest#,20

Before Change


            SimpleFeaturizer.Config(lowercase_tokens=False), FeatureConfig()
        )
        tokens = featurizer.featurize(InputRecord(raw_text=self.sentence)).tokens
        self.assertListEqual(tokens, ["Order", "me", "a", "coffee"])

    def test_convert_to_bytes(self):
        featurizer = SimpleFeaturizer.from_config(
            SimpleFeaturizer.Config(convert_to_bytes=True, lowercase_tokens=False),

After Change


            SimpleFeaturizer.Config(lowercase_tokens=False), FeatureConfig()
        )
        features = featurizer.featurize(InputRecord(raw_text=self.sentence))
        expected_tokens = ["Order", "me", "a", "coffee"]
        expected_chars = [list(tok) for tok in expected_tokens]
        self.assertListEqual(features.tokens, expected_tokens)
        self.assertListEqual(features.characters, expected_chars)

    def test_convert_to_bytes(self):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: facebookresearch/pytext
Commit Name: 4b77a98dd15b839635e1a484fe9bc87cb536a19a
Time: 2019-01-23
Author: mikaell@fb.com
File Name: pytext/data/test/simple_featurizer_test.py
Class Name: SimpleFeaturizerTest
Method Name: test_tokenize_dont_lowercase


Project Name: facebookresearch/pytext
Commit Name: 4b77a98dd15b839635e1a484fe9bc87cb536a19a
Time: 2019-01-23
Author: mikaell@fb.com
File Name: pytext/data/test/simple_featurizer_test.py
Class Name: SimpleFeaturizerTest
Method Name: test_convert_to_bytes


Project Name: facebookresearch/pytext
Commit Name: 4b77a98dd15b839635e1a484fe9bc87cb536a19a
Time: 2019-01-23
Author: mikaell@fb.com
File Name: pytext/data/test/simple_featurizer_test.py
Class Name: SimpleFeaturizerTest
Method Name: test_tokenize