def main(): sentences = file_sentences(sys.argv[1]) for sentence in sentences: sentence = sentence.strip(' "\'\n') if sentence: print sentence print '-'*2 print text_color(sentence) print '-'*10
def make_colors(matrix, svdmatrix): widget = SVDViewer(svdmatrix, svdmatrix.col_labels) widget.setup_standard_layers() from csc.concepttools.colors import text_color colors = [text_color(text) for text in widget.labels] widget.default_colors = np.clip(np.array(colors), 55, 230) widget.update_colors() return widget