semvec/pypi-packages huggingface dataset:
orditon 0.1.0
Convert string ordinal number to int
License: MIT

# Ordinal-to-number

# Usage

This was tested only in latin american language and english language.

With this package you can convert ordinal number string to int.

To use this package you will need to install [googletrans](https://pypi.org/project/googletrans/) library.

```bash
~ % pip install googletrans==3.1.0a0
```

Now i will explain how this library works, first we have to import the function:

```python
from orditon import formatter
```

Then you can use **formater** like the following example:

```python
# Spanish or Español
ordinal_es = formatter("vigesimo quinto")

# English or Ingles
ordinal_en = formatter("twenty-fifth")

print(ordinal_es)
# Resultado esperado: { "based": 2, "number": 25 } # based significa el numero de unidades utilizadas en la conversion.

print(ordinal_en)
# Expected: { "based": 2, "number": 25 } # based means the number of units used in the conversion.
```

To understand **based** i will show the following example:

```python
# Spanish or Español
ordinal_es = formatter("hola mundo")

# English or Ingles
ordinal_en = formatter("hello world")

print(ordinal_es)
# Resultado esperado: { "based": 0, "number": 0 }

print(ordinal_en)
# Expected: { "based": 0, "number": 0 } 
```

# Author

Developer [@dvozcm](https://www.instagram.com/dvozcm)

# License

[The MIT License | Open Source](https://opensource.org/licenses/MIT)