gshell is an interactive utility for testing morphological rules. The gshell interpreter and GFramework library are implemented in Perl. Copyright © 2003-2008 The Sanskrit Library. This is free software, and you are welcome to redistribute it under the terms of the GNU GENERAL PUBLIC LICENSE (GPL) Version 2. See the file COPYING for more details. Development of this software has been supported by NSF grant IIS-0535207. The current version of GFramework is 2.7.
Download
Installation and prerequisites
GFramework requires the Expat XML parser and the XML::Parser library from CPAN. If you would like interactive input editing facilities (cf. man readline), you should install the GNU Readline Library as well as Term::ReadLine::Gnu. (But gshell can be used without the readline facility.) Perl libraries can be installed using the CPAN module (see man 3 CPAN). If you're using Mac OS X, you may find it convenient to use Fink to install the system libraries (assuming the normal Fink installation in /sw/bin, you can do sudo /sw/bin/fink install expat; sudo /sw/bin/fink install readline). If you use Fink to install libraries under /sw, you will need to configure the Perl modules for the appropriate library paths (for XML::Parser, perl Makefile.PL --includedir=/sw/include --libdir=/sw/lib; for Term::ReadLine::Gnu, perl Makefile.PL EXPATLIBPATH=/sw/lib EXPATINCPATH=/sw/include).
If GFramework.pm is not installed in the same directory as gshell.pl, it must be installed in a directory listed in @INC (you can indicate the location with the -I switch to perl).
Sample session
gertie:~/work/morph/v2 mdh$ ./gshell.pl Welcome to gshell, using GFramework 2.7 Copyright (C) 2003-2008 The Sanskrit Library gshell>load Decl2003Nov13.xml OK gshell>decl kartf n Stem matches "[iuf]$", gender "n". s d p +-----------------------+-----------------------+-----------------------+ 1 | kartf | kartfRI | kartFRi | v | kartaH | kartfRI | kartFRi | 2 | kartf | kartfRI | kartFRi | 3 | kartfRA | kartfByAm | kartfBiH | 4 | kartfRe | kartfByAm | kartfByaH | 5 | kartfRaH | kartfByAm | kartfByaH | 6 | kartfRaH | kartfRoH | kartFRAm | 7 | kartfRi | kartfRoH | kartfzu | +-----------------------+-----------------------+-----------------------+ gshell>steps apply affixes: "basic_nominal" apply ruleset: "neuter-stem_derivation" apply ruleset: "neuter_iuf-stem_derivation" apply ruleset: "neuter_iuf-stem_changes" apply ruleset: "sandhi" gshell>hist n7s kartf#i -applied affix: #i kartfn#i ([iuf])(#)([@(ac)]) -> $1n#$3 for n (7.1.73) kartfR#i ([fFrz][#@(aw)@(ku)@(pu)M]*)(n)(.*[@(ac)]) -> $1R$3 (8.4.1-2) kartfRi (#) -> <NOTHING> gshell>desc ku "ku" is a macro: kKgGN gshell>help Commands are: bye conjugate decline describe help history load steps gshell>bye gertie:~/work/morph/v2 mdh$ |
Command summary
The following commands (which may be abbreviated, provided the abbreviation is not ambiguous) are available in gshell:
command | arguments | description |
---|---|---|
bye | quit the shell | |
conjugate | STEM ROOT MORPHID LEXID | conjugate the verbal STEM for the paradigm including MORPHID; STEM is a valid STEM of ROOT with the lexical identification LEXID |
decline | STEM GENDER [LEXID] | decline the nominal STEM for GENDER (m, f, or n); if LEXID is not specified, assume that the STEM is a noun stem |
describe | OBJECT | describe the named macro, mapping, function, or ruleset |
help | provide a brief list of valid commands | |
history | MORPHID | display the derivational history of the form with MORPHID in the most recently generated paradigm |
load | FILE | load and parse the specified grammatical specification in XML format |
steps | display the rulesets used in the generation of the previous paradigm |