| WordCounts Constructor (IListToken, Boolean, Boolean, Boolean, Boolean) |
Initializes a new instance from the values in the provided token collection.
- Word and abbreviation tokens increment the character count by the length of the
token text and increment the word count by one,
- Char sequence tokens (used in far-east tokenization) increment the word and character
count by the length of the token text,
- Punctuation tokens only increment the character count, by the length of the token text,
- Date, time, variable, number, measurement, acronym, uri, and other text placeable tokens
increment the word and character count like words do, but also increment the placeables count,
- Tag tokens increment the tag and placeable counts, but not the word or character counts,
- Whitespace tokens do not increment any counts (even not the character count),
- All other token types do not increment any counts.
- The segment count is set to 1, independent on the number and type of the tokens.
Namespace: Sdl.LanguagePlatform.TranslationMemoryAssembly: Sdl.LanguagePlatform.TranslationMemory (in Sdl.LanguagePlatform.TranslationMemory.dll) Version: 1.6.0.0 (1.7.3662.0)
Syntaxpublic WordCounts(
IList<Token> tokens,
bool BreakOnHyphen,
bool BreakOnDash,
bool BreakOnTag,
bool breakOnApostrophe
)
Public Sub New (
tokens As IList(Of Token),
BreakOnHyphen As Boolean,
BreakOnDash As Boolean,
BreakOnTag As Boolean,
breakOnApostrophe As Boolean
)
public:
WordCounts(
IList<Token^>^ tokens,
bool BreakOnHyphen,
bool BreakOnDash,
bool BreakOnTag,
bool breakOnApostrophe
)
new :
tokens : IList<Token> *
BreakOnHyphen : bool *
BreakOnDash : bool *
BreakOnTag : bool *
breakOnApostrophe : bool -> WordCountsParameters
- tokens
- Type: System.Collections.GenericIListToken
The token collection - BreakOnHyphen
- Type: SystemBoolean
If false, 2 words separated by a hyphen count as 1 - BreakOnDash
- Type: SystemBoolean
If false, 2 words separated by a dash count as 1 - BreakOnTag
- Type: SystemBoolean
If false, 2 words separated by a formatting tag count as 1 - breakOnApostrophe
- Type: SystemBoolean
If false, 2 words separated by an apostrophe count as 1
See Also
Comments