def read_proscript(filename, add_end=False):
    columns = defaultdict(list)
    skip_columns = []
    with open(filename) as f:
        reader = csv.DictReader(f, delimiter='|')
        for row in reader:
            for (k, v) in row.items():
                if (not (k in skip_columns)):
                    if (('word' in k) or ('punctuation' in k) or ('pos' in k)):
                        columns[k].append(v)
                    else:
                        try:
                            columns[k].append(float(v))
                        except ValueError:
                            skip_columns.append(k)
        if (add_end and (not (columns['word'][(- 1)] == END))):
            for k in columns.keys():
                if (('word' in k) or ('pos' in k)):
                    columns[k].append(END)
                elif ('punctuation' in k):
                    columns[k].append('')
                else:
                    columns[k].append(0.0)
    return columns
def read_proscript(filename, add_end=False):
    columns = defaultdict(list)
    skip_columns = []
    with open(filename) as f:
        reader = csv.DictReader(f, delimiter='|')
        for row in reader:
            for (k, v) in row.items():
                if (not (k in skip_columns)):
                    if (('word' in k) or ('punctuation' in k) or ('pos' in k)):
                        columns[k].append(v)
                    else:
                        try:
                            columns[k].append(float(v))
                        except ValueError:
                            skip_columns.append(k)
        if (add_end and (not (columns['word'][(- 1)] == END))):
            for k in columns.keys():
                if (('word' in k) or ('pos' in k)):
                    columns[k].append(END)
                elif ('punctuation' in k):
                    columns[k].append()
                else:
                    columns[k].append(0.0)
    return columns