예제 #1
0
def discont_grammar_novert(discont_tree):
    gram = {}
    lex = {}
    grammar.extract(discont_tree, gram, lex)
    for func in gram:
        for lin in gram[func]:
            gram[func][lin] = {grammarconst.DEFAULT_VERT : \
                                   sum(gram[func][lin].values())}
    return gram
예제 #2
0
def discont_grammar_novert(discont_tree):
    gram = {}
    lex = {}
    grammar.extract(discont_tree, gram, lex)
    for func in gram:
        for lin in gram[func]:
            gram[func][lin] = {grammarconst.DEFAULT_VERT : \
                                   sum(gram[func][lin].values())}
    return gram
예제 #3
0
def discont_lex(discont_tree):
    gram = {}
    lex = {}
    grammar.extract(discont_tree, gram, lex)
    return lex
예제 #4
0
def cont_grammar(cont_tree):
    gram = {}
    lex = {}
    grammar.extract(cont_tree, gram, lex)
    return gram
예제 #5
0
def discont_lex(discont_tree):
    gram = {}
    lex = {}
    grammar.extract(discont_tree, gram, lex)
    return lex
예제 #6
0
def cont_grammar(cont_tree):
    gram = {}
    lex = {}
    grammar.extract(cont_tree, gram, lex)
    return gram