Hello. Overwhelmed first-timer here. Using Nodebox Linguistics, is there a way to search ALL of the definitions in wordnet for the occurrence of a particular word. For example the result set for a query on "bird" would include, "beak", "feather" etc, because those words' definitions contain the word "bird." Also, can example sentences be excluded? I would really like to avoid a fancy grep/regex of the entire "dict" folder.
The new NodeBox forum is live! Everything from support.nodebox.net moved here: sign in with the same email to pick up your old posts. Something not working? Write to forum-support@nodebox.net.
General DiscussionFrom the old forum
How do you search ALL of the definitions in wordnet?
-
-
There's a en.wordnet.all-nouns() function that gives you a list of all nouns in WordNet. You could loop over it, look up up all of the descriptions, scan them for a given query, and populate a list of matches. This would probably be slower than grep.
The way to go would be be to loop over it once, store the descriptions in a .txt file, from then on load the .txt file as a Python dictionary of word => description items, and scan that. That may be faster, but it will use a lot of memory.
Best,
Tom