Mercurial > pylearn
view embeddings/convert.py @ 491:180d125dc7e2
made logistic_regression classes compatible with stacker
author | Olivier Breuleux <breuleuo@iro.umontreal.ca> |
---|---|
date | Tue, 28 Oct 2008 11:39:27 -0400 |
parents | a07948f780b9 |
children |
line wrap: on
line source
#!/usr/bin/python """ Convert stdin sentences to word embeddings, and output YAML. """ import sys, string import read import yaml output = [] for l in sys.stdin: l = string.strip(l) output.append((l, read.convert_string(l))) print yaml.dump(output)