LingPy

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

lingpy.compare.lexstat.LexStat.get_random_distances

LexStat.get_random_distances(method='lexstat', runs=100, mode='overlap', gop=-2, scale=0.5, factor=0.3, restricted_chars='T_')

Method calculates randoms scores for unrelated words in a dataset.

Parameters :

method : {‘sca’,’lexstat’,’edit-dist’,’turchin’} (default=’sca’)

Select the method that shall be used for the calculation.

runs : int (default=100)

Select the number of random alignments for each language pair.

mode : {‘global’,’local’,’overlap’,’dialign’} (default=’overlap’)

Select the mode for the alignment analysis.

gop : int (default=-2)

If ‘sca’ is selected as a method, define the gap opening penalty.

scale : float (default=0.5)

Select the scale for the gap extension penalty.

factor : float (default=0.3)

Select the factor for extra scores for identical prosodic segments.

restricted_chars : str (default=”T_”)

Select the restricted chars (boundary markers) in the prosodic strings in order to enable secondary alignment.

Returns :

D : c{numpy.array}

An array with all distances calculated for each sequence pair.

This Page