3edaf75e529227e9a21d6e258a7d74b032e35399,snips_nlu/tests/test_deterministic_intent_parser.py,TestDeterministicIntentParser,test_should_fit_and_parse_with_non_ascii_tags,#TestDeterministicIntentParser#,495

Before Change


        naughty_dataset = validate_and_format_dataset(naughty_dataset)

        // Then
        with self.fail_if_exception("Exception raised"):
            parser = DeterministicIntentParser()
            parser.fit(naughty_dataset)
            parsing = parser.parse("string0")

            expected_slot = {
                "entity": "non_ascìi_entïty",
                "range": {
                    "start": 0,
                    "end": 7
                },
                "slotName": u"non_ascìi_slöt",
                "value": u"string0"
            }
            intent_name = parsing[RES_INTENT][RES_INTENT_NAME]
            self.assertEqual("naughty_intent", intent_name)
            self.assertListEqual([expected_slot], parsing[RES_SLOTS])

    def test_should_be_serializable_before_fitting(self):
        // Given
        config = DeterministicIntentParserConfig(max_queries=42,
                                                 max_entities=43)

After Change


        naughty_dataset = validate_and_format_dataset(naughty_dataset)

        // Then
        try:
            parser = DeterministicIntentParser()
            parser.fit(naughty_dataset)
            parsing = parser.parse("string0")

            expected_slot = {
                "entity": "non_ascìi_entïty",
                "range": {
                    "start": 0,
                    "end": 7
                },
                "slotName": u"non_ascìi_slöt",
                "value": u"string0"
            }
            intent_name = parsing[RES_INTENT][RES_INTENT_NAME]
            self.assertEqual("naughty_intent", intent_name)
            self.assertListEqual([expected_slot], parsing[RES_SLOTS])
        except:  // pylint: disable=W0702
            trace = tb.format_exc()
            self.fail("Exception raised:\n %s" % trace)

    def test_should_be_serializable_before_fitting(self):
        // Given
        config = DeterministicIntentParserConfig(max_queries=42,
                                                 max_entities=43)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 6

Non-data size: 8

Instances


Project Name: snipsco/snips-nlu
Commit Name: 3edaf75e529227e9a21d6e258a7d74b032e35399
Time: 2018-02-15
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_deterministic_intent_parser.py
Class Name: TestDeterministicIntentParser
Method Name: test_should_fit_and_parse_with_non_ascii_tags


Project Name: snipsco/snips-nlu
Commit Name: 3edaf75e529227e9a21d6e258a7d74b032e35399
Time: 2018-02-15
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_crf_slot_filler.py
Class Name: TestCRFSlotFiller
Method Name: test_should_parse_naughty_strings


Project Name: snipsco/snips-nlu
Commit Name: 3edaf75e529227e9a21d6e258a7d74b032e35399
Time: 2018-02-15
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_deterministic_intent_parser.py
Class Name: TestDeterministicIntentParser
Method Name: test_should_parse_naughty_strings


Project Name: snipsco/snips-nlu
Commit Name: 3edaf75e529227e9a21d6e258a7d74b032e35399
Time: 2018-02-15
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_deterministic_intent_parser.py
Class Name: TestDeterministicIntentParser
Method Name: test_should_fit_with_naughty_strings_no_tags


Project Name: snipsco/snips-nlu
Commit Name: 3edaf75e529227e9a21d6e258a7d74b032e35399
Time: 2018-02-15
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_crf_slot_filler.py
Class Name: TestCRFSlotFiller
Method Name: test_should_fit_and_parse_with_non_ascii_tags


Project Name: snipsco/snips-nlu
Commit Name: 3edaf75e529227e9a21d6e258a7d74b032e35399
Time: 2018-02-15
Author: clement.doumouro@gmail.com
File Name: snips_nlu/tests/test_crf_slot_filler.py
Class Name: TestCRFSlotFiller
Method Name: test_should_fit_with_naughty_strings_no_tags