Mercurial > pylearn
view sandbox/embeddings/convert.py @ 462:7554bc99096a
Removed import of nnet_ops since it is now deprecated
author | Olivier Delalleau <delallea@iro> |
---|---|
date | Fri, 10 Oct 2008 10:43:43 -0400 |
parents | ed6b0b3be8d2 |
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)