Mercurial > pylearn
view embeddings/convert.py @ 527:3eb59514b534
bugfix. fix an import bug that I don't understand the cause.
author | Frederic Bastien <bastienf@iro.umontreal.ca> |
---|---|
date | Mon, 17 Nov 2008 13:16:33 -0500 |
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)