comparison embeddings/convert.py @ 468:a07948f780b9

Moved embeddings out of sandbox
author Joseph Turian <turian@iro.umontreal.ca>
date Tue, 21 Oct 2008 16:24:44 -0400
parents sandbox/embeddings/convert.py@ed6b0b3be8d2
children
comparison
equal deleted inserted replaced
467:f3711bcc467e 468:a07948f780b9
1 #!/usr/bin/python
2 """
3 Convert stdin sentences to word embeddings, and output YAML.
4 """
5
6 import sys, string
7 import read
8 import yaml
9
10 output = []
11 for l in sys.stdin:
12 l = string.strip(l)
13 output.append((l, read.convert_string(l)))
14
15 print yaml.dump(output)