# How to extract specific information from text using Machine learning?

Suppose I have a text like below which usually have 2/3 sentences and 100-200 characters.

Johny bought milk of 50 dollars from walmart. Now he has left only 20 dollars.

I want to extract

Person Name: Johny

Spent: 50 dollars

Money left: 20 dollars.

Spent where: Walmart.

I have gone through lots of material on Recurrent neural network. Watched cs231n video on RNN and understood the next character prediction. In these cases we have set of 26 characters that we can use as output classes to find the next character using probability. But here the problem seems entirely different because we don't know the output classes. The output depends on the words and numbers in the text which can be any random word or number.

I read on Quora that convolutional neural network can also extract features on the text. Wondering if that can also solve this particular problem?

• Computational Linguistics is an extremely intense field that doesn’t necessarily tell you how much someone spent. It instead does things like finding Subjects, verbs, indirect objects, etc... it heavily relies on a strong foundation in sentence structure and “types” of words. From what I’ve read in the field, models for computational linguistics utilize several models at once to achieve the type of goal you are after. – Ryan Honea Feb 20 '18 at 6:29

There are multiple technologies (not necessary neural networks) that can be used for this problem, and some of them are quite mature. See e.g. this repo for an easy-to-plug-in solution, or try to apply the ne_chunk_sents function from the NLTK module in Python.