TX Spell .NET for Windows Forms

What's New in TX Spell .NET for Windows Forms 4.0

Topic

Hyphenation came to TX Spell .NET for Windows Forms with version 4.0, and with it the ability to work with several languages at once: checking and suggestions for one given language, dictionaries of right-to-left languages, and a dictionary store small and fast enough to keep many dictionaries loaded side by side.

Version 4.0 was released on November 20, 2013, together with TX Text Control X10 (version 20.0), as the blog article TX Text Control X10, TX Spell 4.0 and TX Barcode 3.0 Have Been Released announced. The features below are the ones added since Version 3.0; Version 5.0 followed in September 2014.

Version 4.0 at a Glance

AreaWhat is new
HyphenationHunspell hyphenation lists, GetHyphenationPoint and GetHyphenationPoints, the classes HyphenationList and HyphenationListCollection
LanguagesChecking and suggestions for a given language, dictionaries of right-to-left languages
DictionariesCompressed storage in memory, asynchronous loading, LoadDictionaryDelayed
Service packsService Pack 1 in December 2013, Service Pack 2 in March 2014 and Service Pack 3 in November 2014

Hyphenation

TX Spell .NET 4.0 hyphenates words with the hyphenation lists of the Hunspell project, the same open source project whose dictionaries it uses for spell checking. A HyphenationList holds the rules of one language:

  • Two methods. GetHyphenationPoint returns the hyphenation point of a word that comes closest before a given divide position, and GetHyphenationPoints returns all hyphenation points of a word.
  • Which list is used. Without a language, GetHyphenationPoint uses the default hyphenation list, the one that HyphenationLanguage selects. With a language, both methods take a list of that language from HyphenationLists or from the default hyphenation lists folder.
  • Adding lists. A list is added to HyphenationLists with Add, or selected from the default folder by setting HyphenationLanguage. AvailableHyphenationLists lists the lists of that folder.
  • Settings per list. Properties such as MinCharsAtWordBegin, HyphenateCapitalizedWords and UseOnlyCompoundHyphenationPoints change where a word may be divided.

TX Text Control X10 used the hyphenation lists for its automatic hyphenation at the end of a line. With a TXSpellChecker connected and hyphenation switched on, a TextControl divides words at line ends, and a HyphenationLanguage of (Auto) picks the list by the language at the input position. The blog article Adding Spell Checking and Hyphenation to TX Text Control X10 walks through that setup. With the release, Text Control also published tested dictionaries and hyphenation lists for many languages, as the article TX Spell .NET 4.0: New Dictionaries and Hyphenation Lists Available announced.

The What's New documentation of version 4.0 names a property TXSpellChecker.Hyphenation for the default list. No such property exists; the default list is set with HyphenationLanguage. It also lists a Remove method of HyphenationListCollection, which the reference still documents but the assemblies of version 11.0 don't have. Hyphenation describes hyphenation as it works today, and Hyphenation Lists the lists and their settings.

Languages

  • Checking in one language. New overloads of Check and CreateSuggestions take a language. They check a text, or create suggestions, with all dictionaries of that language. Multilingual Documents and Language Scopes shows them.
  • Right-to-left languages. Dictionaries of languages written from right to left, such as Arabic, Farsi, Hebrew and Urdu, are supported. See Right-to-Left Languages.
  • Dictionaries by the language of the text. Together with TX Text Control X10, which gave text a language of its own, the spell checker loads the dictionary that matches the language at the input position. The blog article Loading Dictionaries Dynamically in TX Spell .NET describes this.

Dictionary Memory and Loading

Checking and hyphenating several languages at once means many dictionaries in memory at the same time. Version 4.0 prepared for that in two ways:

  • Compressed storage. Loaded dictionaries are kept in memory in a more compact, compressed form, which lowers the memory footprint and leaves room for more dictionaries at once.
  • Asynchronous loading. Dictionaries are loaded asynchronously, which shortens the initialization of the spell checker.
  • Checking while loading. With LoadDictionaryDelayed of the DictionaryCollection set to true, a dictionary is loaded partially when it is added, and text can be checked while the rest is still loading. Loading and Managing Dictionaries describes the property and what it costs.

Service Packs

Service packReleasedSetup
Service Pack 1December 17, 2013TX Spell .NET for Windows Forms 4.0 SP1.exe
Service Pack 2March 10, 2014TX Spell .NET for Windows Forms 4.0 SP2.exe
Service Pack 3November 5, 2014TX Spell .NET for Windows Forms 4.0 SP3.exe

The blog articles Service Packs for TX Text Control X10 and X9 Released, Service Pack 2 for TX Spell .NET 4.0 Released and Service Pack 1 Released for TX Text Control X11 announced them. The setups in the download package are dated December 11, 2013, March 7, 2014, and October 28, 2014, a few days before each announcement. The full installer of version 4.0, TX Spell .NET for Windows Forms 4.0.exe, carries the date of Service Pack 2.

New Classes, Properties, Methods and Events

These are the classes and members that the What's New documentation of version 4.0 lists, without HyphenationListCollection.Remove. All names are relative to the TXTextControl.Proofing namespace, and each links to its current reference page.

New Classes

Members by Class

Next Steps

  • Version 5.0: the version that followed, with language detection.
  • Version 3.0: the version before, with the new suggestion engine and the spell check dialog.
  • Hyphenation: hyphenation in today's version.
  • Older Versions: all versions from 3.0 to 6.0.