Re: NSSpellChecker crashes after 64k words
Re: NSSpellChecker crashes after 64k words
- Subject: Re: NSSpellChecker crashes after 64k words
- From: Denis Stanton <email@hidden>
- Date: Tue, 12 Apr 2005 20:47:41 +1200
Hi Dan
On 12/04/2005, at 4:22 AM, Dan Saul wrote:
Perhaps splitting the string into multiple strings to be checked,
split every 63K words.
Thanks for helping.
If fact my little program is splitting it up much more than that. I'm checking one word at a time. I do this to find the good words out of over a million possible letter combinations. Each word is checked by itself with a call to checkSpellingOfString.
My problem is the spellingChecker apparently remembers all the words it has checked for as long as the application runs.
I have worked through the list of three-segment combinations by repeatedly changing the loop bounds, building and running. Each compilation covers 118 * 118 * 4 = 55696 so it doesn't hit the barrier. I then cut and paste all the sets of results into one document.
This is a crude way to get the result. What I'm looking for is a way to reset the 'reject word" counter without quitting the program. The NSSpellingChecker doesn't appear to allow me to do this.
Of course no sensible author would produce a document with over 64k of 'spelling errors'. That just happens to be what I need for this task.
Denis
On Apr 10, 2005 7:35 PM, Denis Stanton <email@hidden> wrote:
Hi
I have written a little program to solve a word puzzle. The program
puts together possible words by appending permutations of supplied
letters and syllables.
To determine whether the resulting string is a valid word I and using
NSSpellChecker
NSRange wordRange = [spellChecker checkSpellingOfString: string
startingAt: 0];
if (wordRange.length == 0) {
NSlog([NSString stringWithFormat: @" %@ is a word", string]);
}
The problem is my program fails with
Executable "MyApp" has exited due to signal 10 (SIGBUS).
after checking about 64,000 words. I guess it's hitting 64k (65,536)
and this is some magic limit in NSSpellChecker.
Does anybody know how to reset whatever counter is causing
NSSpellChecker to give up?
I thought at first it was accumulating a large ignored words list, so I
added closeSpellDocumentWithTag but that didn't help, and I see that
the ignored word list count is zero so that's not it.
Denis
Denis Stanton
Orcon Internet Limited
(09) 480 9299
http://www.orcon.net.nz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
Denis Stanton
email@hidden
Home: (09) 533 0391
mobile: 021 1433622
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden