Пример #1
0
def random_sample_fullyfree(s, *_):
    lin = [n for n in s.nodes() if n != 0]
    random.shuffle(lin)
    return mindep.deplen(s, linearization=[0] + lin)
Пример #2
0
 def deplen(s, *_):
     lin = mindep.randlin_projective(s, head_final_bias=0)[1]
     return mindep.deplen(s, linearization=lin, filters=filters)
Пример #3
0
def weighted_deplen(s, lang, *_):
    weights = WEIGHTS[lang]
    lin = opt_mindep.get_linearization(s, weights, thing_fn=CONDITIONING)
    score = mindep.deplen(s, lin)
    return score
Пример #4
0
 def deplen(s, *_):
     _, min_deplin = mindep.mindep_projective_alternating(s)
     return mindep.deplen(s, linearization=min_deplin, filters=filters)
Пример #5
0
 def deplen(s, *_):
     return mindep.deplen(s, filters=filters)
Пример #6
0
def real_deplen(s, *_):  # keep
    return mindep.deplen(s)