Class PhoneticEngine
Converts words into potential phonetic representations.
Inherited Members
Namespace: Lucene.Net.Analysis.Phonetic.Language.Bm
Assembly: Lucene.Net.Analysis.Phonetic.dll
Syntax
public class PhoneticEngine
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.6Constructors
PhoneticEngine(NameType, RuleType, bool)
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. |
bool | concat | If it will concatenate multiple encodings. |
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.6PhoneticEngine(NameType, RuleType, bool, int)
Generates a new, fully-configured phonetic engine.
since 1.7Declaration
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. |
bool | concat | If it will concatenate multiple encodings. |
int | maxPhonemes | The maximum number of phonemes that will be handled. |
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.6Properties
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 |
---|---|
bool |
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.6Lang
Gets the Lang language guessing rules being used.
Declaration
public virtual Lang Lang { get; }
Property Value
Type | Description |
---|---|
Lang |
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.6MaxPhonemes
Gets the maximum number of phonemes the engine will calculate for a given input.
since 1.7Declaration
public virtual int MaxPhonemes { get; }
Property Value
Type | Description |
---|---|
int |
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.6NameType
Gets the NameType being used.
Declaration
public virtual NameType NameType { get; }
Property Value
Type | Description |
---|---|
NameType |
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.6RuleType
Gets the RuleType being used.
Declaration
public virtual RuleType RuleType { get; }
Property Value
Type | Description |
---|---|
RuleType |
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.6Methods
Encode(string)
Encodes a string to its phonetic representation.
Declaration
public virtual string Encode(string input)
Parameters
Type | Name | Description |
---|---|---|
string | input | The string to encode. |
Returns
Type | Description |
---|---|
string | The encoding of the input. |
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.6Encode(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 |
---|---|---|
string | input | String to phoneticise; a string with dashes or spaces separating each word. |
LanguageSet | languageSet |
Returns
Type | Description |
---|---|
string | A phonetic representation of the input; a string containing '-'-separated phonetic representations of the input. |
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