LingPy

This documentation is for version 2.0.dev, which is not released yet.

lingpy.align.sca.Alignments

class lingpy.align.sca.Alignments(infile, row='concept', col='doculect', conf='', cognates='cogid', loans=True, **keywords)

Class handles Wordlists for the purpose of alignment analyses.

Parameters :

infile : str

The name of the input file that should conform to the basic format of the ~lingpy.basic.wordlist.Wordlist class and define a specific ID for cognate sets.

row : str (default = “concept”)

A string indicating the name of the row that shall be taken as the basis for the tabular representation of the word list.

col : str (default = “doculect”)

A string indicating the name of the column that shall be taken as the basis for the tabular representation of the word list.

conf : string (default=’‘)

A string defining the path to the configuration file.

cognates : string (default=’cogid’)

The name of the column that stores the cognate IDs.

loans : bool (default=True)

Specify whether loans should be included in the cognate sets.

Notes

This class inherits from Wordlist and additionally creates instances of the Multiple class for all cognate sets that are specified by the “cognates” keyword.

Methods

add_entries(entry, source, function[, override]) Add new entry-types to the word list by modifying given ones.
align([method, iteration, swap_check, ...]) Carry out a multiple alignment analysis of the data.
calculate(data[, taxa, concepts, cognates, ...]) Function calculates specific data.
get_dict([col, row, entry]) Function returns dictionaries of the cells matched by the indices.
get_entries(entry) Return all entries matching the given entry-type as a two-dimensional list.
get_etymdict([ref, entry, loans]) Return an etymological dictionary representation of the word list.
get_list([row, col, entry, flat]) Function returns lists of rows and columns specified by their name.
get_paps([ref, entry, missing]) Function returns a list of present-absent-patterns of a given word list.
output(fileformat, **keywords) Write wordlist to file.
pickle() Store a dump of the data in a binary file.
tokenize([ortho_profile, source, target]) Tokenize the data with help of orthography profiles.

This Page