Java word processing

Now this is a difficult problem for which I cannot find a good solution. Suppose we have a line in Java: "He ate 3 apples today." Now the number 3 can be easily identified in Java using the isNumeric function or using regular expressions. But what if I have a line like: "He ate three apples today"? How can I determine that three are actually a number? I used OpenNlp and used my POS tagger, but the time it takes is really too much! Can anyone suggest a better solution for this? Also, there is one file among ".bin" OpenNlp - "num.bin", but I do not know how to use this file. The OpenNlp documentation also says nothing about this. Can someone tell me if this is exactly what I was looking for, and if so, how to use it.

/ ********************************************* ****** ********************************************** ****** ******************************* / I actually don't have enough time here, so I decided to temporarily find a solution here. Make a file / dictionary and take all the entries in the hash table. Then I will sign my proposal and check word by word for numbers similar to what you guys suggested. I will continue to update the file as needed. Thanks for your valuable suggestions, guys, and if you have anything better than this, I will be very happy. OpenNlp implements this very well, the only problem with this is the time complexity, and I want to do it in the minimum amount of time.

+5
source share
2 answers

, . . ... , , (). , , "", . . , . google . , - , )) .

0

. .

, , .

+1

All Articles