Exemplo n.º 1
0
def group_sed_in_gor():
    reader = list(csv.reader(open('sed.csv')))
    return group_regions(regions, group_words(lst.transpose(reader)))
Exemplo n.º 2
0
def transpose_word(word):
    "[{str:[float]}] -> [[{str:float}]]"
    def transpose_segment(seg):
        return [dict(zip(seg.keys(), ns)) for ns in lst.transpose(seg.values())]
    return lst.transpose(map(transpose_segment, word))
Exemplo n.º 3
0
 def transpose_segment(seg):
     return [dict(zip(seg.keys(), ns)) for ns in lst.transpose(seg.values())]
Exemplo n.º 4
0
def stringify(zipped):
    print zipped
    return '\n'.join('c(%s)' % ','.join(map(str,ns))
                     for ns in transpose(zipped.values()))