def intify_unseen_word_features(word_features): intified_features = [] for alignment_idx in range(len(word_features)): feature = word_features[alignment_idx] feature_intified = [letter_to_int(letter) for letter in feature] intified_features.append(feature_intified) return intified_features
def intify_features(features, targets): intified_features = [] intified_targets = [] for alignment_idx in range(len(features)): feature = features[alignment_idx] target = targets[alignment_idx] feature_intified = [letter_to_int(letter) for letter in feature] intified_features.append(feature_intified) target_intified = phone_to_int(target) intified_targets.append(target_intified) return intified_features, intified_targets