Skip to content

adoxography/SPieL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Build Status Code Coverage Scrutinizer Code Quality

SPieL stands for "Segmentation of Polysynthetic Languages." It is a tool for splitting words from highly inflected polysynthetic languages into their constituent morphemes. It is still very much in pre-alpha stage.

Installation

SPieL requires Python ≥ 3.6. Assuming you have it set up:

  1. Clone the repository
git clone https://github.com/adoxography/SPieL
  1. Install the package
  • If you're not planning on using any of spiel's neural network dependencies, just use
pip install -e .
  • If do want to use neural networks and you have a GPU with CUDA cores available, use
pip install -e .[gpu]
  • Otherwise, use
pip install -e .[cpu]

If you want to uninstall it later, pip uninstall spiel will remove it from your system.

Usage

Command line

SPieL sets up a command line utility, spiel, when it is installed. It can be invoked like so:

spiel --train TRAIN_FILE [--test TEST_FILE]

TRAIN_FILE and TEST_FILE must correspond to text files with instance data prepared SPieL's expected format. (See below.)

Instance file format

Instances may be given either in sets of three lines, or in single lines. Three line instances should be structured as follows:

Shape
segment ation of   shape
label   for   each segment

The final two lines may be omitted, but files with instances structured in such a way may only be used as the --test argument.

References