Betacode converter should handle lowercase input
See original GitHub issueThe betacode replacer does not currently work with lowercase character, e.g. like those used in older versions of the Perseus xml files (www.perseus.tufts.edu/hopper/dltext?doc=Perseus%3Atext%3A1999.01.0125):
"""ta/ te a)/lla kai\ di' h(\n ai)ti/hn e)pole/mhsan a)llh/loisi."""
A solution could be to use upper()
on strings that are passed in, though there needs to be some caution in handling special characters like the ‘\n’ in ‘h(\n’ in the example above.
Code: https://github.com/cltk/cltk/blob/master/cltk/corpus/greek/beta_to_unicode.py
Issue Analytics
- State:
- Created 5 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
Beta Code to/from UTF-8 Unicode Conversion Package
This program can handle the ordinary ASCII Beta Code encoding of polytonic Greek ... The input ASCII Beta Code letters are lowercase in...
Read more >How to let Python recognize both lower and uppercase input?
Convert the word entirely to lowercase (or uppercase) first: word = input("Please Enter a word:").lower() # Or `.upper()`.
Read more >matgrioni/betacode: A small python package to ... - GitHub
A small python package to flexibly convert from betacode to unicode and back. - GitHub - matgrioni/betacode: A ... Input can be in...
Read more >Requisitioner - How to force input as lowercase?
I am looking to change the input of the Requisioner filed by users in ME51N when creating a Purchase Req. so that it...
Read more >Lowercase Function - CS First - Google
Use the lowercase function to convert any uppercase letters to lowercase letters. ... Program the sprite to greet the user with the name...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Haven’t had a chance to test all the combinations—but this sounds reasonable. I only brought special characters up in the initial post to flag potential pitfalls with the use of slashes in betacode.
@diyclassics I’m sorry, I’m not sure I quite follow. From the documentation
So following this definition, \n shouldn’t be converted and is indeed treated differently. Following the same logic
'\w'.upper()
gives'\\W'
soReplacer().beta_code(r"""pe\wn""")
correctly gives'πὲων'
.