November 2016
Beginner to intermediate
687 pages
15h 31m
English
In this recipe, we'll do chunking and tagging over an execnet gateway. This will be very similar to the tagging in the previous recipe, but we'll be sending two objects instead of one, and we will be receiving a Tree instead of a list, which requires pickling and unpickling for serialization.
As in the previous recipe, you must have execnet installed.
The setup code is very similar to the last recipe, and we'll use the same pickled tagger as well. First, we'll pickle the default chunker used by nltk.chunk.ne_chunk(), though any chunker would do. Next, we make a gateway for the remote_chunk module, get a channel, and send the pickled tagger and chunker over. Then, we receive a pickled ...
Read now
Unlock full access