Package featuregenerator :: Package parser :: Package berkeley :: Package socket :: Module berkeleyparsersocket :: Class BerkeleyParserSocket
[hide private]
[frames] | no frames]

Class BerkeleyParserSocket

source code

A flexible wrapper for the Berkeley parser. It starts the Berkeley parser as an object which can be called as a Python object. It requires presence of external java libraries. The advantage of this class (e.g. vs XMLRPC) is that it can fully control starting and stopping the parsing engine within Python code.

Instance Methods [hide private]
 
__init__(self, grammarfile, gateway)
fetches full parsing details from the Berkeley Engine and calculates full features upon request
source code
 
_connect(self, gateway, grammarfile) source code
 
parse(self, sentence_string)
It calls the parse function on BParser object.
source code
 
parse_msg(self, sentence_string) source code
Method Details [hide private]

__init__(self, grammarfile, gateway)
(Constructor)

source code 

fetches full parsing details from the Berkeley Engine and calculates full features upon request

Parameters:
  • grammarfile (string) - Location of grammar file to be loaded
  • gateway (Py4J java gateway object) - Initialize a java gateway