Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Already abbreviated inputs #11

Open
klb2 opened this issue May 29, 2024 · 2 comments
Open

Already abbreviated inputs #11

klb2 opened this issue May 29, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@klb2
Copy link
Contributor

klb2 commented May 29, 2024

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
Copy link
Owner

You are of course right: this behavior is me trying to comply with rule 7.1.6:

image

Solution might be to check in the abbreviation dictionary whether a given word is actually an abbreviation :)

@pierre-24 pierre-24 added the bug Something isn't working label May 29, 2024
@klb2
Copy link
Contributor Author

klb2 commented May 29, 2024

Thanks for clarifying. This seems to be a tricky problem.

njzjz added a commit to njzjz/wenxian that referenced this issue Jun 30, 2024
See pierre-24/pyiso4#11
Example: 10.1021/acs.jpcc.3c05522

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
njzjz added a commit to njzjz/wenxian that referenced this issue Jun 30, 2024
See pierre-24/pyiso4#11
Example: 10.1021/acs.jpcc.3c05522

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants