OLD Parser Research
The OLD Parser Research library contains utilities and examples to help with performing research involving the morphological parser functionality of a live OLD application.
Probably the most useful general-purpose script is
is a thin OLD-specific wrapper around the Python Requests library. This
module facilitates HTTP-based interaction with a live OLD web service.
Assuming that you have an OLD web service
(https://github.com/jrwdunham/old) being served at 127.0.0.1 on port
5000, an example of usage of
oldclient.py is as follows:
>>> import oldclient >>> old = oldclient.OLDClient('127.0.0.1', '5000') >>> old.login('yourusername', 'yourpassword') # True >>> forms = old.get('forms') # `forms` is a list of dicts >>> forms['transcription'] # u'transcription value'
Example foma phonology scripts in resources/
resources/ directory contains example phonology scripts written in
the regular expression rewrite rule formalism accepted by FST programs
like foma and XFST. Example usage is as follows:
$ foma foma: source resources/blackfoot_phonology_frantz91.script foma: regex phonology ; foma: down nit-ihpiyi # Returns nitsspiyi and nitsiihpiyi
See the foma page (https://code.google.com/p/foma/) for more details.
Other potentially useful files
Module that defines the
ParserResearcher class which represents an OLD
researcher which creates form searches, corpora, phonologies,
morphologies, LMs, and parsers, and which provides conveniences for
storing representations of these locally and for parsing and testing
Executable that exemplifies using the functionality in
oldclient.py) in order to perform parser-based research on a
specific language via an OLD web service. While language-specific and
rife with ad hoc code, it may be useful as an example.