Calculate the lexicostatistical distance between all taxa.
Returns : | dist_matrix : numpy.array
|
---|
Examples
Load the benchmark file SLV.lxs which contains manually conducted cognate judgments.
>>> from lingpy import *
>>> lex = LexStat(get_file('SLV.lxs'))
>>> dist = lex.pairwise_distances()
>>> formstring = '{0[0]:.2f} {0[1]:.2f} {0[2]:.2f} {0[3]:.2f}'
>>> for line in dist: print(formstring.format(line))
0.00 0.15 0.18 0.17
0.15 0.00 0.20 0.10
0.18 0.20 0.00 0.20
0.17 0.10 0.20 0.00