Class ShingleAnalyzerWrapper
A ShingleAnalyzerWrapper wraps a Shingle
A shingle is another name for a token based n-gram.
Inheritance
Implements
Inherited Members
Namespace: Lucene.Net.Analysis.Shingle
Assembly: Lucene.Net.Analysis.Common.dll
Syntax
public sealed class ShingleAnalyzerWrapper : AnalyzerWrapper, IDisposable
Constructors
| Improve this Doc View SourceShingleAnalyzerWrapper(Analyzer)
Declaration
public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
defaultAnalyzer |
ShingleAnalyzerWrapper(Analyzer, Int32)
Declaration
public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int maxShingleSize)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
defaultAnalyzer | |
System. |
maxShingleSize |
ShingleAnalyzerWrapper(Analyzer, Int32, Int32)
Declaration
public ShingleAnalyzerWrapper(Analyzer defaultAnalyzer, int minShingleSize, int maxShingleSize)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
defaultAnalyzer | |
System. |
minShingleSize | |
System. |
maxShingleSize |
ShingleAnalyzerWrapper(Analyzer, Int32, Int32, String, Boolean, Boolean, String)
Creates a new Shingle
Declaration
public ShingleAnalyzerWrapper(Analyzer delegate, int minShingleSize, int maxShingleSize, string tokenSeparator, bool outputUnigrams, bool outputUnigramsIfNoShingles, string fillerToken)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
delegate | Lucene. |
System. |
minShingleSize | Min shingle (token ngram) size |
System. |
maxShingleSize | Max shingle size |
System. |
tokenSeparator | Used to separate input stream tokens in output shingles |
System. |
outputUnigrams | Whether or not the filter shall pass the original tokens to the output stream |
System. |
outputUnigramsIfNoShingles | Overrides the behavior of outputUnigrams==false for those times when no shingles are available (because there are fewer than minShingleSize tokens in the input stream)? Note that if outputUnigrams==true, then unigrams are always output, regardless of whether any shingles are available. |
System. |
fillerToken | filler token to use when positionIncrement is more than 1 |
ShingleAnalyzerWrapper(LuceneVersion)
Wraps Standard
Declaration
public ShingleAnalyzerWrapper(LuceneVersion matchVersion)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
matchVersion |
ShingleAnalyzerWrapper(LuceneVersion, Int32, Int32)
Wraps Standard
Declaration
public ShingleAnalyzerWrapper(LuceneVersion matchVersion, int minShingleSize, int maxShingleSize)
Parameters
Type | Name | Description |
---|---|---|
Lucene. |
matchVersion | |
System. |
minShingleSize | |
System. |
maxShingleSize |
Properties
| Improve this Doc View SourceFillerToken
Declaration
public string FillerToken { get; }
Property Value
Type | Description |
---|---|
System. |
MaxShingleSize
The max shingle (token ngram) size
Declaration
public int MaxShingleSize { get; }
Property Value
Type | Description |
---|---|
System. |
The max shingle (token ngram) size |
MinShingleSize
The min shingle (token ngram) size
Declaration
public int MinShingleSize { get; }
Property Value
Type | Description |
---|---|
System. |
The min shingle (token ngram) size |
OutputUnigrams
Declaration
public bool OutputUnigrams { get; }
Property Value
Type | Description |
---|---|
System. |
OutputUnigramsIfNoShingles
Declaration
public bool OutputUnigramsIfNoShingles { get; }
Property Value
Type | Description |
---|---|
System. |
TokenSeparator
Declaration
public string TokenSeparator { get; }
Property Value
Type | Description |
---|---|
System. |
Methods
| Improve this Doc View SourceGetWrappedAnalyzer(String)
Declaration
protected override sealed Analyzer GetWrappedAnalyzer(string fieldName)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName |
Returns
Type | Description |
---|---|
Lucene. |
Overrides
| Improve this Doc View SourceWrapComponents(String, TokenStreamComponents)
Declaration
protected override TokenStreamComponents WrapComponents(string fieldName, TokenStreamComponents components)
Parameters
Type | Name | Description |
---|---|---|
System. |
fieldName | |
Lucene. |
components |
Returns
Type | Description |
---|---|
Lucene. |