lingpy / linse

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

fix wrong annotation to cases like am¹³(start with a vowel) #18

Closed Wu-Urbanek closed 4 years ago

Wu-Urbanek commented 4 years ago

My first proposal, it's not a very smart solution, but it works for now. Could you @LinguList give me some advice on how to improve the code?

LinguList commented 4 years ago

If this is taking too long, and I leave you lost here, @MacyL, let me know, then I'll make the PR, and you can learn from my modifications, okay?

LinguList commented 4 years ago

There's no rush here. Don't worry. Next week, I think, we should plan paper number 2, so we don't lose our schedule, but you need time for yourself as well.

Wu-Urbanek commented 4 years ago

I don't know how to add tests for this task, so please show me this time :)

@MacyL, do you know how to add tests for this? We also need the tests in tests/test_annotate.py. This also helps you to check if your code is doing what you expect it to do. If needed, I can also take over and illustrate, so you know for the next time.

LinguList commented 4 years ago

Okay, I'll try and do this tomorrow.

LinguList commented 4 years ago

Okay, please see my modifications. Please pull this (I updated your branch, @MacyL), and then do:

$ cd tests/
$ pytest test_annotate.py --cov=linse.annotate

This explains what part of the code is executed, which is important.

You can also see that I added two more test pairs in test_annotate.py. These are then checked if they yield the desired result.