Google App Engine

189 views
Skip to first unread message

oakmad

unread,
Aug 4, 2009, 11:38:17 PM8/4/09
to nltk-dev
Hi All,
Below is a post I made on nltk-users regarding my experiments to
get nltk running on Google app engine; Steven Bird suggested it might
be of interest to the dev group as well. Essentially the top level
init.py imports a lot of things unsupported by GAE and I was
successful by substituting my own init.py

> For those that are interested, I managed to successfully work through
> deploying several NLTK modules to GAE. It was actually a lot easier
> than I expected. Essentially the main issue lies in the NLTK
> __init__.py files which load lots of things (from what I gather) that
> I wasn't going to be using. To start create a nltk directory in your
> GAE environment and populate it with an empty __init__.py. At this
> point its a case of copying whichever modules required into this
> directory, if you need a subdirectory create it and make sure you
> place an empty __init__.py file in there (my Python newbie-ness caught
> me out with this). I then created a test page that just imported the
> modules I planned on using, and loading this would trigger different
> include errors, and I followed the ball adding in the required
> modules. The only time this didn't work was with accuracy in metrics,
> which is in the scores file; I replicated the standard init file and
> just included the scores.py (minor). So far I have from stem.porter,
> tag.brill, tag.sequential and tokenize.punkt working for my needs. Its
> pretty quick. I've taken the approach of using pickles where possible;
> like with my trained Brill data. So far I'm happy with the result.
>

Thanks

Adam
Reply all
Reply to author
Forward
0 new messages