Exemplo n.º 1
0
		public PorterStemFilter(TokenStream in_Renamed):base(in_Renamed)
		{
			stemmer = new PorterStemmer();
			termAtt = (TermAttribute) AddAttribute(typeof(TermAttribute));
		}
Exemplo n.º 2
0
		/// <summary> Build a filter that removes words that are too long or too
		/// short from the text.
		/// </summary>
		public LengthFilter(TokenStream in_Renamed, int min, int max):base(in_Renamed)
		{
			this.min = min;
			this.max = max;
			termAtt = (TermAttribute) AddAttribute(typeof(TermAttribute));
		}
Exemplo n.º 3
0
		public CachingTokenFilter(TokenStream input):base(input)
		{
		}
Exemplo n.º 4
0
		public LowerCaseFilter(TokenStream in_Renamed):base(in_Renamed)
		{
			termAtt = (TermAttribute) AddAttribute(typeof(TermAttribute));
		}
Exemplo n.º 5
0
		public ISOLatin1AccentFilter(TokenStream input):base(input)
		{
			termAtt = (TermAttribute) AddAttribute(typeof(TermAttribute));
		}
Exemplo n.º 6
0
		/// <summary> Construct a token stream filtering the given input.
		/// If <code>stopWords</code> is an instance of {@link CharArraySet} (true if
		/// <code>makeStopSet()</code> was used to construct the set) it will be directly used
		/// and <code>ignoreCase</code> will be ignored since <code>CharArraySet</code>
		/// directly controls case sensitivity.
		/// <p/>
		/// If <code>stopWords</code> is not an instance of {@link CharArraySet},
		/// a new CharArraySet will be constructed and <code>ignoreCase</code> will be
		/// used to specify the case sensitivity of that set.
		/// 
		/// </summary>
		/// <param name="enablePositionIncrements">true if token positions should record the removed stop words
		/// </param>
		/// <param name="input">Input TokenStream
		/// </param>
		/// <param name="stopWords">The set of Stop Words.
		/// </param>
		/// <param name="ignoreCase">-Ignore case when stopping.
		/// </param>
		public StopFilter(bool enablePositionIncrements, TokenStream input, System.Collections.Hashtable stopWords, bool ignoreCase):base(input)
		{
			if (stopWords is CharArraySet)
			{
				this.stopWords = (CharArraySet) stopWords;
			}
			else
			{
				this.stopWords = new CharArraySet(stopWords.Count, ignoreCase);
				this.stopWords.Add(stopWords);
			}
			this.enablePositionIncrements = enablePositionIncrements;
			Init();
		}
Exemplo n.º 7
0
		public TeeTokenFilter(TokenStream input, SinkTokenizer sink):base(input)
		{
			this.sink = sink;
		}
Exemplo n.º 8
0
		public StopFilter(bool enablePositionIncrements, TokenStream in_Renamed, System.String[] stopWords, bool ignoreCase):base(in_Renamed)
		{
			this.stopWords = (CharArraySet) MakeStopSet(stopWords, ignoreCase);
			this.enablePositionIncrements = enablePositionIncrements;
			Init();
		}
Exemplo n.º 9
0
 /// <summary> Instantiates a new TeeSinkTokenFilter.</summary>
 public TeeSinkTokenFilter(TokenStream input) : base(input)
 {
 }
Exemplo n.º 10
0
		public StopFilter(bool enablePositionIncrements, TokenStream input, System.String[] stopWords):this(enablePositionIncrements, input, stopWords, false)
		{
		}
Exemplo n.º 11
0
		public StopFilter(TokenStream in_Renamed, System.String[] stopWords, bool ignoreCase):this(ENABLE_POSITION_INCREMENTS_DEFAULT, in_Renamed, stopWords, ignoreCase)
		{
		}
Exemplo n.º 12
0
		public StopFilter(TokenStream input, System.String[] stopWords):this(ENABLE_POSITION_INCREMENTS_DEFAULT, input, stopWords, false)
		{
		}
Exemplo n.º 13
0
		/// <summary> Constructs a filter which removes words from the input
		/// TokenStream that are named in the Set.
		/// 
		/// </summary>
		/// <param name="enablePositionIncrements">true if token positions should record the removed stop words
		/// </param>
		/// <param name="in">Input stream
		/// </param>
		/// <param name="stopWords">The set of Stop Words.
		/// </param>
		/// <seealso cref="MakeStopSet(java.lang.String[])">
		/// </seealso>
		public StopFilter(bool enablePositionIncrements, TokenStream in_Renamed, System.Collections.Hashtable stopWords):this(enablePositionIncrements, in_Renamed, stopWords, false)
		{
		}
Exemplo n.º 14
0
		public StopFilter(TokenStream in_Renamed, System.Collections.Hashtable stopWords):this(ENABLE_POSITION_INCREMENTS_DEFAULT, in_Renamed, stopWords, false)
		{
		}
Exemplo n.º 15
0
		/// <summary>Construct a token stream filtering the given input. </summary>
		protected internal TokenFilter(TokenStream input):base(input)
		{
			this.input = input;
		}
Exemplo n.º 16
0
		/// <summary> Instantiates a new TeeSinkTokenFilter.</summary>
		public TeeSinkTokenFilter(TokenStream input):base(input)
		{
		}
Exemplo n.º 17
0
		public ASCIIFoldingFilter(TokenStream input):base(input)
		{
			termAtt = (TermAttribute) AddAttribute(typeof(TermAttribute));
		}
Exemplo n.º 18
0
		public StopFilter(TokenStream input, System.Collections.Hashtable stopWords, bool ignoreCase):this(ENABLE_POSITION_INCREMENTS_DEFAULT, input, stopWords, ignoreCase)
		{
		}