Advice for Natural Language Processing etc.

  • 8 Replies
  • 1017 Views
*

Melodix

  • Roomba
  • *
  • 1
Advice for Natural Language Processing etc.
« on: March 23, 2018, 06:34:17 pm »
Hi, I'm pretty new here, so I hope this is the right forum.
I recently took an Introduction course to AI and got interested.
I want to write a program which takes a question as input and give an answer depending on a "Facts-Database".
For example, if the user asks "How tall are you?" the program looks into the database for height and answers the question.
So kinda like a Chatbot but with a fixed set of knowledge.
My problem is just that I have no idea where to start, so I would be glad if someone could link me any papers, projects etc. which could help me.

Thanks in advance
Melodix

*

Freddy

  • Administrator
  • **********************
  • Colossus
  • *
  • 6462
  • Mostly Harmless
Re: Advice for Natural Language Processing etc.
« Reply #1 on: March 23, 2018, 07:04:08 pm »
Welcome to the site :)

Since the input/output is fixed then a scripting language like AIML would work for that.

You would be doing things like this :

Code: [Select]
<category>
      <pattern>HOW TALL ARE YOU</pattern>   
      <template>Oh about 8 feet !</template>
</category>

Here's something to read on AIML : Learn AIML

And a more general article we have here : How To Create Your Own Customised Chatbot For Beginners - Chatbots 101

Part two of the latter (A Web-Based Chatbot - Pandorabots) you might want to read first as that deals with a service that will run AIML bots.
« Last Edit: March 23, 2018, 07:38:16 pm by Freddy »

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Global Moderator
  • *********************
  • Deep Thought
  • *
  • 5023
Re: Advice for Natural Language Processing etc.
« Reply #2 on: March 24, 2018, 01:13:52 pm »
Hello Melodix! Good to have you aboard! O0
In the world of AI, it's the thought that counts!

*

keghn

  • Trusty Member
  • *********
  • Terminator
  • *
  • 855
Re: Advice for Natural Language Processing etc.
« Reply #3 on: March 24, 2018, 05:40:15 pm »
Here is a more advanced model that dose not rely on a return button and really speaks. You will like. It no of the long gone
age of text bot,

https://www.youtube.com/watch?time_continue=1&v=rcdhUMBN8P0

*

LOCKSUIT

  • Emerged from nothing
  • Trusty Member
  • *************
  • Transformer
  • *
  • 2038
  • First it wiggles, then it is rewarded.
    • Enter Lair
Re: Advice for Natural Language Processing etc.
« Reply #4 on: March 24, 2018, 05:48:52 pm »
Advice - use a LSTM

DNC is a type of ANN-computer storing invention that recently came out by Deep Mind team. It can answer questions and explain the underground map of London or somethin like that.
Emergent

*

Don Patrick

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 461
    • Artificial Detective
Re: Advice for Natural Language Processing etc.
« Reply #5 on: March 25, 2018, 08:29:52 am »
I should mention that ChatScript, a chatbot scripting language, supports using a fact database. I've often enough seen the topic pass on its support site. I've seen people hook it up to WordNet, which can make do as a knowledge database, although it's not supposed to be one. Of course Chatscript allows building one's own database of facts, and in my opinion it is well suited for programmers.

In NLP, I have yet to come across papers that address both chatbottery and fact databases aka ontologies. We have had a helpful topic on the latter recently that names some:
http://aidreams.co.uk/forum/index.php?topic=12946.0
Personal project: NLP -> learning -> knowledge -> logical inference -> A.I.

*

spydaz

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 309
  • Developing Conversational AI (Natural Language/ML)
    • SpydazWeb
Re: Advice for Natural Language Processing etc.
« Reply #6 on: April 12, 2018, 04:42:36 pm »


NLP is Not so hard to understand;
Tokenizing - Turning stings into tokens?
Categorising - Extracting categorical data
Counting freqs - Self explanatory...... If a word is highly frequent it may be assumed that the String is about that topic......or even a group of words can also be attributed to a particular writing style denoting the Writer of the text etc......
Sentence meaning---- Attempts to understand the sentences .... John is Paul's father, I am happy
Sentiment analysis - i am happy .... User sentiment / object sentiment etc.....

