23 using System.Collections.Generic;
25 using System.Collections;
27 using Lucene.Net.Analysis.Standard;
28 using Lucene.Net.Analysis;
31 namespace Lucene.Net.Analysis.De
46 private static readonly String[] GERMAN_STOP_WORDS =
48 "einer",
"eine",
"eines",
"einem",
"einen",
49 "der",
"die",
"das",
"dass",
"daß",
50 "du",
"er",
"sie",
"es",
51 "was",
"wer",
"wie",
"wir",
52 "und",
"oder",
"ohne",
"mit",
53 "am",
"im",
"in",
"aus",
"auf",
54 "ist",
"sein",
"war",
"wird",
55 "ihr",
"ihre",
"ihres",
57 "dich",
"dir",
"mich",
"mir",
65 public static ISet<string> GetDefaultStopSet()
67 return DefaultSetHolder.DEFAULT_SET;
70 private static class DefaultSetHolder
73 (IEnumerable<string>)GERMAN_STOP_WORDS,
81 private ISet<string> stopSet;
87 private ISet<string> exclusionSet;
90 private readonly
bool _normalizeDin2;
96 [Obsolete(
"Use GermanAnalyzer(Version) instead")]
108 : this(matchVersion, DefaultSetHolder.DEFAULT_SET)
120 : this(matchVersion, DefaultSetHolder.DEFAULT_SET, normalizeDin2)
142 : this(matchVersion, stopwords,
CharArraySet.EMPTY_SET, normalizeDin2)
153 : this(matchVersion, stopwords, stemExclusionSet, false)
166 public GermanAnalyzer(
Version matchVersion, ISet<string> stopwords, ISet<string> stemExclusionSet,
bool normalizeDin2)
170 this.matchVersion = matchVersion;
171 _normalizeDin2 = normalizeDin2;
172 SetOverridesTokenStreamMethod<GermanAnalyzer>();
179 [Obsolete(
"use GermanAnalyzer(Version, Set) instead")]
181 : this(matchVersion,
StopFilter.MakeStopSet(stopwords))
188 [Obsolete(
"Use GermanAnalyzer(Version, ISet)")]
190 : this(matchVersion, stopwords.Keys.ToArray())
198 [Obsolete(
"Use GermanAnalyzer(Version, ISet)")]
207 [Obsolete(
"Use GermanAnalyzer(Version, ISet, ISet) instead")]
208 public void SetStemExclusionTable(String[] exclusionlist)
211 PreviousTokenStream = null;
217 [Obsolete(
"Use GermanAnalyzer(Version, ISet, ISet) instead")]
218 public void SetStemExclusionTable(IDictionary<string, string> exclusionlist)
220 exclusionSet = Support.Compatibility.SetFactory.CreateHashSet(exclusionlist.Keys);
221 PreviousTokenStream = null;
227 [Obsolete(
"Use GermanAnalyzer(Version, ISet, ISet) instead")]
228 public void SetStemExclusionTable(FileInfo exclusionlist)
231 PreviousTokenStream = null;