w2n2w:将单词转换为数字,然后再次返回

时间:2021-04-20 03:23:38
【文件属性】:
文件名称:w2n2w:将单词转换为数字,然后再次返回
文件大小:8KB
文件格式:ZIP
更新时间:2021-04-20 03:23:38
Python w2n2w 将单词转换为数字,然后再次返回。 与Python 3.6及更高版本兼容。 为什么这件事呢? 有一个名为的回购协议,将单词转换为数字。 还有另一个名为的,它将数字转换为单词。 据我所知,没有人同时做这两个事情(而且word2number似乎是未维护的)。 因此,我分叉并重新编写了word2number,我们就在这里。 它有什么作用? 将数字单词(如“四十三”)转换为整数/浮点数。 import w2n2w print ( w2n2w . word_to_num ( 'forty three' )) > 43 print ( w2n2w . word_to_num ( 'twenty-two point nine one' )) > 22.91 print ( w2n2w . word_to_num ( 'one hundred and twenty three milli
【文件预览】:
w2n2w-main
----LICENSE(1KB)
----setup.py(631B)
----tests.py(7KB)
----README.md(2KB)
----w2n2w()
--------__init__.py(13KB)

网友评论