def __init__(self, stagedp_filepath, word_wrap=0): self.filepath = stagedp_filepath with open(stagedp_filepath, 'r') as stagedp_file: stagedp_str = stagedp_file.read() self.stagedp_file_tree = self.stagedp2tree(stagedp_str) tree = self.stagedptree2dgparentedtree() self.tree = word_wrap_tree(tree, width=word_wrap)
def __init__(self, hs2015_filepath, word_wrap=0, debug=False): self.debug = debug self.filepath = hs2015_filepath self.hs2015file_tree, self.edus = parse_hs2015(hs2015_filepath) tree = self.hs2015tree2dgparentedtree() self.tree = word_wrap_tree(tree, width=word_wrap)
def __init__(self, hilda_filepath, word_wrap=0, debug=False): self.debug = debug self.filepath = hilda_filepath with open(hilda_filepath, 'r') as hilda_file: hilda_str = hilda_file.read() self.hildafile_tree = self.hildastr2hildatree(hilda_str) tree = self.hildatree2dgparentedtree() self.tree = word_wrap_tree(tree, width=word_wrap)
def __init__(self, dis_filepath, word_wrap=0, debug=False): self.debug = debug self.filepath = dis_filepath self.child_dict, self.elem_dict, self.edus, self.reltypes = None, None, None, None # FIXME: implement if needed self.edu_set = None # FIXME: implement if needed self.edu_strings = None # FIXME: implement if needed self.disfile_tree = DisFile(dis_filepath).tree tree = dis2tree(self.disfile_tree) self.tree = word_wrap_tree(tree, width=word_wrap)
def __init__(self, dplp_filepath, word_wrap=0, debug=False): self.debug = debug merge_file_str, parsetree_str = self.split_input(dplp_filepath) # FIXME: dplpstr2dplptree output is no longer a tree self.parsetree = self.dplpstr2dplptree(parsetree_str) self.edus = self.extract_edus(merge_file_str) self.add_edus() tree = self.dplptree2dgparentedtree() self.tree = word_wrap_tree(tree, width=word_wrap)