Mercurial > pylearn
comparison embeddings/process.py @ 534:eaa5ad4089a1
Another bugfix in pylearn.embeddings.length()
author | Joseph Turian <turian@gmail.com> |
---|---|
date | Tue, 18 Nov 2008 03:49:37 -0500 |
parents | de974b4fc4ea |
children | c6563c629984 |
comparison
equal
deleted
inserted
replaced
533:de974b4fc4ea | 534:eaa5ad4089a1 |
---|---|
13 | 13 |
14 def length(): | 14 def length(): |
15 """ | 15 """ |
16 @return: The length of embeddings | 16 @return: The length of embeddings |
17 """ | 17 """ |
18 len(__word_to_embedding[__words[0]]) | 18 return len(__word_to_embedding[__words[0]]) |
19 | 19 |
20 def word_to_embedding(w): | 20 def word_to_embedding(w): |
21 read_embeddings() | 21 read_embeddings() |
22 return __word_to_embedding[w] | 22 return __word_to_embedding[w] |
23 | 23 |