| | | |
Offset 140, 15 lines modified | Offset 140, 15 lines modified |
140 | </tr> | 140 | </tr> |
141 | </tbody> | 141 | </tbody> |
142 | </table> | 142 | </table> |
143 | </dd></dl> | 143 | </dd></dl> |
| |
144 | <dl·class="function"> | 144 | <dl·class="function"> |
145 | <dt·id="whoosh.analysis.StandardAnalyzer"> | 145 | <dt·id="whoosh.analysis.StandardAnalyzer"> |
146 | <code·class="descclassname">whoosh.analysis.</code><code·class="descname">StandardAnalyzer</code><span·class="sig-paren">(</span><em>expression=re.compile('\\w+(\\.?\\w+)*')</em>,·<em>stoplist=frozenset({'can'</em>,·<em>'if'</em>,·<em>'will'</em>,·<em>'be'</em>,·<em>'may'</em>,·<em>'not'</em>,·<em>'are'</em>,·<em>'is'</em>,·<em>'for'</em>,·<em>'you'</em>,·<em>'by'</em>,·<em>'a'</em>,·<em>'that'</em>,·<em>'yet'</em>,·<em>'we'</em>,·<em>'tbd'</em>,·<em>'your'</em>,·<em>'in'</em>,·<em>'with'</em>,·<em>'as'</em>,·<em>'at'</em>,·<em>'on'</em>,·<em>'this'</em>,·<em>'us'</em>,·<em>'to'</em>,·<em>'when'</em>,·<em>'or'</em>,·<em>'have'</em>,·<em>'an'</em>,·<em>'and'</em>,·<em>'of'</em>,·<em>'from'</em>,·<em>'it'</em>,·<em>'the'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>gaps=False</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.StandardAnalyzer"·title="Permalink·to·this·definition">¶</a></dt> | 146 | <code·class="descclassname">whoosh.analysis.</code><code·class="descname">StandardAnalyzer</code><span·class="sig-paren">(</span><em>expression=re.compile('\\w+(\\.?\\w+)*')</em>,·<em>stoplist=frozenset({'will'</em>,·<em>'or'</em>,·<em>'in'</em>,·<em>'this'</em>,·<em>'have'</em>,·<em>'you'</em>,·<em>'is'</em>,·<em>'be'</em>,·<em>'that'</em>,·<em>'an'</em>,·<em>'may'</em>,·<em>'of'</em>,·<em>'for'</em>,·<em>'to'</em>,·<em>'the'</em>,·<em>'when'</em>,·<em>'on'</em>,·<em>'by'</em>,·<em>'your'</em>,·<em>'from'</em>,·<em>'with'</em>,·<em>'a'</em>,·<em>'we'</em>,·<em>'at'</em>,·<em>'and'</em>,·<em>'tbd'</em>,·<em>'are'</em>,·<em>'us'</em>,·<em>'can'</em>,·<em>'not'</em>,·<em>'yet'</em>,·<em>'as'</em>,·<em>'if'</em>,·<em>'it'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>gaps=False</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.StandardAnalyzer"·title="Permalink·to·this·definition">¶</a></dt> |
147 | <dd><p>Composes·a·RegexTokenizer·with·a·LowercaseFilter·and·optional | 147 | <dd><p>Composes·a·RegexTokenizer·with·a·LowercaseFilter·and·optional |
148 | StopFilter.</p> | 148 | StopFilter.</p> |
149 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">ana</span>·<span·class="o">=</span>·<span·class="n">StandardAnalyzer</span><span·class="p">()</span> | 149 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">ana</span>·<span·class="o">=</span>·<span·class="n">StandardAnalyzer</span><span·class="p">()</span> |
150 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">ana</span><span·class="p">(</span><span·class="s2">"Testing·is·testing·and·testing"</span><span·class="p">)]</span> | 150 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">ana</span><span·class="p">(</span><span·class="s2">"Testing·is·testing·and·testing"</span><span·class="p">)]</span> |
151 | <span·class="go">["testing",·"testing",·"testing"]</span> | 151 | <span·class="go">["testing",·"testing",·"testing"]</span> |
152 | </pre></div> | 152 | </pre></div> |
153 | </div> | 153 | </div> |
Offset 169, 15 lines modified | Offset 169, 15 lines modified |
169 | </tr> | 169 | </tr> |
170 | </tbody> | 170 | </tbody> |
171 | </table> | 171 | </table> |
172 | </dd></dl> | 172 | </dd></dl> |
| |
173 | <dl·class="function"> | 173 | <dl·class="function"> |
174 | <dt·id="whoosh.analysis.StemmingAnalyzer"> | 174 | <dt·id="whoosh.analysis.StemmingAnalyzer"> |
175 | <code·class="descclassname">whoosh.analysis.</code><code·class="descname">StemmingAnalyzer</code><span·class="sig-paren">(</span><em>expression=re.compile('\\w+(\\.?\\w+)*')</em>,·<em>stoplist=frozenset({'can'</em>,·<em>'if'</em>,·<em>'will'</em>,·<em>'be'</em>,·<em>'may'</em>,·<em>'not'</em>,·<em>'are'</em>,·<em>'is'</em>,·<em>'for'</em>,·<em>'you'</em>,·<em>'by'</em>,·<em>'a'</em>,·<em>'that'</em>,·<em>'yet'</em>,·<em>'we'</em>,·<em>'tbd'</em>,·<em>'your'</em>,·<em>'in'</em>,·<em>'with'</em>,·<em>'as'</em>,·<em>'at'</em>,·<em>'on'</em>,·<em>'this'</em>,·<em>'us'</em>,·<em>'to'</em>,·<em>'when'</em>,·<em>'or'</em>,·<em>'have'</em>,·<em>'an'</em>,·<em>'and'</em>,·<em>'of'</em>,·<em>'from'</em>,·<em>'it'</em>,·<em>'the'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>gaps=False</em>,·<em>stemfn=<function·stem></em>,·<em>ignore=None</em>,·<em>cachesize=50000</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.StemmingAnalyzer"·title="Permalink·to·this·definition">¶</a></dt> | 175 | <code·class="descclassname">whoosh.analysis.</code><code·class="descname">StemmingAnalyzer</code><span·class="sig-paren">(</span><em>expression=re.compile('\\w+(\\.?\\w+)*')</em>,·<em>stoplist=frozenset({'will'</em>,·<em>'or'</em>,·<em>'in'</em>,·<em>'this'</em>,·<em>'have'</em>,·<em>'you'</em>,·<em>'is'</em>,·<em>'be'</em>,·<em>'that'</em>,·<em>'an'</em>,·<em>'may'</em>,·<em>'of'</em>,·<em>'for'</em>,·<em>'to'</em>,·<em>'the'</em>,·<em>'when'</em>,·<em>'on'</em>,·<em>'by'</em>,·<em>'your'</em>,·<em>'from'</em>,·<em>'with'</em>,·<em>'a'</em>,·<em>'we'</em>,·<em>'at'</em>,·<em>'and'</em>,·<em>'tbd'</em>,·<em>'are'</em>,·<em>'us'</em>,·<em>'can'</em>,·<em>'not'</em>,·<em>'yet'</em>,·<em>'as'</em>,·<em>'if'</em>,·<em>'it'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>gaps=False</em>,·<em>stemfn=<function·stem></em>,·<em>ignore=None</em>,·<em>cachesize=50000</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.StemmingAnalyzer"·title="Permalink·to·this·definition">¶</a></dt> |
176 | <dd><p>Composes·a·RegexTokenizer·with·a·lower·case·filter,·an·optional·stop | 176 | <dd><p>Composes·a·RegexTokenizer·with·a·lower·case·filter,·an·optional·stop |
177 | filter,·and·a·stemming·filter.</p> | 177 | filter,·and·a·stemming·filter.</p> |
178 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">ana</span>·<span·class="o">=</span>·<span·class="n">StemmingAnalyzer</span><span·class="p">()</span> | 178 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">ana</span>·<span·class="o">=</span>·<span·class="n">StemmingAnalyzer</span><span·class="p">()</span> |
179 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">ana</span><span·class="p">(</span><span·class="s2">"Testing·is·testing·and·testing"</span><span·class="p">)]</span> | 179 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">ana</span><span·class="p">(</span><span·class="s2">"Testing·is·testing·and·testing"</span><span·class="p">)]</span> |
180 | <span·class="go">["test",·"test",·"test"]</span> | 180 | <span·class="go">["test",·"test",·"test"]</span> |
181 | </pre></div> | 181 | </pre></div> |
182 | </div> | 182 | </div> |
Offset 202, 15 lines modified | Offset 202, 15 lines modified |
202 | </tr> | 202 | </tr> |
203 | </tbody> | 203 | </tbody> |
204 | </table> | 204 | </table> |
205 | </dd></dl> | 205 | </dd></dl> |
| |
206 | <dl·class="function"> | 206 | <dl·class="function"> |
207 | <dt·id="whoosh.analysis.FancyAnalyzer"> | 207 | <dt·id="whoosh.analysis.FancyAnalyzer"> |
208 | <code·class="descclassname">whoosh.analysis.</code><code·class="descname">FancyAnalyzer</code><span·class="sig-paren">(</span><em>expression='\\s+'</em>,·<em>stoplist=frozenset({'can'</em>,·<em>'if'</em>,·<em>'will'</em>,·<em>'be'</em>,·<em>'may'</em>,·<em>'not'</em>,·<em>'are'</em>,·<em>'is'</em>,·<em>'for'</em>,·<em>'you'</em>,·<em>'by'</em>,·<em>'a'</em>,·<em>'that'</em>,·<em>'yet'</em>,·<em>'we'</em>,·<em>'tbd'</em>,·<em>'your'</em>,·<em>'in'</em>,·<em>'with'</em>,·<em>'as'</em>,·<em>'at'</em>,·<em>'on'</em>,·<em>'this'</em>,·<em>'us'</em>,·<em>'to'</em>,·<em>'when'</em>,·<em>'or'</em>,·<em>'have'</em>,·<em>'an'</em>,·<em>'and'</em>,·<em>'of'</em>,·<em>'from'</em>,·<em>'it'</em>,·<em>'the'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>gaps=True</em>,·<em>splitwords=True</em>,·<em>splitnums=True</em>,·<em>mergewords=False</em>,·<em>mergenums=False</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.FancyAnalyzer"·title="Permalink·to·this·definition">¶</a></dt> | 208 | <code·class="descclassname">whoosh.analysis.</code><code·class="descname">FancyAnalyzer</code><span·class="sig-paren">(</span><em>expression='\\s+'</em>,·<em>stoplist=frozenset({'will'</em>,·<em>'or'</em>,·<em>'in'</em>,·<em>'this'</em>,·<em>'have'</em>,·<em>'you'</em>,·<em>'is'</em>,·<em>'be'</em>,·<em>'that'</em>,·<em>'an'</em>,·<em>'may'</em>,·<em>'of'</em>,·<em>'for'</em>,·<em>'to'</em>,·<em>'the'</em>,·<em>'when'</em>,·<em>'on'</em>,·<em>'by'</em>,·<em>'your'</em>,·<em>'from'</em>,·<em>'with'</em>,·<em>'a'</em>,·<em>'we'</em>,·<em>'at'</em>,·<em>'and'</em>,·<em>'tbd'</em>,·<em>'are'</em>,·<em>'us'</em>,·<em>'can'</em>,·<em>'not'</em>,·<em>'yet'</em>,·<em>'as'</em>,·<em>'if'</em>,·<em>'it'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>gaps=True</em>,·<em>splitwords=True</em>,·<em>splitnums=True</em>,·<em>mergewords=False</em>,·<em>mergenums=False</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.FancyAnalyzer"·title="Permalink·to·this·definition">¶</a></dt> |
209 | <dd><p>Composes·a·RegexTokenizer·with·an·IntraWordFilter,·LowercaseFilter,·and | 209 | <dd><p>Composes·a·RegexTokenizer·with·an·IntraWordFilter,·LowercaseFilter,·and |
210 | StopFilter.</p> | 210 | StopFilter.</p> |
211 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">ana</span>·<span·class="o">=</span>·<span·class="n">FancyAnalyzer</span><span·class="p">()</span> | 211 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">ana</span>·<span·class="o">=</span>·<span·class="n">FancyAnalyzer</span><span·class="p">()</span> |
212 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">ana</span><span·class="p">(</span><span·class="s2">"Should·I·call·getInt·or·get_real?"</span><span·class="p">)]</span> | 212 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">ana</span><span·class="p">(</span><span·class="s2">"Should·I·call·getInt·or·get_real?"</span><span·class="p">)]</span> |
213 | <span·class="go">["should",·"call",·"getInt",·"get",·"int",·"get_real",·"get",·"real"]</span> | 213 | <span·class="go">["should",·"call",·"getInt",·"get",·"int",·"get_real",·"get",·"real"]</span> |
214 | </pre></div> | 214 | </pre></div> |
215 | </div> | 215 | </div> |
Offset 511, 15 lines modified | Offset 511, 15 lines modified |
511 | <dt·id="whoosh.analysis.StripFilter"> | 511 | <dt·id="whoosh.analysis.StripFilter"> |
512 | <em·class="property">class·</em><code·class="descclassname">whoosh.analysis.</code><code·class="descname">StripFilter</code><a·class="headerlink"·href="#whoosh.analysis.StripFilter"·title="Permalink·to·this·definition">¶</a></dt> | 512 | <em·class="property">class·</em><code·class="descclassname">whoosh.analysis.</code><code·class="descname">StripFilter</code><a·class="headerlink"·href="#whoosh.analysis.StripFilter"·title="Permalink·to·this·definition">¶</a></dt> |
513 | <dd><p>Calls·unicode.strip()·on·the·token·text.</p> | 513 | <dd><p>Calls·unicode.strip()·on·the·token·text.</p> |
514 | </dd></dl> | 514 | </dd></dl> |
| |
515 | <dl·class="class"> | 515 | <dl·class="class"> |
516 | <dt·id="whoosh.analysis.StopFilter"> | 516 | <dt·id="whoosh.analysis.StopFilter"> |
517 | <em·class="property">class·</em><code·class="descclassname">whoosh.analysis.</code><code·class="descname">StopFilter</code><span·class="sig-paren">(</span><em>stoplist=frozenset({'can'</em>,·<em>'if'</em>,·<em>'will'</em>,·<em>'be'</em>,·<em>'may'</em>,·<em>'not'</em>,·<em>'are'</em>,·<em>'is'</em>,·<em>'for'</em>,·<em>'you'</em>,·<em>'by'</em>,·<em>'a'</em>,·<em>'that'</em>,·<em>'yet'</em>,·<em>'we'</em>,·<em>'tbd'</em>,·<em>'your'</em>,·<em>'in'</em>,·<em>'with'</em>,·<em>'as'</em>,·<em>'at'</em>,·<em>'on'</em>,·<em>'this'</em>,·<em>'us'</em>,·<em>'to'</em>,·<em>'when'</em>,·<em>'or'</em>,·<em>'have'</em>,·<em>'an'</em>,·<em>'and'</em>,·<em>'of'</em>,·<em>'from'</em>,·<em>'it'</em>,·<em>'the'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>renumber=True</em>,·<em>lang=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.StopFilter"·title="Permalink·to·this·definition">¶</a></dt> | 517 | <em·class="property">class·</em><code·class="descclassname">whoosh.analysis.</code><code·class="descname">StopFilter</code><span·class="sig-paren">(</span><em>stoplist=frozenset({'will'</em>,·<em>'or'</em>,·<em>'in'</em>,·<em>'this'</em>,·<em>'have'</em>,·<em>'you'</em>,·<em>'is'</em>,·<em>'be'</em>,·<em>'that'</em>,·<em>'an'</em>,·<em>'may'</em>,·<em>'of'</em>,·<em>'for'</em>,·<em>'to'</em>,·<em>'the'</em>,·<em>'when'</em>,·<em>'on'</em>,·<em>'by'</em>,·<em>'your'</em>,·<em>'from'</em>,·<em>'with'</em>,·<em>'a'</em>,·<em>'we'</em>,·<em>'at'</em>,·<em>'and'</em>,·<em>'tbd'</em>,·<em>'are'</em>,·<em>'us'</em>,·<em>'can'</em>,·<em>'not'</em>,·<em>'yet'</em>,·<em>'as'</em>,·<em>'if'</em>,·<em>'it'})</em>,·<em>minsize=2</em>,·<em>maxsize=None</em>,·<em>renumber=True</em>,·<em>lang=None</em><span·class="sig-paren">)</span><a·class="headerlink"·href="#whoosh.analysis.StopFilter"·title="Permalink·to·this·definition">¶</a></dt> |
518 | <dd><p>Marks·“stop”·words·(words·too·common·to·index)·in·the·stream·(and·by | 518 | <dd><p>Marks·“stop”·words·(words·too·common·to·index)·in·the·stream·(and·by |
519 | default·removes·them).</p> | 519 | default·removes·them).</p> |
520 | <p>Make·sure·you·precede·this·filter·with·a·<a·class="reference·internal"·href="#whoosh.analysis.LowercaseFilter"·title="whoosh.analysis.LowercaseFilter"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">LowercaseFilter</span></code></a>.</p> | 520 | <p>Make·sure·you·precede·this·filter·with·a·<a·class="reference·internal"·href="#whoosh.analysis.LowercaseFilter"·title="whoosh.analysis.LowercaseFilter"><code·class="xref·py·py-class·docutils·literal·notranslate"><span·class="pre">LowercaseFilter</span></code></a>.</p> |
521 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">stopper</span>·<span·class="o">=</span>·<span·class="n">RegexTokenizer</span><span·class="p">()</span>·<span·class="o">|</span>·<span·class="n">StopFilter</span><span·class="p">()</span> | 521 | <div·class="highlight-default·notranslate"><div·class="highlight"><pre><span></span><span·class="gp">>>>·</span><span·class="n">stopper</span>·<span·class="o">=</span>·<span·class="n">RegexTokenizer</span><span·class="p">()</span>·<span·class="o">|</span>·<span·class="n">StopFilter</span><span·class="p">()</span> |
522 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">stopper</span><span·class="p">(</span><span·class="sa">u</span><span·class="s2">"this·is·a·test"</span><span·class="p">)]</span> | 522 | <span·class="gp">>>>·</span><span·class="p">[</span><span·class="n">token</span><span·class="o">.</span><span·class="n">text</span>·<span·class="k">for</span>·<span·class="n">token</span>·<span·class="ow">in</span>·<span·class="n">stopper</span><span·class="p">(</span><span·class="sa">u</span><span·class="s2">"this·is·a·test"</span><span·class="p">)]</span> |
523 | <span·class="go">["test"]</span> | 523 | <span·class="go">["test"]</span> |
524 | <span·class="gp">>>>·</span><span·class="n">es_stopper</span>·<span·class="o">=</span>·<span·class="n">RegexTokenizer</span><span·class="p">()</span>·<span·class="o">|</span>·<span·class="n">StopFilter</span><span·class="p">(</span><span·class="n">lang</span><span·class="o">=</span><span·class="s2">"es"</span><span·class="p">)</span> | 524 | <span·class="gp">>>>·</span><span·class="n">es_stopper</span>·<span·class="o">=</span>·<span·class="n">RegexTokenizer</span><span·class="p">()</span>·<span·class="o">|</span>·<span·class="n">StopFilter</span><span·class="p">(</span><span·class="n">lang</span><span·class="o">=</span><span·class="s2">"es"</span><span·class="p">)</span> |