python缩写词_扩展Python中的英语缩略词

本文介绍了一个Python字典,该字典包含了常见的英文缩写词及其完整形式,例如"ain't": "am not / are not / is not / has not / have not"。这个字典可用于解析和扩展Python中的英语缩略词。注意在查询时需使用双引号,并且提到了可能存在的消歧问题。
摘要由CSDN通过智能技术生成

我把wikipedia的扩展页面压缩成python字典(见下文)

请注意,如您所料,在查询字典时,您一定要使用双引号:

a57ff4e3690af204bf4d1a68de7ed0d1.png

另外,我在维基百科页面中留下了多个选项。你可以随意修改它。注意,对右展开的消歧将是一个棘手的问题!contractions = {

"ain't": "am not / are not / is not / has not / have not",

"aren't": "are not / am not",

"can't": "cannot",

"can't've": "cannot have",

"'cause": "because",

"could've": "could have",

"couldn't": "could not",

"couldn't've": "could not have",

"didn't": "did not",

"doesn't": "does not",

"don't": "do not",

"hadn't": "had not",

"hadn't've": "had not have",

"hasn't": "has not",

"haven't": "have not",

"he'd": "he had / he would",

"he'd've": "he would have",

"he'll": "he shall / he will",

"he'll've":

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值