Code archives/Miscellaneous/Find Rhyming Words
This code has been declared by its author to be Public Domain code.
Download source code
| |||||
Here's a little bit of code that allows the user to find some words that rhyme. This routine does NOT take into consideration words that have an odd rhyming syntax such as: EYE I MY PIE WEIGH WAY and similar and so you can add those yourself if you like. I have not checked this using a dictionary since I could not find one preferably with 3 million words and so let us all know if you can get 90 percent of the rhyming words without adding the code for the usage of the letter Y and other odd syntaxes. When someone can, post a link to a large, Large, LARGE, dictionary and when I mean LARGE, I mean that the .txt file is 12Meg alone. Have a good day. | |||||
Graphics 800,600,16,2:AppTitle"TEST" S$="LUCK":I$="TRUCK" V=Len(S$):W=Len(I$) SR=Len(S$):LI=Len(I$) If LI>2 And SR>2 If SR>=LI While LI>2 If Right$(S$,LI)=Right$(I$,LI) Text 50,50+(12*LI), I$:Exit LI=LI-1 Wend EndIf If SR<LI While SR>2 If Right$(S$,SR)=Right$(I$,SR) Text 150,50+(12*SR),I$:Exit SR=SR-1 Wend EndIf EndIf WaitKey:End |
Comments
None.
Code Archives Forum