jtauber / greek-accentuation

Python 3 library for accenting (and analyzing the accentuation of) Ancient Greek words
MIT License
56 stars 10 forks source link

Accenting Ἰάννης #21

Closed biblical-text closed 1 year ago

biblical-text commented 3 years ago

I was testing out how this word would be accented, by adding this to docs.rst:

>>> persistent('Ἰάννης', 'Ἰάννης')
'Ἰάννης'

It returned something I didn't expect:

File "docs.rst", line 660, in docs.rst
Failed example:
    persistent('Ἰάννης', 'Ἰάννης')
Expected:
    'Ἰάννης'
Got:
    'Ἰά́ννης'

My initial impression is that this is a bug, but perhaps I am doing something wrong? 😀

Interestinglingly the Byzantine Text accents this word as Ἰαννῆς. Im not sure why.

biblical-text commented 3 years ago

Oh, it turns out that the accents must be removed in the first parameter of persistent. Im torn between closing this issue, and suggesting some documentation in the python file. But I don't know how python documentation works. 😀

jtauber commented 3 years ago

Yes sorry, the point of the function is to add accentuation during the generation of forms.

What would you expect the behaviour to be if the word is already accented? (both correctly and incorrectly)

biblical-text commented 3 years ago

My misunderstanding is likely due to the fact that I am unfamiliar with Python, so I could be missing something obvious.

It was definitely my mistake in terms of not understanding the expected range of inputs. I am just not sure if there is some way this could be avoided for others. Is there a python way to make the expected inputs/outputs more clear?

Anyway, the library works great, I don't want to waste your time on this, please feel free to just go ahead and close the issue. (I only didn't close the issue as I wonder if there was some documentation/comment that would be appropriate to add)