blob: 76955e9339a943d1fad7dab9cde874970057795f [file] [log] [blame]
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.3"/>
<title>Lucene.Net: SpellChecker.Net.Search.Spell.SpellChecker Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td id="projectlogo"><img alt="Logo" src="lucene-net-icon-128x128.png"/></td>
<td style="padding-left: 0.5em;">
<div id="projectname">Lucene.Net
&#160;<span id="projectnumber">3.0.3</span>
</div>
<div id="projectbrief">Lucene.Net is a .NET port of the Java Lucene Indexing Library</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.3 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="Index.html"><span>Main&#160;Page</span></a></li>
<li><a href="namespaces.html"><span>Packages</span></a></li>
<li class="current"><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
<div id="navrow2" class="tabs2">
<ul class="tablist">
<li><a href="annotated.html"><span>Class&#160;List</span></a></li>
<li><a href="classes.html"><span>Class&#160;Index</span></a></li>
<li><a href="hierarchy.html"><span>Class&#160;Hierarchy</span></a></li>
<li><a href="functions.html"><span>Class&#160;Members</span></a></li>
</ul>
</div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Properties</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div id="nav-path" class="navpath">
<ul>
<li class="navelem"><a class="el" href="namespace_spell_checker.html">SpellChecker</a></li><li class="navelem"><a class="el" href="namespace_spell_checker_1_1_net.html">Net</a></li><li class="navelem"><a class="el" href="namespace_spell_checker_1_1_net_1_1_search.html">Search</a></li><li class="navelem"><a class="el" href="namespace_spell_checker_1_1_net_1_1_search_1_1_spell.html">Spell</a></li><li class="navelem"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a></li> </ul>
</div>
</div><!-- top -->
<div class="header">
<div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker-members.html">List of all members</a> </div>
<div class="headertitle">
<div class="title">SpellChecker.Net.Search.Spell.SpellChecker Class Reference</div> </div>
</div><!--header-->
<div class="contents">
<p>
<a href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#details">More...</a></p>
<p>Inherits IDisposable.</p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a3e159b093d52d5c2c0e52a69a45a8788"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a3e159b093d52d5c2c0e52a69a45a8788">SpellChecker</a> (<a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a> spellIndex, <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html">StringDistance</a> sd)</td></tr>
<tr class="memdesc:a3e159b093d52d5c2c0e52a69a45a8788"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the given directory as a spell checker index. The directory is created if it doesn't exist yet. <a href="#a3e159b093d52d5c2c0e52a69a45a8788"></a><br/></td></tr>
<tr class="separator:a3e159b093d52d5c2c0e52a69a45a8788"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ade65f6d15a5c79120e4b2ba3ba852ac4"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#ade65f6d15a5c79120e4b2ba3ba852ac4">SpellChecker</a> (<a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a> spellIndex)</td></tr>
<tr class="memdesc:ade65f6d15a5c79120e4b2ba3ba852ac4"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use the given directory as a spell checker index with a <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_levenshtein_distance.html" title="Levenshtein edit distance ">LevenshteinDistance</a> as the default <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a>. The directory is created if it doesn't exist yet. <a href="#ade65f6d15a5c79120e4b2ba3ba852ac4"></a><br/></td></tr>
<tr class="separator:ade65f6d15a5c79120e4b2ba3ba852ac4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93f8a3e3934b0d13256d3488df9a1122"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a93f8a3e3934b0d13256d3488df9a1122">SetSpellIndex</a> (<a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a> spellIndexDir)</td></tr>
<tr class="memdesc:a93f8a3e3934b0d13256d3488df9a1122"><td class="mdescLeft">&#160;</td><td class="mdescRight">Use a different index as the spell checker index or re-open the existing index if <code>spellIndex</code> is the same value as given in the constructor. <a href="#a93f8a3e3934b0d13256d3488df9a1122"></a><br/></td></tr>
<tr class="separator:a93f8a3e3934b0d13256d3488df9a1122"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa43c0910a7327826c9c9f9f1a954f6ae"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#aa43c0910a7327826c9c9f9f1a954f6ae">setStringDistance</a> (<a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html">StringDistance</a> sd)</td></tr>
<tr class="memdesc:aa43c0910a7327826c9c9f9f1a954f6ae"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> implementation for this <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> instance. <a href="#aa43c0910a7327826c9c9f9f1a954f6ae"></a><br/></td></tr>
<tr class="separator:aa43c0910a7327826c9c9f9f1a954f6ae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a02348f398b0e29578da9c813fd7a038c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html">StringDistance</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a02348f398b0e29578da9c813fd7a038c">GetStringDistance</a> ()</td></tr>
<tr class="memdesc:a02348f398b0e29578da9c813fd7a038c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> instance used by this <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> instance. <a href="#a02348f398b0e29578da9c813fd7a038c"></a><br/></td></tr>
<tr class="separator:a02348f398b0e29578da9c813fd7a038c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a9c26a0be74f2ae9134e968bd348c66f2"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a9c26a0be74f2ae9134e968bd348c66f2">SetAccuracy</a> (float minScore)</td></tr>
<tr class="memdesc:a9c26a0be74f2ae9134e968bd348c66f2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set the accuracy 0 &lt; min &lt; 1; default 0.5 <a href="#a9c26a0be74f2ae9134e968bd348c66f2"></a><br/></td></tr>
<tr class="separator:a9c26a0be74f2ae9134e968bd348c66f2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86ea0137d5c97b11224f5ac3b205d5c0"><td class="memItemLeft" align="right" valign="top">virtual System.String[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a86ea0137d5c97b11224f5ac3b205d5c0">SuggestSimilar</a> (System.String word, int num_sug)</td></tr>
<tr class="memdesc:a86ea0137d5c97b11224f5ac3b205d5c0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Suggest similar words <a href="#a86ea0137d5c97b11224f5ac3b205d5c0"></a><br/></td></tr>
<tr class="separator:a86ea0137d5c97b11224f5ac3b205d5c0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af85cca48c47713f855792833128d2d3f"><td class="memItemLeft" align="right" valign="top">virtual System.String[]&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#af85cca48c47713f855792833128d2d3f">SuggestSimilar</a> (System.String word, int numSug, <a class="el" href="namespace_spell_checker_1_1_net_1_1_search_1_1_spell.html#a2b2d16da8a4d1c2bd29999dd6b61d08a">IndexReader</a> ir, System.String field, bool morePopular)</td></tr>
<tr class="memdesc:af85cca48c47713f855792833128d2d3f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Suggest similar words (restricted or not to a field of a user index) <a href="#af85cca48c47713f855792833128d2d3f"></a><br/></td></tr>
<tr class="separator:af85cca48c47713f855792833128d2d3f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e85d0c914db887833abb72c73821240"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a1e85d0c914db887833abb72c73821240">ClearIndex</a> ()</td></tr>
<tr class="memdesc:a1e85d0c914db887833abb72c73821240"><td class="mdescLeft">&#160;</td><td class="mdescRight">Removes all terms from the spell check index. <a href="#a1e85d0c914db887833abb72c73821240"></a><br/></td></tr>
<tr class="separator:a1e85d0c914db887833abb72c73821240"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a70b00af11b81f02a3bf0afeaffe5f716"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a70b00af11b81f02a3bf0afeaffe5f716">Exist</a> (System.String word)</td></tr>
<tr class="memdesc:a70b00af11b81f02a3bf0afeaffe5f716"><td class="mdescLeft">&#160;</td><td class="mdescRight">Check whether the word exists in the index. <a href="#a70b00af11b81f02a3bf0afeaffe5f716"></a><br/></td></tr>
<tr class="separator:a70b00af11b81f02a3bf0afeaffe5f716"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aca9d275693eeabc94664bff686a6df15"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#aca9d275693eeabc94664bff686a6df15">IndexDictionary</a> (<a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_i_dictionary.html">IDictionary</a> dict, int mergeFactor, int ramMB)</td></tr>
<tr class="memdesc:aca9d275693eeabc94664bff686a6df15"><td class="mdescLeft">&#160;</td><td class="mdescRight">Index a Dictionary <a href="#aca9d275693eeabc94664bff686a6df15"></a><br/></td></tr>
<tr class="separator:aca9d275693eeabc94664bff686a6df15"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a55f6b9b1264d6325522ac845acc507"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a5a55f6b9b1264d6325522ac845acc507">IndexDictionary</a> (<a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_i_dictionary.html">IDictionary</a> dict)</td></tr>
<tr class="memdesc:a5a55f6b9b1264d6325522ac845acc507"><td class="mdescLeft">&#160;</td><td class="mdescRight">Indexes the data from the given <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_i_dictionary.html" title="A simple interface representing a Dictionary">IDictionary</a>. <a href="#a5a55f6b9b1264d6325522ac845acc507"></a><br/></td></tr>
<tr class="separator:a5a55f6b9b1264d6325522ac845acc507"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae5f753a1430e571f899b6b42bb70f8e4"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#ae5f753a1430e571f899b6b42bb70f8e4">Close</a> ()</td></tr>
<tr class="separator:ae5f753a1430e571f899b6b42bb70f8e4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a90378906f8af1a29b7db69d1701c1b73"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html">IndexSearcher</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a90378906f8af1a29b7db69d1701c1b73">CreateSearcher</a> (<a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a> dir)</td></tr>
<tr class="memdesc:a90378906f8af1a29b7db69d1701c1b73"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a new read-only IndexSearcher (for testing purposes) <a href="#a90378906f8af1a29b7db69d1701c1b73"></a><br/></td></tr>
<tr class="separator:a90378906f8af1a29b7db69d1701c1b73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a66b1d76a25d88dfd4e6df3b07cf2ed0c"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#a66b1d76a25d88dfd4e6df3b07cf2ed0c">Dispose</a> ()</td></tr>
<tr class="separator:a66b1d76a25d88dfd4e6df3b07cf2ed0c"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:ae60f8d8a28c0371b0fa1bd5a16cb6903"><td class="memItemLeft" align="right" valign="top">const System.String&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#ae60f8d8a28c0371b0fa1bd5a16cb6903">F_WORD</a> = &quot;word&quot;</td></tr>
<tr class="memdesc:ae60f8d8a28c0371b0fa1bd5a16cb6903"><td class="mdescLeft">&#160;</td><td class="mdescRight">Field name for each word in the ngram index. <a href="#ae60f8d8a28c0371b0fa1bd5a16cb6903"></a><br/></td></tr>
<tr class="separator:ae60f8d8a28c0371b0fa1bd5a16cb6903"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aeed5773dc79f239fb5d28e0cdd703802"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html#aeed5773dc79f239fb5d28e0cdd703802">Dispose</a> (bool disposeOfManagedResources)</td></tr>
<tr class="separator:aeed5773dc79f239fb5d28e0cdd703802"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p><a class="el" href="namespace_spell_checker_1_1_net_1_1_search_1_1_spell.html">Spell</a> Checker class (Main class) <br/>
(initially inspired by the David Spencer code). </p>
<p>Example Usage:</p>
<pre>
<a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> spellchecker = new SpellChecker(spellIndexDirectory);
// To index a field of a user index:
spellchecker.indexDictionary(new LuceneDictionary(my_lucene_reader, a_field));
// To index a file containing words:
spellchecker.indexDictionary(new <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_plain_text_dictionary.html" title="Dictionary represented by a file text. Format allowed: 1 word per line: word1 word2 word3 ...">PlainTextDictionary</a>(new File("myfile.txt")));
String[] suggestions = spellchecker.suggestSimilar("misspelt", 5);
</pre><p>&lt;author&gt; Nicolas Maisonneuve &lt;/author&gt; &lt;version&gt; 1.0 &lt;/version&gt; </p>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00062">62</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="a3e159b093d52d5c2c0e52a69a45a8788"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SpellChecker.Net.Search.Spell.SpellChecker.SpellChecker </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a>&#160;</td>
<td class="paramname"><em>spellIndex</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html">StringDistance</a>&#160;</td>
<td class="paramname"><em>sd</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Use the given directory as a spell checker index. The directory is created if it doesn't exist yet. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">spellIndex</td><td>the spell index directory</td></tr>
<tr><td class="paramname">sd</td><td>the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> measurement to use </td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00102">102</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ade65f6d15a5c79120e4b2ba3ba852ac4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">SpellChecker.Net.Search.Spell.SpellChecker.SpellChecker </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a>&#160;</td>
<td class="paramname"><em>spellIndex</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Use the given directory as a spell checker index with a <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_levenshtein_distance.html" title="Levenshtein edit distance ">LevenshteinDistance</a> as the default <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a>. The directory is created if it doesn't exist yet. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">spellIndex</td><td>the spell index directory</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00114">114</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a class="anchor" id="a1e85d0c914db887833abb72c73821240"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SpellChecker.Net.Search.Spell.SpellChecker.ClearIndex </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Removes all terms from the spell check index. </p>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00357">357</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="ae5f753a1430e571f899b6b42bb70f8e4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SpellChecker.Net.Search.Spell.SpellChecker.Close </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00533">533</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a90378906f8af1a29b7db69d1701c1b73"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual <a class="el" href="class_lucene_1_1_net_1_1_search_1_1_index_searcher.html">IndexSearcher</a> SpellChecker.Net.Search.Spell.SpellChecker.CreateSearcher </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a>&#160;</td>
<td class="paramname"><em>dir</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Creates a new read-only IndexSearcher (for testing purposes) </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">dir</td><td>dir the directory used to open the searcher</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>a new read-only IndexSearcher. (throws IOException f there is a low-level IO error)</dd></dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00577">577</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a66b1d76a25d88dfd4e6df3b07cf2ed0c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SpellChecker.Net.Search.Spell.SpellChecker.Dispose </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00599">599</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aeed5773dc79f239fb5d28e0cdd703802"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">void SpellChecker.Net.Search.Spell.SpellChecker.Dispose </td>
<td>(</td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>disposeOfManagedResources</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">protected</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00605">605</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a70b00af11b81f02a3bf0afeaffe5f716"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual bool SpellChecker.Net.Search.Spell.SpellChecker.Exist </td>
<td>(</td>
<td class="paramtype">System.String&#160;</td>
<td class="paramname"><em>word</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Check whether the word exists in the index.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">word</td><td>String </td></tr>
</table>
</dd>
</dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<dl class="section return"><dt>Returns</dt><dd>true iff the word exists in the index </dd></dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00376">376</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a02348f398b0e29578da9c813fd7a038c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html">StringDistance</a> SpellChecker.Net.Search.Spell.SpellChecker.GetStringDistance </td>
<td>(</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> instance used by this <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> instance. </p>
<dl class="section return"><dt>Returns</dt><dd>Returns the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> instance used by this <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> instance. </dd></dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00162">162</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aca9d275693eeabc94664bff686a6df15"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SpellChecker.Net.Search.Spell.SpellChecker.IndexDictionary </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_i_dictionary.html">IDictionary</a>&#160;</td>
<td class="paramname"><em>dict</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>mergeFactor</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>ramMB</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Index a Dictionary</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">dict</td><td>the dictionary to index</td></tr>
<tr><td class="paramname">mergeFactor</td><td>mergeFactor to use when indexing</td></tr>
<tr><td class="paramname">ramMB</td><td>the max amount or memory in MB to use</td></tr>
</table>
</dd>
</dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; &lt;throws&gt;AlreadyClosedException if the Spellchecker is already closed&lt;/throws&gt; </p>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00397">397</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a5a55f6b9b1264d6325522ac845acc507"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SpellChecker.Net.Search.Spell.SpellChecker.IndexDictionary </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_i_dictionary.html">IDictionary</a>&#160;</td>
<td class="paramname"><em>dict</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Indexes the data from the given <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_i_dictionary.html" title="A simple interface representing a Dictionary">IDictionary</a>. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">dict</td><td>dict the dictionary to index</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00441">441</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a9c26a0be74f2ae9134e968bd348c66f2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SpellChecker.Net.Search.Spell.SpellChecker.SetAccuracy </td>
<td>(</td>
<td class="paramtype">float&#160;</td>
<td class="paramname"><em>minScore</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Set the accuracy 0 &lt; min &lt; 1; default 0.5</p>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00169">169</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a93f8a3e3934b0d13256d3488df9a1122"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual void SpellChecker.Net.Search.Spell.SpellChecker.SetSpellIndex </td>
<td>(</td>
<td class="paramtype"><a class="el" href="class_lucene_1_1_net_1_1_store_1_1_directory.html">Directory</a>&#160;</td>
<td class="paramname"><em>spellIndexDir</em></td><td>)</td>
<td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Use a different index as the spell checker index or re-open the existing index if <code>spellIndex</code> is the same value as given in the constructor. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">spellIndexDir</td><td>spellIndexDir the spell directory to use </td></tr>
</table>
</dd>
</dl>
<p>&lt;throws&gt;AlreadyClosedException if the Spellchecker is already closed&lt;/throws&gt; &lt;throws&gt;IOException if spellchecker can not open the directory&lt;/throws&gt; </p>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00126">126</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="aa43c0910a7327826c9c9f9f1a954f6ae"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">void SpellChecker.Net.Search.Spell.SpellChecker.setStringDistance </td>
<td>(</td>
<td class="paramtype"><a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html">StringDistance</a>&#160;</td>
<td class="paramname"><em>sd</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Sets the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> implementation for this <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> instance. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">sd</td><td>the <a class="el" href="interface_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_string_distance.html" title="Interface for string distances. ">StringDistance</a> implementation for this <a class="el" href="class_spell_checker_1_1_net_1_1_search_1_1_spell_1_1_spell_checker.html">SpellChecker</a> instance.</td></tr>
</table>
</dd>
</dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00149">149</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="a86ea0137d5c97b11224f5ac3b205d5c0"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual System.String [] SpellChecker.Net.Search.Spell.SpellChecker.SuggestSimilar </td>
<td>(</td>
<td class="paramtype">System.String&#160;</td>
<td class="paramname"><em>word</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>num_sug</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Suggest similar words</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">word</td><td>String the word you want a spell check done on </td></tr>
<tr><td class="paramname">num_sug</td><td>int the number of suggest words </td></tr>
</table>
</dd>
</dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<dl class="section return"><dt>Returns</dt><dd>String[] </dd></dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00182">182</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<a class="anchor" id="af85cca48c47713f855792833128d2d3f"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
<tr>
<td class="mlabels-left">
<table class="memname">
<tr>
<td class="memname">virtual System.String [] SpellChecker.Net.Search.Spell.SpellChecker.SuggestSimilar </td>
<td>(</td>
<td class="paramtype">System.String&#160;</td>
<td class="paramname"><em>word</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>numSug</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="namespace_spell_checker_1_1_net_1_1_search_1_1_spell.html#a2b2d16da8a4d1c2bd29999dd6b61d08a">IndexReader</a>&#160;</td>
<td class="paramname"><em>ir</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">System.String&#160;</td>
<td class="paramname"><em>field</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">bool&#160;</td>
<td class="paramname"><em>morePopular</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</td>
<td class="mlabels-right">
<span class="mlabels"><span class="mlabel">virtual</span></span> </td>
</tr>
</table>
</div><div class="memdoc">
<p>Suggest similar words (restricted or not to a field of a user index)</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">word</td><td>String the word you want a spell check done on </td></tr>
<tr><td class="paramname">numSug</td><td>int the number of suggest words </td></tr>
<tr><td class="paramname">ir</td><td>the indexReader of the user index (can be null see field param) </td></tr>
<tr><td class="paramname">field</td><td>String the field of the user index: if field is not null, the suggested words are restricted to the words present in this field. </td></tr>
<tr><td class="paramname">morePopular</td><td>boolean return only the suggest words that are more frequent than the searched word (only if restricted mode = (indexReader!=null and field!=null) </td></tr>
</table>
</dd>
</dl>
<p>&lt;throws&gt; IOException &lt;/throws&gt; </p>
<dl class="section return"><dt>Returns</dt><dd>String[] the sorted list of the suggest words with this 2 criteria: first criteria: the edit distance, second criteria (only if restricted mode): the popularity of the suggest words in the field of the user index </dd></dl>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00206">206</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<h2 class="groupheader">Member Data Documentation</h2>
<a class="anchor" id="ae60f8d8a28c0371b0fa1bd5a16cb6903"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname">const System.String SpellChecker.Net.Search.Spell.SpellChecker.F_WORD = &quot;word&quot;</td>
</tr>
</table>
</div><div class="memdoc">
<p>Field name for each word in the ngram index.</p>
<p>Definition at line <a class="el" href="_spell_checker_8cs_source.html#l00065">65</a> of file <a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a>.</p>
</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li>contrib/SpellChecker/Spell/<a class="el" href="_spell_checker_8cs_source.html">SpellChecker.cs</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 3 2013 02:12:59 for Lucene.Net by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.3
</small></address>
</body>
</html>