-
Notifications
You must be signed in to change notification settings - Fork 311
-
|
Thanks for the library, very useful. So far it seems to be much better than NetSpell and hunspell and aspell , which is impressive for such a small code base. It would be good to have capitals in the dictionaries; it's useful for recognizing proper words. Also if I'm only reading from the dictionary, doing lookups etc, is it thread safe? I wouldn't expect it to be while entering data into the dictionary, but if I'm just reading can I use one dictionary from multiple threads? Cheers, |
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
|
Capitals
But I'm open to any suggestion solving the problems mentioned above consistently. Threads But if you want to incrementally update your dictionary with CreateDictionaryEntry, then both Lookup and CreateDictionaryEntry have to be synchronized by locks. While you could use a simple Lock(), a ReaderWriterLockSlim ensures better performance, because it still allows multiple Lookups in parallel: |
Beta Was this translation helpful? Give feedback.
All reactions
-
|
Hmm.. I was thinking more along the lines of places and people, where if you looked it up in a dictionary it would be capitalized. Are you saying there's no reason the current system can't do these it's just about the dictionary? Thanks for the info on locking. I've got a dictionary shared among 8 cores and all 8 go 100%, and I can spellcheck a database of 1.3M words in a couple of minutes whereas before I had to leave it for a couple of hours, and with multiple languages and a couple of domain specific dictionaries added in, so it's scaling and performing very nicely indeed. |
Beta Was this translation helpful? Give feedback.