-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.py
39 lines (31 loc) · 1.66 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
from speakerSetup import SpeakerStatus
#pylint: disable=C0103
speaker = SpeakerStatus()
unicode_smallcapsdic={
'ᴀ' : 'a', 'ʙ' : 'b', 'ᴄ': 'c', 'ᴅ' : 'd', 'ᴇ' : 'e',
chr(42800) : 'f', 'ғ' : 'f', 'ɢ' : 'g',
'ʜ': 'h', 'ɪ' : 'i', 'ᴊ' : 'j', 'ᴋ' : 'k', 'ʟ' : 'l', 'ᴍ': 'm', 'ɴ': 'n',
'ᴏ' : 'o', 'ᴘ' : 'p', 'ǫ' : 'q',
'ʀ': 'r', chr(0xA731): 's', 'ᴛ': 't', 'ᴜ' : 'u', 'ᴠ' : 'v', 'ᴡ' : 'w',
'x': 'x', 'ʏ' : 'y', 'ᴢ' : 'z'
}
# TEST STRINGS
headline = "Dɪᴇ Zᴜᴋᴜɴꜰᴛ ᴅᴇꜱ Lᴇʀɴᴇɴꜱ ᴍɪᴛ Küɴꜱᴛʟɪᴄʜᴇʀ Iɴᴛᴇʟʟɪɢᴇɴᴢ"
srtest = "Fᴏʀ sᴄʀᴇᴇɴʀᴇᴀᴅᴇʀ sᴏғᴛᴡᴀʀᴇ, ɪᴛ ɪs ǫᴜɪᴛᴇ ᴅɪғғɪᴄᴜʟᴛ ᴛᴏ ʀᴇᴀᴅ sᴍᴀʟʟ ᴄᴀᴘs " + \
"ᴛʜᴀᴛ ᴘᴇᴏᴘʟᴇ ʟɪᴋᴇ ᴛᴏ ᴜsᴇ ғᴏʀ ʜᴇᴀᴅʟɪɴᴇs ᴏɴ LɪɴᴋᴇᴅIɴ ᴘᴏsᴛs."
fox = "ᴛʜᴇ ʙɪɢ ʙʀᴏᴡɴ ғᴏx ᴊᴜᴍᴘs ᴏᴠᴇʀ ᴛʜᴇ ʟᴀᴢʏ ᴅᴏɢ."
franz = "ғʀᴀɴᴢ ᴊᴀɢᴛ ɪᴍ ᴋᴏᴍᴘʟᴇᴛᴛ ᴠᴇʀᴡᴀʜʀʟᴏsᴛᴇɴ ᴛᴀxɪ ǫᴜᴇʀ ᴅᴜʀᴄʜ ʙᴀʏᴇʀɴ."
# BEFORE CONVERSION
for saying in [headline, srtest, fox, franz]:
speaker.talk(saying)
# output: D Z L Kü I
# CONVERSION
for to_replace, replacement in unicode_smallcapsdic.items():
headline = headline.replace(to_replace, replacement)
fox = fox.replace(to_replace, replacement)
srtest = srtest.replace(to_replace, replacement)
franz = franz.replace(to_replace, replacement)
# AFTER CONVERSION
for saying in [headline, srtest, fox, franz]:
speaker.talk(saying)
#pylint: enable=C0103