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
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
Statistics: Posted by Hutchboy — Wed Jul 17, 2024 3:29 am