allo-media / text2num

Parse and convert numbers written in French, English, Spanish, Portuguese, German and Catalan into their digit representation.
https://text2num.readthedocs.io
MIT License
102 stars 47 forks source link

Is there a way to convert ordinals less than 3? #98

Open leokury opened 1 year ago

leokury commented 1 year ago

I cannot convert ordinal less than 3 in Portuguese even setting the ordinal threshold parameter. Is there any way to do that?

Examples:

alpha2digit("primeiro", "pt", ordinal_threshold=0)

Expected = 1º Result = 'primeiro'

alpha2digit("segundo", "pt", ordinal_threshold=1)

Expected = 2º Result = 'segundo'

rtxm commented 1 year ago

It looks like there is a bug in the Portuguese version indeed.

haitiangk92 commented 9 months ago

This is also an issue in English. 'First', 'Second' and 'Third' do not get interpreted.

rtxm commented 9 months ago

This is also an issue in English. 'First', 'Second' and 'Third' do not get interpreted.

Even with ordinal_threshold=0?