Lucene.Net  3.0.3
Lucene.Net is a .NET port of the Java Lucene Indexing Library
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Properties
Public Member Functions | List of all members
SpellChecker.Net.Search.Spell.NGramDistance Class Reference

Inherits SpellChecker.Net.Search.Spell.StringDistance.

Public Member Functions

 NGramDistance (int size)
 Creates an N-Gram distance measure using n-grams of the specified size.
 
 NGramDistance ()
 Creates an N-Gram distance measure using n-grams of size 2.
 
float GetDistance (String source, String target)
 Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 1 means the specified strings are identical and 0 means the string are maximally different.
 

Detailed Description

Definition at line 25 of file NGramDistance.cs.

Constructor & Destructor Documentation

SpellChecker.Net.Search.Spell.NGramDistance.NGramDistance ( int  size)

Creates an N-Gram distance measure using n-grams of the specified size.

Parameters
sizeThe size of the n-gram to be used to compute the string distance.

Definition at line 33 of file NGramDistance.cs.

SpellChecker.Net.Search.Spell.NGramDistance.NGramDistance ( )

Creates an N-Gram distance measure using n-grams of size 2.

Definition at line 41 of file NGramDistance.cs.

Member Function Documentation

float SpellChecker.Net.Search.Spell.NGramDistance.GetDistance ( String  s1,
String  s2 
)

Returns a float between 0 and 1 based on how similar the specified strings are to one another. Returning a value of 1 means the specified strings are identical and 0 means the string are maximally different.

Parameters
s1The first string.
s2The second string.
Returns
a float between 0 and 1 based on how similar the specified strings are to one another.

Implements SpellChecker.Net.Search.Spell.StringDistance.

Definition at line 46 of file NGramDistance.cs.


The documentation for this class was generated from the following file: