def drawPhrase(tree): if tree.zhozh and (tree.part == 'n'): return draw(border(image(str(tree.head))),tree.desc) return draw(image(str(tree.head)),tree.desc)
def asciiimage(x): return image(x)
from ASCIIImage.asciiimage import asciiimage as image from phrase import phrase ''' word--word-+-word | +-word ''' mode = 8 if mode == 7: #Connections HOR = image('-') HOR_DOWN = image('+') DOWN_RIGHT = image('`') VERT_RIGHT = image('+') VERT = image('|') #Boudaries TOP = image('-') SIDE = image('|') TOP_RIGHT = image('.') TOP_LEFT = image(',') BOTTOM_RIGHT = image("'") BOTTOM_LEFT = image('`') else: #Connections HOR = image('─') HOR_DOWN = image('┬') DOWN_RIGHT = image('└') VERT_RIGHT = image('├') VERT = image('│')