This archive is associated with the AGGREGATION project, which seeks to automatically generate HPSG grammars on the basis of Interlinnear Glossed Text data. For a detailed description of this project see Chapter 3 of Inferring Grammars from Interlinear Glossed Text: Extracting Typological and Lexical Properties for the Automatic Generation of HPSG Grammars, PhD thesis by Kristen Howell 2020. 

This archive includes the following:
The AGGREGATION/BASIL syntactic inference repository from https://git.ling.washington.edu/agg/aggregation
The MOM morphological inference repository from https://git.ling.washington.edu/agg/mom
The Xigt framework for eXtensible Interlinear Glossed Text release 1.1 from https://github.com/xigt/xigt
The Grammar Matrix Customization system http://matrix.ling.washington.edu/index.html
Code, dependencies and sample data for running the AGGREGATION pipeline end to end.

The following publications descrbibe the projects in this archive:
Syntactic Inference (AGGREGATION, BASIL)
    Kristen Howell. 2020. Inferring Grammars from Interlinear Glossed Text: Extracting Typological and Lexical Properties for the Automatic Generation of HPSG Grammars. PhD thesis, University of Washington
    Olga Zamaraeva, Kristen Howell, and Emily M Bender. 2019a. Handling cross-cutting properties in automatic inference of lexical classes: A case study of Chintang. In Proceedings
of the 3rd Workshop on the Use of Computational Methods in the Study of Endangered Languages.
    Kristen Howell, Emily M. Bender, Michael Lockwood, Fei Xia, and Olga Zamaraeva. 2017. Inferring case systems from IGT: Impacts and detection of variable glossing practices. ComputEL-2, pages 6775
    Emily M. Bender, Joshua Crowgey, Michael Wayne Goodman, and Fei Xia. June 2014. Learning grammar specications from IGT: A case study of Chintang. In Proceedings
of the 2014 Workshop on the Use of Computational Methods in the Study of Endangered Languages, pages 4353, Baltimore, Maryland, USA, June 2014. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/W14-2206.
    Emily M. Bender, Michael Wayne Goodman, Joshua Crowgey, and Fei Xia. August 2013. Towards creating precision grammars from interlinear glossed text: Inferring large-scale typological properties. In Proceedings of the 7th Workshop on Language Technology for Cultural Heritage, Social Sciences, and Humanities, pages 7483, Soa, Bulgaria, August 2013. Association for Computational Linguistics. URL http://www.aclweb.org/anthology/W132710.

Morphological Inference (MOM)
    David Wax. 2014. Automated grammar engineering for verbal morphology. Master's thesis, University of Washington.
    Olga Zamaraeva. 2016. Inferring morphotactics from interlinear glossed text: combining clustering and precision grammars. In Proceedings of the 14th SIGMORPHON Workshop on Computational Research in Phonetics, Phonology, and Morphology, pages 141150
    Olga Zamaraeva, Franti²ek Kratochvíl, Emily M Bender, Fei Xia, and Kristen Howell. 2017. Computational support for nding word classes: A case study of Abui. In Proceedings
of the 2nd Workshop on the Use of Computational Methods in the Study of Endangered Languages, pages 130140.

XIGT
    Michael Wayne Goodman, Joshua Crowgey, Fei Xia, and Emily M. Bender. 2015. Xigt: Extensible interlinear gloss text for natural language processing. Language Resources and Evaluation, 49 (2):455485.

THE GRAMMAR MATRIX
    Emily M. Bender, Dan Flickinger, and Stephan Oepen. 2002. The Grammar Matrix: An open-source starter-kit for the rapid development of cross-linguistically consistent broadcoverage precision grammars. In John Carroll, Nelleke Oostdijk, and Richard Sutclie, editors, Proceedings of the Workshop on Grammar Engineering and Evaluation at the 19th International Conference on Computational Linguistics, pages 814, Taipei, Taiwan, 2002.
    Emily M. Bender, Scott Drellishak, Antske Fokkens, Laurie Poulson, and Sayyah Saleem. 2010. Grammar customization. Research on Language & Computation, 8:150. ISSN 1570-7075.

INSTRUCTIONS, CODE, DEPENDENCIES AND SAMPLE DATA FOR RUNNING THE AGGREGATION PIPELINE END-TO-END:
This code is associated with the following paper:
Inferring Grammars from Interlinear Glossed Text: Extracting Typological and Lexical Properties for the Automatic Generation of HPSG Grammars
PhD Thesis by Kristen Howell 2020

Requirements:
Python2 and Python3 (tested with 2.7.5 and 3.4.1)

Instructions:
Check out this repository. From the termnial:

git clone https://git.ling.washington.edu/agg/repro/basil-2020
cd basil-2020

Set up a virtual environment with the necessary dependencies. The following script sets up a python venv. You can install the packages locally if you prefer.
From the terminal:
./create_env.sh

Run the reproduction script. This script runs the BASIL inference system and three baselines (brod, typ and rand, described in the paper) on one language (Wambaya, from Nordlinger 1998)

If you did not create a virtual environment with create_env.sh and instead installed packages locally, you should comment out the following lines from run_aggregation:
#source agg_env/bin/activate
#deactivate

./run_aggregation.sh

Using other data:
If you wish to reproduce the results for the other languages contact Kristen Howell or Emily Bender. We do not have permission to share all of the datasets, but can share some and/or put you in contact with the linguists who own the data. To run BASIL on other languages, you will need an enriched xigt dataset as described in Howell 2020. Pleas ask us for help to conver FLeX, Toolbox or plain text data. We have utilities for this. You will also need to create config files for the data as modeled in the data/wmb folder and described in https://git.ling.washington.edu/agg/mom/-/tree/master/mom/config_files.
If you have data for all of the languages from Howell 2020, put it in the data folder in folders organized by iso, parallel to data/wmb. Then uncomment line 8 or run_aggregation.sh to run all of the languages. Some datasets are very memory expensive, so you may want to break this into smaller jobs.

run_ggregation is currently configured to run ten fold and average the results across each fold. This can be modified if you wish to only run a single train-test split.

To use run_aggregation on other datasets change the iso code "wmb" to the iso code of your language and name its data folder with that iso. You can run on multiple languages, by adding iso codes to the iso_codes list.

Output:
For each system (BASIL and each baseline), run_aggregation creates an output folder and results file. The output folder contains choices files (grammar specifications), grammars, and profiles containing the parsed items from the test data. The results file includes lexical coverage, parse coverage and ambiguities for each fold. Correct coverage, as described in the paper requires manual treebanking. For the treebanked results from Howell 2020, contact Kristen Howell or Emily Bender.

Data and Dependencies:
For ease of reproducability, this repository includes datasets and snapshots of systems produced by other researchers, as follows:
Wambaya Dataset:
    (adapted from) Rachel Nordlinger. 1998. A Grammar of Wambaya, Northern Australia. Pacic Linguistics.
    https://catalog.paradisec.org.au/collections/RN1?items_page=8
ACE:
    Berthold Crysmann and Woodley Packard. 2012. Towards ecient HPSG generation for German, a non-congurational language. In Proceedings of the 24th International Conference on Computational Linguistics, pages 695710.
    http://sweaglesw.org/linguistics/ace/
ART:
    http://sweaglesw.org/linguistics/libtsdb/art.html
