ce01a7984d45412c8dd6d4f202fa20d55a6cd026,custom_intent_parser/tests/test_regex_intent_parser.py,TestRegexEntityExtractor,test_should_get_built_in,#TestRegexEntityExtractor#,104

Before Change


        parse = parser.parse(text)

        // Then
        expected_entities = [
            {
                "range": (10, 17),
                "value": "dummy_a",
                "entity": "dummy_entity_1",
                "slotName": "dummy_slotName"
            },
            {
                "range": (37, 44),
                "value": "dummy_c",
                "entity": "dummy_entity_2"
            }
        ]
        expected_parse = {
            "text": text,
            "intent": {"name": "dummy_intent_1", "prob": 1.0},
            "entities": expected_entities
        }
        self.assertEqual(parse["text"], expected_parse["text"])
        self.assertEqual(parse["intent"], expected_parse["intent"])
        self.assertItemsEqual(parse["entities"], expected_parse["entities"])

After Change


        }

        // When / Then
        for text, expected_parse in texts.iteritems():
            parse = parser.parse(text)
            self.assertEqual(parse["text"], expected_parse["text"])
            self.assertEqual(parse["intent"], expected_parse["intent"])
            self.assertItemsEqual(parse["entities"],
                                  expected_parse["entities"])

    def test_save_and_load(self):
        // Given
        entity_extractor = RegexEntityExtractor().fit(self._dataset)
        parser = RegexIntentParser(entity_extractor).fit(self._dataset)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: snipsco/snips-nlu
Commit Name: ce01a7984d45412c8dd6d4f202fa20d55a6cd026
Time: 2017-02-24
Author: clement.doumouro@snips.ai
File Name: custom_intent_parser/tests/test_regex_intent_parser.py
Class Name: TestRegexEntityExtractor
Method Name: test_should_get_built_in


Project Name: tensorflow/ranking
Commit Name: 1271e900113a2730b8fec9db1e750b26db4b6af9
Time: 2019-09-18
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/model.py
Class Name: _GroupwiseRankingModel
Method Name: _compute_logits_impl


Project Name: nipy/dipy
Commit Name: e8aff8a890da8670ea8af8783caf3984c4dde558
Time: 2015-02-25
Author: jomaroceguedag@gmail.com
File Name: dipy/align/tests/test_transforms.py
Class Name:
Method Name: test_number_of_parameters