# Which AI branch should I follow for Natural Language Processing problem?

I'm doing some testings on NLP and I was thinking to write a code that works like this.

• Subject -> User input -> Output

• Dog ownership -> I own a dog -> Yes

• Dog ownership -> My dog is called Joe -> Yes

• Dog ownership -> I don't have a dog -> No

Which branch or algorithm would be the best approach for this problem?

• I think LISP language will be very useful to you. – Ugnes Jul 21 '17 at 21:37
• @Ugnes have you understood the question. – quintumnia Aug 15 '17 at 5:16
• An intelligent agent or assistant does the same thing. – quintumnia Aug 15 '17 at 5:20
• Secondly,the OP is not clear,one asks for AI branch,but then wants an algorithm. – quintumnia Aug 15 '17 at 5:32
• @quintumnia I apologize if my selection of words was incorrect. At the end, all I have is a problem and I'm trying to find a solution for it. Thanks for your response. – bleand Aug 17 '17 at 13:11

To be honest, I don't understand exactly how the system you're proposing is supposed to behave. It looks something like "take a natural language statement and see if it's consistent with another statement/subject". If you have lots of training data, ANN's / Deep Learning could quite possibly get you there. But I have a hunch you might also get some mileage out of using something like a rule induction approach. Maybe something like CN2. I'd suggest at least reading up on those and see if you can see a way to apply that to your system.

• "take a natural language statement and see if it's consistent with another statement/subject" <--That's exactly how I want it to work, and the thing is that I don't have enough training data for ANN's but I'm starting to think that I will need it. Since it will require a big amount of effort, I was waiting to be sure that getting this big set of data is the solution. Thanks for your reply mindcrime – bleand Jul 22 '17 at 14:54
• The question and answer,here is kinda opinion based.and can those who up vote tell us why – quintumnia Aug 15 '17 at 5:36

I think you need first, data mining to export the meaning and relations in this data, then you can build your expert system that will answer you.

• I do have some training data. Do you know any particular algorithm that could work? – bleand Jul 20 '17 at 15:00
• @bleand I would kindly request you to be specific,are you asking for an Artificial intelligence branch or an algorithm. – quintumnia Aug 15 '17 at 5:33
• @quintumnia I responded in another comment – bleand Aug 16 '17 at 11:39

If (as you mention in a comment) you have a set of statements and want to check if other statements are consistent with this, then neural networks are the one thing I would not recommend. Your problem fits into the domain of predicate calculus, with some basic pattern recognition of the input sentences (assuming you only accept a certain type of sentences). You can do that without the need for masses of data.

First, transform your statement into a canonical representation, probably using first order logic and simple pattern matching/string matching. For example,

I own a dog
X own/owns a/an Y
-> owns(I, dog)

Here you have a pattern "X own(s) a(n) Y" which you recognise in your user input. You then have a predicate owns(X, Y) which you add to your database of statements. This database you can then query. For example, Do I own a cat? could fit a question pattern Do/Does X own(s) a(n) Y?, and you can search for own(I, cat) in your DB; you will not find it, so the answer is "No". If the question is "Do I own a dog?" you will find owns(I, dog) in your database and you can reply "Yes".

This is all rather 'old' technology, but I think you will find that you will get decent results much quicker than with machine learning or statistical methods, especially if you have not much data to begin with.

A further branch to look into would be expert systems. If you're thinking in terms of programming languages, then Prolog would be well suited for this, but any language should do, really.