feat(parser): normalize flexible free text
This commit is contained in:
1 parent
b78f211292
commit
9859994deb
5 files changed
+49
No files matched your search
@@ -148,6 +148,15 @@ class VkConversationTests(unittest.TestCase):
|
||||
self.assertEqual(inspected["fields"]["kitten_id"], 1346767)
|
||||
self.assertEqual(inspected["fields"]["kitten_independence"], "несамостоятельно")
|
||||
|
||||
def test_natural_bulk_input_normalizes_flexible_punctuation_ids_and_role_typos(self):
|
||||
inspected = inspect_bulk_text(
|
||||
"лу; 24-08; 21.00 - 22 ч 00. ученика: Серопопик [1 346 767]; сопроваждающая Дикая Вишня id 1 604 614; несам."
|
||||
)
|
||||
self.assertEqual(inspected["fields"]["date"], "24.08")
|
||||
self.assertEqual((inspected["fields"]["start"], inspected["fields"]["end"]), ("21:00", "22:00"))
|
||||
self.assertEqual((inspected["fields"]["escort_name"], inspected["fields"]["escort_id"]), ("Дикая Вишня", 1604614))
|
||||
self.assertEqual((inspected["fields"]["kitten_name"], inspected["fields"]["kitten_id"]), ("Серопопик", 1346767))
|
||||
|
||||
def test_training_supports_stepwise_and_natural_bulk(self):
|
||||
dialog = BelkiDialog()
|
||||
self.assertIn("сопровождающ", dialog.handle(102, "/урок").lower())
|
||||
|
||||
Reference in new issue
Block a user