raises KeyError for Portuguese
Schillingerkurs opened this issue · 6 comments
Schillingerkurs commented
Thanks for providing this package. Unfortunately I receive an for Portuguese:
!pip install text2num
from text_to_num import text2num
text2num("trinta e dois", "pt")
Thanks,
Felix
rtxm commented
In [1]: from text_to_num import text2num
In [2]: text2num("trinta e dois", "pt")
Out[2]: 32
Which version of text2num
do you use?
Schillingerkurs commented
text2num 2.2.1
Am Fr., 28. Mai 2021 um 16:33 Uhr schrieb Romuald Texier-Marcadé <
***@***.***>:
… In [1]: from text_to_num import text2num
In [2]: text2num("trinta e dois", "pt")Out[2]: 32
Which version of text2num do you use?
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLI5K4RMY2QDPWQASZ2MTLTP6SSVANCNFSM45WSBW6A>
.
Schillingerkurs commented
The full error I receive:
Traceback (most recent call last):
File "<ipython-input-183-8f93b09387b5>", line 1, in <module>
text2num("trinta e dois", "pt")
File
"C:\Users\fs.egb\Anaconda3\lib\site-packages\text_to_num\transforms.py",
line 59, in text2num
language = LANG[lang]
KeyError: 'pt'
Am Fr., 28. Mai 2021 um 16:38 Uhr schrieb Felix Schilling <
***@***.***>:
… text2num 2.2.1
Am Fr., 28. Mai 2021 um 16:33 Uhr schrieb Romuald Texier-Marcadé <
***@***.***>:
> In [1]: from text_to_num import text2num
> In [2]: text2num("trinta e dois", "pt")Out[2]: 32
>
> Which version of text2num do you use?
>
> —
> You are receiving this because you authored the thread.
> Reply to this email directly, view it on GitHub
> <#48 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AHLI5K4RMY2QDPWQASZ2MTLTP6SSVANCNFSM45WSBW6A>
> .
>
rtxm commented
Spanish Portuguese support has not been released yet, it's in master only.
It's been stable for a while now. I'll make a new release.
Schillingerkurs commented
This is Portuguese, but thank you so much!
Have a nice weekend
Am Fr., 28. Mai 2021 um 16:54 Uhr schrieb Romuald Texier-Marcadé <
***@***.***>:
… Spanish support has not been released yet, it's in master only.
It's been stable for a while now. I'll make a new release.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#48 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHLI5KZI5FMFXJFMGYZUDZLTP6VBVANCNFSM45WSBW6A>
.
rtxm commented
Sorry for the typo! Please be assured that I don't confuse Portuguese with Spanish.
Text2num 2.3.0 with Portuguese support is fresh on Pypi!
Enjoy!