Show / Hide Table of Contents

    Class PhoneticEngine

    Converts words into potential phonetic representations.

    Inheritance
    System.Object
    PhoneticEngine
    Namespace: Lucene.Net.Analysis.Phonetic.Language.Bm
    Assembly: Lucene.Net.Analysis.Phonetic.dll
    Syntax
    public class PhoneticEngine : object
    Remarks

    This is a two-stage process. Firstly, the word is converted into a phonetic representation that takes into account the likely source language. Next, this phonetic representation is converted into a pan-European 'average' representation, allowing comparison between different versions of essentially the same word from different languages.

    This class is intentionally immutable and thread-safe. If you wish to alter the settings for a PhoneticEngine, you must make a new one with the updated settings.

    Ported from phoneticengine.php

    since 1.6

    Constructors

    | Improve this Doc View Source

    PhoneticEngine(NameType, RuleType, Boolean)

    Generates a new, fully-configured phonetic engine.

    Declaration
    public PhoneticEngine(NameType nameType, RuleType ruleType, bool concat)
    Parameters
    Type Name Description
    NameType nameType

    The type of names it will use.

    RuleType ruleType

    The type of rules it will apply.

    System.Boolean concat

    If it will concatenate multiple encodings.

    | Improve this Doc View Source

    PhoneticEngine(NameType, RuleType, Boolean, Int32)

    Generates a new, fully-configured phonetic engine.

    since 1.7

    Declaration
    public PhoneticEngine(NameType nameType, RuleType ruleType, bool concat, int maxPhonemes)
    Parameters
    Type Name Description
    NameType nameType

    The type of names it will use.

    RuleType ruleType

    The type of rules it will apply.

    System.Boolean concat

    If it will concatenate multiple encodings.

    System.Int32 maxPhonemes

    The maximum number of phonemes that will be handled.

    Properties

    | Improve this Doc View Source

    IsConcat

    Gets if multiple phonetic encodings are concatenated or if just the first one is kept. Returns true if multiple phonetic encodings are returned, false if just the first is.

    Declaration
    public virtual bool IsConcat { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    Lang

    Gets the Lang language guessing rules being used.

    Declaration
    public virtual Lang Lang { get; }
    Property Value
    Type Description
    Lang
    | Improve this Doc View Source

    MaxPhonemes

    Gets the maximum number of phonemes the engine will calculate for a given input.

    since 1.7

    Declaration
    public virtual int MaxPhonemes { get; }
    Property Value
    Type Description
    System.Int32
    | Improve this Doc View Source

    NameType

    Gets the NameType being used.

    Declaration
    public virtual NameType NameType { get; }
    Property Value
    Type Description
    NameType
    | Improve this Doc View Source

    RuleType

    Gets the RuleType being used.

    Declaration
    public virtual RuleType RuleType { get; }
    Property Value
    Type Description
    RuleType

    Methods

    | Improve this Doc View Source

    Encode(String)

    Encodes a string to its phonetic representation.

    Declaration
    public virtual string Encode(string input)
    Parameters
    Type Name Description
    System.String input

    The string to encode.

    Returns
    Type Description
    System.String

    The encoding of the input.

    | Improve this Doc View Source

    Encode(String, LanguageSet)

    Encodes an input string into an output phonetic representation, given a set of possible origin languages.

    Declaration
    public virtual string Encode(string input, LanguageSet languageSet)
    Parameters
    Type Name Description
    System.String input

    String to phoneticise; a string with dashes or spaces separating each word.

    LanguageSet languageSet
    Returns
    Type Description
    System.String

    A phonetic representation of the input; a string containing '-'-separated phonetic representations of the input.

    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)