23 using System.Collections.Generic;
27 using System.Collections;
28 using Lucene.Net.Analysis;
31 namespace Lucene.Net.Analysis.Ru
43 private static readonly String[] RUSSIAN_STOP_WORDS = {
44 "а",
"без",
"более",
"бы",
"был",
"была",
"были",
46 "вам",
"вас",
"весь",
"во",
"вот",
"все",
"всего",
48 "да",
"даже",
"для",
"до",
"его",
"ее",
"ей",
"ею",
50 "еще",
"же",
"за",
"здесь",
"и",
"из",
"или",
"им",
52 "ко",
"когда",
"кто",
"ли",
"либо",
"мне",
"может",
54 "наш",
"не",
"него",
"нее",
"нет",
"ни",
"них",
"но",
56 "однако",
"он",
"она",
"они",
"оно",
"от",
"очень",
58 "с",
"со",
"так",
"также",
"такой",
"там",
"те",
"тем"
60 "тоже",
"той",
"только",
"том",
"ты",
"у",
"уже",
61 "хотя",
"чего",
"чей",
62 "чем",
"что",
"чтобы",
"чье",
"чья",
"эта",
"эти",
66 private static class DefaultSetHolder
74 private readonly ISet<string> stopSet;
76 private readonly
Version matchVersion;
80 : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
89 : this(matchVersion,
StopFilter.MakeStopSet(stopwords))
105 this.matchVersion = matchVersion;
114 : this(matchVersion, stopwords.Keys.ToArray())
137 private class SavedStreams
152 public override TokenStream ReusableTokenStream(String fieldName, TextReader reader)
154 SavedStreams streams = (SavedStreams)PreviousTokenStream;
157 streams =
new SavedStreams();
161 streams.result, stopSet);
163 PreviousTokenStream = streams;
167 streams.source.Reset(reader);
169 return streams.result;