macg-gh / madlibs

A little game that runs on a LAMP stack
0 stars 0 forks source link

Maybe use a dictionary? #26

Open ccarrster opened 4 years ago

macg-gh commented 4 years ago

I see, that would eliminate a user entering a phrase at all. Possibly that could look something like this?

image

A means to add a word to the dictionary might be good too, for slang and/or people's names.

macg-gh commented 4 years ago

On a new LAMP droplet, I was able to do the following:

apt update apt upgrade - install package maintainer’s version when prompted apt install g++ apt install aspell apt install php7.2-pspell

php -a $psspell_link= pspell_new_personal ("/var/dictionaries/custom.pws","en","","","",PSPELL_FAST|PSPELL_RUN_TOGETHER );

This did not emit "Uncaught Error: Call to undefined function pspell_new_personal() in php shell code" like it did previously. I hadn't made this custom dictionary yet on this droplet. A custom dictionary isn't a requirement, and if it was, the first step could be to get this working without it.

macg-gh commented 4 years ago

In the 'splitup' branch I now have a dictionary check against the words being entered. The next goal for dictionary use is to get suggestions for words, and adding words to it that are not there already.