TX Spell .NET for WPF

What's New in TX Spell .NET for WPF 5.0

Topic

A text without language information, such as plain text or a pasted web page, can't be checked with the right dictionaries until its languages are known. TX Spell .NET for WPF 5.0 closes that gap with language detection: it finds the languages of a text and the sections each of them covers.

Version 5.0 was released on September 10, 2014, together with TX Text Control X11 (version 21.0), as the blog article TX Text Control X11 Released: Cross-browser Template Editing announced. Language detection is its only new feature. The version before it is Version 4.0, the next one Version 6.0.

Version 5.0 at a Glance

AreaWhat is new
Language detectionDetectLanguageScopes on TXSpellChecker and TXSpell
ResultsLanguageScope and LanguageScopeCollection
SettingsDetectableLanguageScopes, the languages that are looked for

Language Detection

DetectLanguageScopes detects the languages of a string, which can hold a whole document, and fills LanguageScopes with the results. A language scope is a section of the text written in one language. The method has these properties:

  • More than 30 languages. The detection recognizes more than 30 languages.
  • Short samples. One sentence of four or more words is enough to detect its language.
  • Nested and mixed text. Scopes can be nested, such as a phrase in brackets in another language, and bidirectional text that mixes right-to-left and left-to-right languages is split into its languages.
  • Low cost. Detection needs few resources and returns its results quickly.

Once the languages are known, you can add the matching dictionaries or hyphenation lists. The TXSpell class, for code without a user interface, has the same members: DetectLanguageScopes, LanguageScopes and DetectableLanguageScopes.

The Detected Scopes

LanguageScopes is a LanguageScopeCollection. Each LanguageScope in it describes one section of the text:

PropertyHolds
StartThe zero-based position of the first character of the scope
LengthThe length of the scope
LanguageThe detected language as a CultureInfo, or null when no language was detected
IndexThe position of the scope in the collection, starting at 0

The Languages That Are Detected

DetectableLanguageScopes is an array of CultureInfo objects: the languages that DetectLanguageScopes looks for. By default, it holds Arabic, German, English, Spanish, French, Portuguese and Russian, the languages among the ten most spoken native languages that TX Spell .NET supports. Set it to the languages your users write in.

Language Detection shows the detection in TX Text Control and in code, and Multilingual Documents and Language Scopes explains how the detected languages choose the dictionaries.

Service Packs

The download package holds one service pack setup of version 5.0, TX Spell .NET for WPF 5.0 SP1.exe, and the full version setup TX Spell .NET for WPF 5.0.exe. Both files are dated October 28, 2014, the date of the setup files.

New Classes, Properties, Methods and Events

The classes and members below are the ones that the What's New documentation of version 5.0 lists for TX Spell .NET for WPF. Names are relative to the TXTextControl namespace, and each name links to its current reference page.

New Classes

Members by Class

Next Steps