All can be achieved with collected lists (dictionaries), (Word polarities) etc.... Utilising these lists with functions which check the sentence for elements which have information pertaining to the technique being applied.

Yes After these elements and functions created , data collected.... It can be used in Some form of (probability learning mechanism) such as neural networks... based on patterns which element would here ..... The cat sat on the .... but we can all guess the answer... the neural network could predict the answer but ...... so could normal programming code and frequencies... some basic maths (not calculus) .....

the simplest answer is generally the best option.... to have a neural network performing a single task in your AI, and multiple neural networks performing other tasks is a very high overhead, being a part of these Royal societies and institutes in the u.k .....Statistics / Mathematics/computer the is not a massive crossover of skills.  mathematicians and statisticians approach things from a different perspective than programmers. Computer programs produce results which often cannot be recreated mathematically. Becoming a data scientist - made me realise this factor . O lot of NLP product are Mathematical..... such as a neural network.... but the same functionality can be recreated without a neural network......a simple program can often do the trick. A car can be programmed to park itself.... no problem but for every possible parking space there is an issue.... but if enough data is collected any problem can be scaled up or down. but they also have used neural networks to learn how to park .... this does not mean that they needed to.... DARPA was working on this in 2000... and solved the self parking car/AUTO PILOT!
Neural networks can be applied to any problem if re-framed mathematically ....

outputs can be framed to give YES / NO Answers!

So maybe LSTM can select the right answer from the database for you.... but SQL can do that too!

« Last Edit: April 12, 2018, 05:58:50 pm by spydaz »

*

spydaz

  • Trusty Member
  • *******
  • Starship Trooper
  • *
  • 309
  • Developing Conversational AI (Natural Language/ML)
    • SpydazWeb
Re: Advice for Natural Language Processing etc.
« Reply #7 on: April 12, 2018, 04:52:24 pm »
To start  -
Think about your storage for your database;
the SQL to retrieve the answer from the database should be relatively simple.
Build your basic interface (Input / Output)
Make sure your QUESTIONS are all in a SINGLE CASE; when retrieving the user sentence; Make sure its in the SAME CASE;
If answer is not in DB then Ask the User for Answer to be stored for Future reference.

This is your basic loop! begin here!

Then you can develop new methods and functions and mechanisms - to understand more or respond in a different way!

Recently i was informed that you should always begin with your "basic game loop" ... its correct! then you can build upon your idea as your knowledge grows.

When starting in AI begin simple.... Add what you know.....
Soon the Program itself will evolve;  there are always API's in the world which can deliver functionality to your AI; There are always library's to experiment with .... with all these functions etc you will soon have a rich Chat-bot ....

DoNOT Swamp your self with lots of Mad knowledge.... have some goals in mind...Achieve them.

Good luck!
 

*

Art

  • At the end of the game, the King and Pawn go into the same box.
  • Global Moderator
  • *********************
  • Deep Thought
  • *
  • 5023
Re: Advice for Natural Language Processing etc.
« Reply #8 on: April 13, 2018, 02:51:35 am »
No one has asked nor did you mention whether or not you have prior programming experience or not. If so in which arena?
You did mention in your title that you wanted advice for NLP which in and of itself is no trivial task to accomplish.

For a Chatbot with a Fixed set of knowledge, I would follow those other recommendations for learning AIML, ElfScript or RiveScript.

ChatScript, while a very powerful programming platform is not very beginner-friendly and has a somewhat steep learning curve.

ElfScript or RiveScript are much more friendly and every bit as powerful (debatable) than even AIML and can do most of those things you asked with ease.

Just my take. Happy Trails! O0
In the world of AI, it's the thought that counts!

 


Users Online

74 Guests, 2 Users
Users active in past 15 minutes:
ivan.moony, Freddy
[Administrator]
[Trusty Member]

Most Online Today: 93. Most Online Ever: 208 (August 27, 2008, 09:36:30 am)

Articles