Exemplo n.º 1
0
def test_is_valid_verb():
    net = FuncVerbNet()
    assert net.is_valid_verb("admin") == False
Exemplo n.º 2
0
def test_find_patterns_with_two_roles_id():
    net = FuncVerbNet()
    print(net.find_patterns_with_two_roles_id(5, 3))
    assert net.find_patterns_with_two_roles_id(-8, 3) is None
    assert net.find_patterns_with_two_roles_id(-8, -3) is None
Exemplo n.º 3
0
def test_find_all_verb_by_cate_id():
    net = FuncVerbNet()
    print(net.find_all_verb_by_cate_id(3))
    print(net.find_all_verb_by_cate_id("hhh"))
Exemplo n.º 4
0
def test_find_cate_by_pattern():
    net = FuncVerbNet()
    print(net.find_cate_by_pattern("V {patient} about {topic}"))
Exemplo n.º 5
0
def test_find_patterns_by_role_name():
    net = FuncVerbNet()
    print(net.find_patterns_by_role_name("patient"))
Exemplo n.º 6
0
def test_get_category_number():
    net = FuncVerbNet()
    print(net.get_category_number())
Exemplo n.º 7
0
def test_find_cate_by_id():
    net = FuncVerbNet()
    print(net.find_cate_by_id(10))
Exemplo n.º 8
0
def test_is_role_included_in_pattern():
    net = FuncVerbNet()
    assert net.is_role_included_in_pattern("patient") is True
    assert net.is_role_included_in_pattern("topic") is True
    assert net.is_role_included_in_pattern("word") is False
Exemplo n.º 9
0
def test_find_all_roles_by_cate_id():
    net = FuncVerbNet()
    print(net.find_all_roles_by_cate_id(5))
Exemplo n.º 10
0
def test_is_valid_f_verb():
    net = FuncVerbNet()
    assert net.is_valid_f_verb("location") == False
    assert net.is_valid_f_verb("log") == True
Exemplo n.º 11
0
def test_is_valid_f_pattern():
    net = FuncVerbNet()
    assert net.is_valid_f_pattern("V {jaj}") == False
    assert net.is_valid_f_pattern("V {patient} from {source}") == True
Exemplo n.º 12
0
def test_is_valid_role_name():
    net = FuncVerbNet()
    assert net.is_valid_role_name("patient") == True
    assert net.is_valid_role_name("hello") == False
Exemplo n.º 13
0
def test_is_valid_pattern_name():
    net = FuncVerbNet()
    assert net.is_valid_pattern_name("V {patient} if/when S") == True
    assert net.is_valid_pattern_name("Vs {patient}") == False
Exemplo n.º 14
0
def test_is_valid_category_id():
    net = FuncVerbNet()
    assert net.is_valid_category_id(105) == False
Exemplo n.º 15
0
def test_find_antisense_verbs_by_verb():
    net = FuncVerbNet()
    print(net.find_antisense_verbs_by_verb("stop"))
Exemplo n.º 16
0
def test_find_cates_by_role():
    net = FuncVerbNet()
    print(net.find_cates_by_role("patient"))
Exemplo n.º 17
0
def test_find_similar_verbs_by_verb():
    net = FuncVerbNet()
    print(net.find_similar_verbs_by_verb("write"))
Exemplo n.º 18
0
def test_get_sentences():
    net = FuncVerbNet()
    print(net.get_sentences())
Exemplo n.º 19
0
def test_find_cate_by_verb():
    net = FuncVerbNet()
    print(net.find_cate_by_verb('filter'))
Exemplo n.º 20
0
def test_find_cate_by_name():
    net = FuncVerbNet()
    print(net.find_cate_by_name(1))
Exemplo n.º 21
0
def test_find_role_by_name():
    net = FuncVerbNet()
    print(net.find_role_by_name('patient'))
Exemplo n.º 22
0
def test_find_sentences_by_category():
    net = FuncVerbNet()
    print(net.find_sentences_by_category(0))
Exemplo n.º 23
0
def test_find_patterns_by_role_id():
    net = FuncVerbNet()
    print(net.find_patterns_by_role_id(3))
Exemplo n.º 24
0
def test_find_category_by_any_sentence():
    net = FuncVerbNet()
    print(net.find_category_by_any_sentence('how are you'))
Exemplo n.º 25
0
def test_find_patterns_with_two_roles_name():
    net = FuncVerbNet()
    print(net.find_patterns_with_two_roles_name("location", "patient"))
Exemplo n.º 26
0
def test_find_antisense_category_id_by_category():
    net = FuncVerbNet()
    print(net.find_antisense_category_id_by_category(1))
Exemplo n.º 27
0
def test_find_common_roles_by_pattern_id():
    net = FuncVerbNet()
    print(net.find_common_roles_by_pattern_id(1, 3))
    assert net.find_common_roles_by_pattern_id(-6, 2) is None
Exemplo n.º 28
0
def test_find_antisense_category_id_by_verb():
    net = FuncVerbNet()
    print(net.find_antisense_category_by_verb("stop"))
Exemplo n.º 29
0
def test_find_all_pattern_name_by_cate_id():
    net = FuncVerbNet()
    print(net.find_all_pattern_name_by_cate_id(3))
Exemplo n.º 30
0
def test_find_common_patterns_by_cates():
    net = FuncVerbNet()
    print(net.find_common_patterns_by_cates(1, 18))
    assert net.find_common_patterns_by_cates(-2, -6) is None
    print(net.find_common_patterns_by_cates(-2, 2))