It's not super-convenient because of the complicated, lazy way that NLTK
imports modules. Something like this works:
*julia> **@pyimport nltk.corpus as corpus*
*julia> **wordnet=corpus.wordnet*
*PyObject <WordNetCorpusReader in
'/Users/malmaud/nltk_data/corpora/wordnet'>*
*julia> **pycall(wordnet["synsets"],PyAny,"dog")*
*8-element Array{Any,1}:*
* PyObject Synset('dog.n.01') *
* PyObject Synset('frump.n.01') *
* PyObject Synset('dog.n.03') *
* PyObject Synset('cad.n.01') *
* PyObject Synset('frank.n.02') *
* PyObject Synset('pawl.n.01') *
* PyObject Synset('andiron.n.01')*
* PyObject Synset('chase.v.01') *
*julia> *
On Thursday, January 16, 2014 8:01:57 AM UTC-5, Jon Norberg wrote:
>
> Hi Jonathan
>
> would you by any chance have some example code to share how you work with
> NLTK using pycall. I wish there were more julia examples scripts available
> for browning and learning.
>
> Thanks,
>