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)
def deplen(s, *_): lin = mindep.randlin_projective(s, head_final_bias=0)[1] return mindep.deplen(s, linearization=lin, filters=filters)
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
def deplen(s, *_): _, min_deplin = mindep.mindep_projective_alternating(s) return mindep.deplen(s, linearization=min_deplin, filters=filters)
def deplen(s, *_): return mindep.deplen(s, filters=filters)
def real_deplen(s, *_): # keep return mindep.deplen(s)