コード例 #1
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_determine_semantic_frame_from_parsed_tree__request_cancel_False(self):
        parsed_tree = nlp("Hello Nelly my old friend")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_cancel(root_tuple=root_tuple, parsed_tree= parsed_tree)

        self.assertFalse(result)
コード例 #2
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_determine_semantic_frame_from_parsed_tree__request_cancel_false(self):
        parsed_tree = nlp("do not cancel the order")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_cancel(root_tuple=root_tuple, parsed_tree= parsed_tree)

        self.assertTrue(result)
コード例 #3
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_determine_semantic_frame_from_parsed_tree__request_removal_true(self):
        parsed_tree = nlp("Nelly, i want to remove the tomato")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_remove_item_from_the_order(root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertTrue(result)
コード例 #4
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_request_special_need__True(self):
        parsed_tree = nlp("I'm lactose intolerant")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_special_need(
            parsed_tree=parsed_tree, root_tuple=root_tuple)

        self.assertTrue(result)
コード例 #5
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_nelly_gender__False(self):
        parsed_tree = nlp("Hey there what's up")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_a_request_for_information(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertFalse(result)
コード例 #6
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_a_request_for_information__verb_to_be__False(self):
        parsed_tree = nlp("We are vegan")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_a_request_for_information(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertFalse(result)
コード例 #7
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_nelly_gender__True(self):
        parsed_tree = nlp("What is your gender")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_a_request_for_information(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertTrue(result)
コード例 #8
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_a_request_for_information__verb_to_be__True(self):
        parsed_tree = nlp("Is the bread gluten free")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_a_request_for_information(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertTrue(result)
コード例 #9
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_request_order_update__would__False(self):
        parsed_tree = nlp("I would like to know if this is vegan")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_order_update(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertFalse(result)
コード例 #10
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_request_order_update__no_verb_just_ingredientes__True(self):
        parsed_tree = nlp("Lettuce and cucumber")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_order_update(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertTrue(result)
コード例 #11
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_request_order_update__no_verb__True(self):
        parsed_tree = nlp("A sandwich please")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_order_update(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertTrue(result)
コード例 #12
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
    def test_triggers_request_order_update__would__True(self):
        parsed_tree = nlp("I would like a sandwich with tomato")
        root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)

        result = nelly.triggers_request_order_update(
            root_tuple=root_tuple, parsed_tree=parsed_tree)

        self.assertTrue(result)
コード例 #13
0
ファイル: tests_nelly.py プロジェクト: crismolav/nelly
 def test_triggers_request_order_update__special_case(self):
     parsed_tree = nlp("i want whole wheat bread")
     root_tuple = nelly.get_parse_tree_root_tuple(parsed_tree)
     result = nelly.triggers_request_order_update(
     root_tuple=root_tuple, parsed_tree=parsed_tree)
     self.assertTrue(result)