lingpy / linse

A Python library for the manipulation of linguistic sequences.
Apache License 2.0
2 stars 1 forks source link

deal with strings start with a vowel #17

Closed Wu-Urbanek closed 4 years ago

Wu-Urbanek commented 4 years ago
An issue that I found when writing a check structure code: words like an³⁵, aw³³ or im⁵³ which start with a vowel, the script returns a question mark to the initial position. The output looks like:
an³⁵ ['a', 'n', '³⁵'] ['?', '?', 't']
aw³³ ['a', 'w', '³³'] ['?', '?', 't']
a:p¹¹ ['aː', 'p', '¹¹'] ['?', '?', 't']
LinguList commented 4 years ago

@MacyL, do you want to check this bug yourself?

LinguList commented 4 years ago

See here: https://github.com/lingpy/linse/blob/c1cad7b73190208a3c47cf7f47e08d0b985eda17/src/linse/annotate.py#L560-L570

You see, we check the lenght of the sequence to be 3 in this case, and we have the vowel in first position. This is okay, but the condition is also: the second position needs to be a consonant, and the last should be a tone, then it can be interepreted accordingly. I forgot that possibility.

You could add the if-statement to linse and make a PR. Do you want to go for it?

Wu-Urbanek commented 4 years ago

I can try :)

Wu-Urbanek commented 4 years ago

I made some changes to the code, but I don't have the right to create and update a branch.

LinguList commented 4 years ago

Okay, we have holidays anyway. I manage access when we go back to work or when I find time before. Can't do it from smartphone...

Wu-Urbanek commented 4 years ago

oh, I just remember that I have to make a PR but I don't have the right to create a PR in this repository.

Wu-Urbanek commented 4 years ago

a reminder that I made some changes in