You are not logged in. You can browse in the PowerBASIC Community, but you must click Login (top right) before you can post. If this is your first visit, check out the FAQ or Sign Up.
the File Range Trie DB is a Key/Value, String/String database
it is capable of finding 100,000 string Keys in 0.01599 seconds
you would have to add the dictionary words
there are dictionary list around
I did something much more gruesome for Textris, an old game I wrote that was a combination of Tetris and Scrabble. If I recall correctly, for the dictionary, I used the first 2-3 characters directly as array indices, which made a pointer to the first entry in the matching list. Any following words were checked, one by one, to see if they also matched.
Very crude, but fast enough, and it was sufficient.
There are more than a few versions of Textris out there, these days. Some of them derive from my work, in one way or another... if you like word games, Google.
A while back John G and I worked a "Word Connection" puzzle solver using a file of 100k+ words. It found all possible connections between two words in 10ths of a second. You may find it useful to see how it was done using an ascii hash total for each word.
Also have a multi featured utility program I use frequently (several times a day) that checks spelling by checking the word in the clipboard using the same word file. It finds all spelling variations of a word instantly (effectively).
' The files are here: http://www.SwedesDock.com/powerbasic/Z-Post.exe (note - Spell check and some other routines will not run w/o associated files but you can see format. Click through several error mags until getting to z-post main screen.)
(The bas & exe are current but the zip is not but relevant files other than those two are).
======================================
Politics, n.
Interests masquerading as principles.
Ambrose Bierce (1842-1914)
======================================
I'm pretty sure I downloaded a DLL called PBSpell a long time ago. I can't remember where I got it but it looked to be okay.
The only thing I found doing a google search is some Phoenix forum messages that mention using PBSpell as a sample for how to include you own DECLAREs in a project.
The checker would need to have all forms of the word in but should differentiate between plurals and singular forms. I would not want to get a positive response for proper nouns.
And ideally, it would be nice to be able to quote what authority I had for the answers.
Any suggestions on where I should investigate?
Thanks
There are some free dictionary files that you can download and roll your own check against one or more of these files.
I am trying to find a spelling checker to use from within a PB program.
Essentially I want to say "Is word 'xxx' spelled correctly?" and be told yes or no.
In fact, when I think about it, what I really want to know is "Does word 'xxx' exist or not?" Which really amounts to the same thing I suppose.
It is part of developing a word puzzle so it would be nice but not critical if it was quite quick. And again, nice but not critical, if I could choose US or UK spelling. I am only interested in English - at this stage anyway.
The checker would need to have all forms of the word in but should differentiate between plurals and singular forms. I would not want to get a positive response for proper nouns.
And ideally, it would be nice to be able to quote what authority I had for the answers.
We process personal data about users of our site, through the use of cookies and other technologies, to deliver our services, and to analyze site activity. For additional details, refer to our Privacy Policy.
By clicking "I AGREE" below, you agree to our Privacy Policy and our personal data processing and cookie practices as described therein. You also acknowledge that this forum may be hosted outside your country and you consent to the collection, storage, and processing of your data in the country where this forum is hosted.
Leave a comment: