Closed Nithin-Holla closed 2 years ago
Hi Nithin,
If you use the ordinals
argument, this will return the correct number. Try this:
print(extract_number('eighteenth', ordinals=True))
print(extract_number('twentieth', ordinals=True))
Would that meet your needs?
Ah, wasn't aware of this argument. It's fine then!
Describe the bug For inputs such as 'eighteenth
and
twentieth` as in centuries, the input is wrongly interpreted as fractions and the output is a decimal number for instance 0.05555 (1/18) and 0.05 (1/20) respectively. This is incorrect.To Reproduce Steps to reproduce the behavior:
Expected behavior The output could be
False
if it can't be converted to18th
and20th
for example.Environment (please complete the following information):