Calculate prosodic weights for each position of a sequence.
Parameters : | prostring : string
scale : tuple or list
factor : float
|
---|---|
Returns : | weights : list
|
See also
Notes
Prosodic weights are specific scaling factors which decrease or increase the gap score of a given segment in alignment analyses (see List2012 or List2012a for a detailed description).
Examples
>>> from lingpy import *
>>> prostring = '#vC>'
>>> prosodic_weights(prostring)
[1.5600000000000001, 1.0, 1.2, 0.69999999999999996]
>>> prosodic_weights(prostring,scale=(4,1,2),factor=0.5)
[6.0, 1, 4, 0.5]