from gmisclib import g2_select
import sys
sys.path.insert(0, "lib")
import prep_p_Vy as PP
import get_phones


def selected(info):
	return True




def select_datalist(data):
	return g2_select.filterlist("'fragments' in d", data)


class find_manual_segmentations(get_phones.find_manual_segmentations_from_name):
	def __init__(self, manDBlist):
		get_phones.find_manual_segmentations_from_name.__init__(self, manDBlist, man_seg_key='man_lab')




def read_Vy(mdfn):
	return get_phones.read_Rhythm_metadata(mdfn)


def prepare_Vy_phones(info, pmap, phonology, find_manual_segmentation):
	candidate_files = find_manual_segmentation(info)
	return PP.prepare_phones(info, pmap, phonology, candidate_files)
