ab1b67c1e958c9a642f57095f3499a893ba0a5b2,snips_nlu/tests/test_regex_intent_parser.py,TestRegexIntentParser,test_should_get_intent,#TestRegexIntentParser#,57
Before Change
def test_should_get_intent(self):
// Given
entity_extractor = RegexEntityExtractor().fit(self._dataset)
parser = RegexIntentParser(entity_extractor).fit(self._dataset)
text = "this is a dummy_a query with another dummy_c"
// When
After Change
// Then
expected_intent = {
"intent": "dummy_intent_1",
"prob": (len("dummy_a") + len("dummy_c")) / float(len(text))
}
self.assertEqual(intent, expected_intent)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: snipsco/snips-nlu
Commit Name: ab1b67c1e958c9a642f57095f3499a893ba0a5b2
Time: 2017-03-24
Author: adrien.ball@snips.net
File Name: snips_nlu/tests/test_regex_intent_parser.py
Class Name: TestRegexIntentParser
Method Name: test_should_get_intent
Project Name: snipsco/snips-nlu
Commit Name: ab1b67c1e958c9a642f57095f3499a893ba0a5b2
Time: 2017-03-24
Author: adrien.ball@snips.net
File Name: snips_nlu/tests/test_regex_intent_parser.py
Class Name: TestRegexIntentParser
Method Name: test_should_parse
Project Name: nipy/dipy
Commit Name: afc377ab38c62c6d25e7144ddbde27efe11a0ec8
Time: 2013-08-24
Author: mauro.zucchelli88@gmail.com
File Name: dipy/reconst/tests/test_dsi_metrics.py
Class Name:
Method Name: test_dsi