You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In text-classification
For Eg
It will work with this
Input : Virat Kohli hits 150 in world cup.
Expected Output : Virat Kohli hits one hundred and fifty in world cup.
Output : Virat Kohli hits one hundred and fifty in world cup.
Input : My brother is 12 years old
Expected Output : My brother is twelve years old
Output : My brother is twelve years old
Where it will fail
Input : "The price of the product is $10"
Expected Output : "The price of the product is ten dollars"
Output : The price of the product is $10
(It will give the expected output when there will be a space between $ and 10)
Input : "The price of the product is $10.99"
Expected Output : "The price of the product is ten dollars and ninety nine cents"
Output : The price of the product is $10.99
There are cases where this approach using inflect lib might not work correctly. For example, if the input contains decimal numbers or if there is no space between number and text.
Thanks for the detailed comment @Ryzxxl - @alytarik can you check to see if a custom implementation of inflect is worth it (effort vs impact)? If we can get rid of that dependency and transform those edge cases (numbers with special characters) then it will be worth implementing it ourselves.
For now, @Ryzxxl you can ignore this issue since it does not really affect the context in which we run tests
Integrate the following module in nlptest for NER and text classification: https://github.com/GEM-benchmark/NL-Augmenter/tree/main/nlaugmenter/transformations/number-to-word
It will fall under the Robustness category
Make sure to watch out for changes in Span start and end indexes when swapping words
The text was updated successfully, but these errors were encountered: