23 using System.Collections.Generic;
26 using Lucene.Net.Analysis.Standard;
29 namespace Lucene.Net.Analysis.El
48 private static readonly String[] GREEK_STOP_WORDS = {
49 "ο",
"η",
"το",
"οι",
"τα",
"του",
"τησ",
"των",
"τον",
51 "κι",
"κ",
"ειμαι",
"εισαι",
"ειναι",
"ειμαστε",
"ειστε"
53 "στη",
"στην",
"μα",
"αλλα",
"απο",
"για",
"προσ",
"με",
55 "παρα",
"αντι",
"κατα",
"μετα",
"θα",
"να",
"δε",
"δεν",
57 "επι",
"ενω",
"εαν",
"αν",
"τοτε",
"που",
"πωσ",
"ποιοσ"
59 "ποιοι",
"ποιεσ",
"ποιων",
"ποιουσ",
"αυτοσ",
"αυτη",
61 "αυτων",
"αυτουσ",
"αυτεσ",
"αυτα",
"εκεινοσ",
"εκεινη",
63 "εκεινοι",
"εκεινεσ",
"εκεινα",
"εκεινων",
"εκεινουσ",
72 public static ISet<string> GetDefaultStopSet()
74 return DefaultSetHolder.DEFAULT_SET;
77 private static class DefaultSetHolder
85 private readonly ISet<string> stopSet;
87 private readonly
Version matchVersion;
90 : this(matchVersion, DefaultSetHolder.DEFAULT_SET)
105 this.matchVersion = matchVersion;
114 : this(matchVersion,
StopFilter.MakeStopSet(stopwords))
123 : this(matchVersion, stopwords.Keys.ToArray())
142 private class SavedStreams
155 public override TokenStream ReusableTokenStream(String fieldName, TextReader reader)
157 SavedStreams streams = (SavedStreams)PreviousTokenStream;
160 streams =
new SavedStreams();
164 streams.result, stopSet);
165 PreviousTokenStream = streams;
169 streams.source.Reset(reader);
171 return streams.result;