For a given number, I want to distinguish whether it is a phone number or a quantity value, depending on the context. One idea I have right now is to figure out its part of speech, but I am having trouble doing that using NLTK.
For example: "How many books do you have? I have 911 books." In this case, 911 is a adjective, so it should be converted to "NINE HUNDRED AND ELEVEN". But in this sentence, "Can you call 911, there's an emergency!" 911 is a noun (phone number), and should be converted to "NINE ONE ONE"
When I use the tokenizer in NLTK, it only tells me that 911 is a cardinal number, but is there a way to change it so that it will give me a part of speech that's more specific? (I want noun, adjective, or pronoun)