Search Results for

    Show / Hide Table of Contents

    Class WordCounter

    Provides WordCounts for a set of tokens, where necessary converting TokenType.Word tokens for JA/ZH et al back to TokenType.CharSequence to produce 'legacy' results. When creating word counts for multiple segments, use a single WordCounter object and call GetWordCountsAsync(IList<Token>, WordCountsOptions, CultureCode) repeatedly, to avoid repeated tokenizer creation in those cases.

    Inheritance
    object
    WordCounter
    Inherited Members
    object.ToString()
    object.Equals(object)
    object.Equals(object, object)
    object.ReferenceEquals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    Namespace: Sdl.LanguagePlatform.TranslationMemory
    Assembly: Sdl.LanguagePlatform.TranslationMemory.dll
    Syntax
    public class WordCounter

    Methods

    CreateAsync(ICultureMetadataManager)

    Creates the WordCounter

    Declaration
    public static Task<WordCounter> CreateAsync(ICultureMetadataManager cultureMetadataManager)
    Parameters
    Type Name Description
    ICultureMetadataManager cultureMetadataManager
    Returns
    Type Description
    Task<WordCounter>

    GetWordCountsAsync(IList<Token>, WordCountsOptions, CultureCode)

    Produce a WordCounts from the specified tokens

    Declaration
    public Task<WordCounts> GetWordCountsAsync(IList<Token> tokens, WordCountsOptions options, CultureCode cultureCode)
    Parameters
    Type Name Description
    IList<Token> tokens

    The tokens to analyze

    WordCountsOptions options

    The WordCountsOptions to apply

    CultureCode cultureCode
    Returns
    Type Description
    Task<WordCounts>
    In this article
    • Methods
      • CreateAsync(ICultureMetadataManager)
      • GetWordCountsAsync(IList<Token>, WordCountsOptions, CultureCode)
    Back to top Generated by DocFX