Natural Language Processing Techniques

Creating Games? Developing something for fun?

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Hutchboy
Posts: 108
Joined: Wed Aug 01, 2018 2:57 pm
Contact:

Natural Language Processing Techniques

Post by Hutchboy » Wed Jul 17, 2024 3:29 am

Hi,
I have been working on a few chatbots and adventure games and got interested in Natural Language Processing techniques to create a parser I could use to process user input.

I have taken a stab at implementing these techniques in LiveCode. The attached files are a work in progress but I thought it promising enough to share. The .zip file unpacks to a folder containing the NLP Demo stack and a word list text file. The stack is designed to first look for this word list file in the same directory, if it is not found then a standard file dialogue box opens so you can select the word list file you want. Finally, if neither of these options are available the stack defaults to a more abbreviated word list hard coded in the card script.

My next plan is to create a simple chatbot or very, very short adventure game to illustrate the use of these techniques.

[attachment=0]NLP Techniques in LiveCode ƒ.zip[/attachment]

Happy coding,
Mike
Attachments
NLP Techniques in LiveCode ƒ.zip
(13.61 KiB) Downloaded 347 times

Hutchboy
Posts: 108
Joined: Wed Aug 01, 2018 2:57 pm
Contact:

Re: Natural Language Processing Techniques

Post by Hutchboy » Wed Jul 17, 2024 6:48 pm

Hello again,

Attached is a "Wellness" chatbot designed around the NLP techniques I uploaded previously. This works "fairly" well for what it is intended to be...a template you can explore and modify. I think next steps for this chatbot will be to add the ability to load a custom dictionary and reduce the reliance on hardcoding.

I think an Adventure game might be somewhat simpler because the amount of words that need to be understood by the program is probably more manageable...that is obviously my next project and to see how the NLP techniques work in that kind of environment.

BTW...I am using Claude 3.5 Sonnet as my AI assistant now, at least until there are improvements in ChatGPT 4o.

[attachment=0]Dr. Feelgood_A Wellness Chatbot ƒ.zip[/attachment]

Happy coding,
Mike
Attachments
Dr. Feelgood_A Wellness Chatbot ƒ.zip
(17.61 KiB) Downloaded 351 times

stam
Posts: 3061
Joined: Sun Jun 04, 2006 9:39 pm

Re: Natural Language Processing Techniques

Post by stam » Thu Jul 18, 2024 1:12 am

That's really interesting Mike, thank you for sharing...
will definitely tinker when I have time!

Post Reply