Open doppio opened 1 year ago
I had a workaround to fix this @doppio. Let me review it in a couple of weeks. I'm full of work right now.
The simplest way you can fix this, is using a recursive function. I'm using this library with NLP results of my own models. In those transcriptions, I've found number spelling (e.g nineteen seventy six
) and I've fixed there, but I didn't notice you need this feature too
As discussed in #2, this package could support complex number sequences:
1976
.55339
Currently, the values get added together ("1976" -> 19 + 70 + 6 = 95). Simple digit sequences are already supported ("one five three" → 153), but sequences of numbers that are not simple digits do not get parsed correctly.
Pull requests on this issue are welcome. 🙂