Already abbreviated inputs
Opened this issue · 2 comments
klb2 commented
I am not sure whether this is a bug or the expected behavior:
If a string, which already contains (some) abbreviations, is abbreviated again, dots are changed to commas.
Example:
from pyiso4.ltwa import Abbreviate
a = Abbreviate.create()
a("IEEE Transactions on Wireless Communications")
>>> 'IEEE Trans. Wirel. Commun.'
a('IEEE Trans. Wirel. Commun.')
>>> 'IEEE Trans, Wirel, Commun,'
a("IEEE Trans. Wireless Communications")
>>> 'IEEE Trans, Wirel. Commun.'
For me, the expected behavior was to keep the dots unchanged.
pierre-24 commented
You are of course right: this behavior is me trying to comply with rule 7.1.6:
Solution might be to check in the abbreviation dictionary whether a given word is actually an abbreviation :)
klb2 commented
Thanks for clarifying. This seems to be a tricky problem.