Friday, 27 December 2013
Run Visual Studio under Admin always
Of course you can set "Microsoft Visual Studio 2010" link properties in the Start menu, but it doesn't suffice if you want to open your sln-files from Explorer in Admin mode. So set Admin rights for c:\Program Files (x86)\Common Files\microsoft shared\MSENV\VSLauncher.exe. If you don't do this, you will get something like "do you want to save changes to devenv.sln?" after opening the solution.
Tuesday, 3 December 2013
Use HunSpell in .NET and speed it up
To use HunSpell for Russian.
1) Take a demo-archive from NHunSpell.
2) Take AOT-based dictionary from LibreOffice. Open oxt-file with 7zip, take .dic and .aff files.
3) Load them in CSharpConsoleSample program, use the demo to test.
4) Update to latest DLLs.
The speed of the solution is acceptable in context suggesters, but not in search applications. HunSpell provides rich lists of variants, while we need short, precise lists. To achieve it, deactivate ngram-based suggesting by editing aff-file: add
MAXNGRAMSUGS 0
after
SET KOI8-R
This increases the speed dramatically (from 2 secs to several msecs for the list of 5 misspelled words), but you can get empty lists on some nontrivial typos.
1) Take a demo-archive from NHunSpell.
2) Take AOT-based dictionary from LibreOffice. Open oxt-file with 7zip, take .dic and .aff files.
3) Load them in CSharpConsoleSample program, use the demo to test.
4) Update to latest DLLs.
The speed of the solution is acceptable in context suggesters, but not in search applications. HunSpell provides rich lists of variants, while we need short, precise lists. To achieve it, deactivate ngram-based suggesting by editing aff-file: add
MAXNGRAMSUGS 0
after
SET KOI8-R
This increases the speed dramatically (from 2 secs to several msecs for the list of 5 misspelled words), but you can get empty lists on some nontrivial typos.
Subscribe to:
Posts (Atom)