lookups in Language.vocab do not reproduce #12951
Replies: 2 comments 3 replies
-
Hi, I definitely can see how this is confusing. Basically there's a few different objects at play. The vocab, the stringstore, and the vectors. Somewhat unintuitively, the So what you could do, is to loop over the strings in the StringStore, which is accessible through I hope that helps! |
Beta Was this translation helpful? Give feedback.
-
Another recent discussion post that may interest you: #12953 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
How to reproduce the behaviour:
With this function:
First calls to the function reproduce:
Results in:
So far, so good. But after performing some lookup in the vocab, the results become different:
Results in:
which is different from before ('dog' wasn't there). If you do another lookup on vocab (e.g. 'kitten') and repeat the call to the function,
the result also contains the last looked up word:
Result:
Very strange. Actually I would have expected the words that I looked up my self to be part of the initial results, but it seems those words are somehow not yet present or fully initialized with a vector until they are explicitly looked up.
Your Environment
Beta Was this translation helpful? Give feedback.
All reactions