Distributed Morphology calculator
DM-engine is a Python implementation of Distributed Morphology (DM).
Distributed Morphology is a framework from theoretical linguistics that is used to describe the morphology (word structure) of natural languages. This package provides an engine that calculates the word forms that are generated by a given DM analysis.
Analyses are entered as plain-text files in the human-friendly YAML format. Minimally, they consist of a title, an inventory of feature values, a list of insertable vocabulary items (VIs), and a list of inputs to be processed (see the example below). The dmengine command-line tool calculates the results and generates a detailed transcript of all calculations for later inspection. The resulting YAML file can be converted into a LaTeX-based report that can directly be compiled into a PDF file.
This package runs under Python 2.7 and 3.3+, use pip to install:
$ pip install dmengine
Create a plain text file that defines your analysis:
# example.yaml - simple demonstration of the analysis definition syntax title: English verbal agreement features: - value: V category: pos - value: Nom category: case - value: +1 category: person - value: +2 category: person - value: +3 category: person - value: -pl category: number - value: +pl category: number vis: - exponent: sleep features: [ V ] - exponent: -s features: [ Nom, +3, -pl ] - exponent: -Ø features: [ Nom ] paradigms: - name: Intransitive paradigm headers: [ [1, 2, 3], [sg, pl] ] inputs: - [ [V], [Nom, +1, -pl] ] - [ [V], [Nom, +1, +pl] ] - [ [V], [Nom, +2, -pl] ] - [ [V], [Nom, +2, +pl] ] - [ [V], [Nom, +3, -pl] ] - [ [V], [Nom, +3, +pl] ]
Save your analysis definition to a file ending with .yaml (e.g. example.yaml).
Open a shell (command line window) and navigate to the directory of your definition file.
Calculate the results of the analyis with the dmengine command creating a PDF report:
$ dmengine example.yaml --pdf
This will create three files:
Go to the outputs section of the report. It provides a paradigm table of the calculated results:
The log section of the report contains detailed information about each individual input and the derivation of the output.
Check the usage of the dmengine command:
$ dmengine --help usage: dmengine [-h] [--version] [--report] [--pdf] [--view] filename [directory] Calculates a given Distributed Morphology (DM) analysis positional arguments: filename dm analysis .yaml definition file directory analysis results output directory optional arguments: -h, --help show this help message and exit --version show program's version number and exit --report create a LaTeX report from the results --pdf render the report to PDF (implies --report) --view open the report in viewer app (implies --pdf)
Analyses can use the following types of rules that manipulate the input before insertion:
The following types of readjustment rules are supported (manipulating the output after insertion):
The insertion of vocabulary items and the application of pre-insertion rules can be restricted to the following context types:
Raphael Finkel provides web-based engines for calculating Paradigm Function Morphology and Network Morphology analyses.
dmengine is distributed under the MIT license.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|File Name & Checksum SHA256 Checksum Help||Version||File Type||Upload Date|
|dmengine-0.2.2-py2-none-any.whl (38.6 kB) Copy SHA256 Checksum SHA256||2.7||Wheel||May 14, 2017|
|dmengine-0.2.2.zip (75.8 kB) Copy SHA256 Checksum SHA256||–||Source||May 14, 2017|