You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by sy...@apache.org on 2015/12/10 19:39:04 UTC

[15/27] lucenenet git commit: adding converted analysis common tests

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilter.cs
new file mode 100644
index 0000000..234736b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilter.cs
@@ -0,0 +1,114 @@
+namespace org.apache.lucene.analysis.hu
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using KeywordTokenizer = org.apache.lucene.analysis.core.KeywordTokenizer;
+	using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
+	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+
+//JAVA TO C# CONVERTER TODO TASK: This Java 'import static' statement cannot be converted to C#:
+//	import static org.apache.lucene.analysis.VocabularyAssert.*;
+
+	/// <summary>
+	/// Simple tests for <seealso cref="HungarianLightStemFilter"/>
+	/// </summary>
+	public class TestHungarianLightStemFilter : BaseTokenStreamTestCase
+	{
+	  private Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper();
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  public AnalyzerAnonymousInnerClassHelper()
+		  {
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+			return new TokenStreamComponents(source, new HungarianLightStemFilter(source));
+		  }
+	  }
+
+	  /// <summary>
+	  /// Test against a vocabulary from the reference impl </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testVocabulary() throws java.io.IOException
+	  public virtual void testVocabulary()
+	  {
+		assertVocabulary(analyzer, getDataFile("hulighttestdata.zip"), "hulight.txt");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testKeyword() throws java.io.IOException
+	  public virtual void testKeyword()
+	  {
+//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
+//ORIGINAL LINE: final org.apache.lucene.analysis.util.CharArraySet exclusionSet = new org.apache.lucene.analysis.util.CharArraySet(TEST_VERSION_CURRENT, asSet("babakocsi"), false);
+		CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("babakocsi"), false);
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper2(this, exclusionSet);
+		checkOneTerm(a, "babakocsi", "babakocsi");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper2 : Analyzer
+	  {
+		  private readonly TestHungarianLightStemFilter outerInstance;
+
+		  private CharArraySet exclusionSet;
+
+		  public AnalyzerAnonymousInnerClassHelper2(TestHungarianLightStemFilter outerInstance, CharArraySet exclusionSet)
+		  {
+			  this.outerInstance = outerInstance;
+			  this.exclusionSet = exclusionSet;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+			TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
+			return new TokenStreamComponents(source, new HungarianLightStemFilter(sink));
+		  }
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testEmptyTerm() throws java.io.IOException
+	  public virtual void testEmptyTerm()
+	  {
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper3(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper3 : Analyzer
+	  {
+		  private readonly TestHungarianLightStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper3(TestHungarianLightStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new HungarianLightStemFilter(tokenizer));
+		  }
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilterFactory.cs
new file mode 100644
index 0000000..30283d6
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hu/TestHungarianLightStemFilterFactory.cs
@@ -0,0 +1,57 @@
+namespace org.apache.lucene.analysis.hu
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using BaseTokenStreamFactoryTestCase = org.apache.lucene.analysis.util.BaseTokenStreamFactoryTestCase;
+
+	/// <summary>
+	/// Simple tests to ensure the Hungarian light stem factory is working.
+	/// </summary>
+	public class TestHungarianLightStemFilterFactory : BaseTokenStreamFactoryTestCase
+	{
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStemming() throws Exception
+	  public virtual void testStemming()
+	  {
+		Reader reader = new StringReader("házakat");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("HungarianLightStem").create(stream);
+		assertTokenStreamContents(stream, new string[] {"haz"});
+	  }
+
+	  /// <summary>
+	  /// Test that bogus arguments result in exception </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testBogusArguments() throws Exception
+	  public virtual void testBogusArguments()
+	  {
+		try
+		{
+		  tokenFilterFactory("HungarianLightStem", "bogusArg", "bogusValue");
+		  fail();
+		}
+		catch (System.ArgumentException expected)
+		{
+		  assertTrue(expected.Message.contains("Unknown parameters"));
+		}
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/StemmerTestBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/StemmerTestBase.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/StemmerTestBase.cs
new file mode 100644
index 0000000..a1e0353
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/StemmerTestBase.cs
@@ -0,0 +1,95 @@
+using System.Collections.Generic;
+
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using CharsRef = org.apache.lucene.util.CharsRef;
+	using IOUtils = org.apache.lucene.util.IOUtils;
+	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
+
+	/// <summary>
+	/// base class for hunspell stemmer tests </summary>
+	internal abstract class StemmerTestBase : LuceneTestCase
+	{
+	  private static Stemmer stemmer;
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: static void init(String affix, String dictionary) throws java.io.IOException, java.text.ParseException
+	  internal static void init(string affix, string dictionary)
+	  {
+		init(false, affix, dictionary);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: static void init(boolean ignoreCase, String affix, String... dictionaries) throws java.io.IOException, java.text.ParseException
+	  internal static void init(bool ignoreCase, string affix, params string[] dictionaries)
+	  {
+		if (dictionaries.Length == 0)
+		{
+		  throw new System.ArgumentException("there must be at least one dictionary");
+		}
+
+		System.IO.Stream affixStream = typeof(StemmerTestBase).getResourceAsStream(affix);
+		if (affixStream == null)
+		{
+		  throw new FileNotFoundException("file not found: " + affix);
+		}
+
+		System.IO.Stream[] dictStreams = new System.IO.Stream[dictionaries.Length];
+		for (int i = 0; i < dictionaries.Length; i++)
+		{
+		  dictStreams[i] = typeof(StemmerTestBase).getResourceAsStream(dictionaries[i]);
+		  if (dictStreams[i] == null)
+		  {
+			throw new FileNotFoundException("file not found: " + dictStreams[i]);
+		  }
+		}
+
+		try
+		{
+		  Dictionary dictionary = new Dictionary(affixStream, Arrays.asList(dictStreams), ignoreCase);
+		  stemmer = new Stemmer(dictionary);
+		}
+		finally
+		{
+		  IOUtils.closeWhileHandlingException(affixStream);
+		  IOUtils.closeWhileHandlingException(dictStreams);
+		}
+	  }
+
+	  internal static void assertStemsTo(string s, params string[] expected)
+	  {
+		assertNotNull(stemmer);
+		Arrays.sort(expected);
+
+		IList<CharsRef> stems = stemmer.stem(s);
+		string[] actual = new string[stems.Count];
+		for (int i = 0; i < actual.Length; i++)
+		{
+		  actual[i] = stems[i].ToString();
+		}
+		Arrays.sort(actual);
+
+		assertArrayEquals("expected=" + Arrays.ToString(expected) + ",actual=" + Arrays.ToString(actual), expected, actual);
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs
new file mode 100644
index 0000000..9ca2372
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Diagnostics;
+
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using IOUtils = org.apache.lucene.util.IOUtils;
+	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
+	using RamUsageEstimator = org.apache.lucene.util.RamUsageEstimator;
+	using Ignore = org.junit.Ignore;
+
+	/// <summary>
+	/// Can be retrieved via:
+	/// wget --mirror -np http://archive.services.openoffice.org/pub/mirror/OpenOffice.org/contrib/dictionaries/
+	/// Note some of the files differ only in case. This may be a problem on your operating system!
+	/// </summary>
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @Ignore("enable manually") public class TestAllDictionaries extends org.apache.lucene.util.LuceneTestCase
+	public class TestAllDictionaries : LuceneTestCase
+	{
+
+	  // set this to the location of where you downloaded all the files
+	  internal static readonly File DICTIONARY_HOME = new File("/data/archive.services.openoffice.org/pub/mirror/OpenOffice.org/contrib/dictionaries");
+
+	  internal readonly string[] tests = new string[] {"af_ZA.zip", "af_ZA.dic", "af_ZA.aff", "ak_GH.zip", "ak_GH.dic", "ak_GH.aff", "bg_BG.zip", "bg_BG.dic", "bg_BG.aff", "ca_ANY.zip", "catalan.dic", "catalan.aff", "ca_ES.zip", "ca_ES.dic", "ca_ES.aff", "cs_CZ.zip", "cs_CZ.dic", "cs_CZ.aff", "cy_GB.zip", "cy_GB.dic", "cy_GB.aff", "da_DK.zip", "da_DK.dic", "da_DK.aff", "de_AT.zip", "de_AT.dic", "de_AT.aff", "de_CH.zip", "de_CH.dic", "de_CH.aff", "de_DE.zip", "de_DE.dic", "de_DE.aff", "de_DE_comb.zip", "de_DE_comb.dic", "de_DE_comb.aff", "de_DE_frami.zip", "de_DE_frami.dic", "de_DE_frami.aff", "de_DE_neu.zip", "de_DE_neu.dic", "de_DE_neu.aff", "el_GR.zip", "el_GR.dic", "el_GR.aff", "en_AU.zip", "en_AU.dic", "en_AU.aff", "en_CA.zip", "en_CA.dic", "en_CA.aff", "en_GB-oed.zip", "en_GB-oed.dic", "en_GB-oed.aff", "en_GB.zip", "en_GB.dic", "en_GB.aff", "en_NZ.zip", "en_NZ.dic", "en_NZ.aff", "eo.zip", "eo_l3.dic", "eo_l3.aff", "eo_EO.zip", "eo_EO.dic", "eo_EO.aff", "es_AR.zip", "es_AR.dic", "e
 s_AR.aff", "es_BO.zip", "es_BO.dic", "es_BO.aff", "es_CL.zip", "es_CL.dic", "es_CL.aff", "es_CO.zip", "es_CO.dic", "es_CO.aff", "es_CR.zip", "es_CR.dic", "es_CR.aff", "es_CU.zip", "es_CU.dic", "es_CU.aff", "es_DO.zip", "es_DO.dic", "es_DO.aff", "es_EC.zip", "es_EC.dic", "es_EC.aff", "es_ES.zip", "es_ES.dic", "es_ES.aff", "es_GT.zip", "es_GT.dic", "es_GT.aff", "es_HN.zip", "es_HN.dic", "es_HN.aff", "es_MX.zip", "es_MX.dic", "es_MX.aff", "es_NEW.zip", "es_NEW.dic", "es_NEW.aff", "es_NI.zip", "es_NI.dic", "es_NI.aff", "es_PA.zip", "es_PA.dic", "es_PA.aff", "es_PE.zip", "es_PE.dic", "es_PE.aff", "es_PR.zip", "es_PR.dic", "es_PR.aff", "es_PY.zip", "es_PY.dic", "es_PY.aff", "es_SV.zip", "es_SV.dic", "es_SV.aff", "es_UY.zip", "es_UY.dic", "es_UY.aff", "es_VE.zip", "es_VE.dic", "es_VE.aff", "et_EE.zip", "et_EE.dic", "et_EE.aff", "fo_FO.zip", "fo_FO.dic", "fo_FO.aff", "fr_FR-1990_1-3-2.zip", "fr_FR-1990.dic", "fr_FR-1990.aff", "fr_FR-classique_1-3-2.zip", "fr_FR-classique.dic", "fr_FR-classi
 que.aff", "fr_FR_1-3-2.zip", "fr_FR.dic", "fr_FR.aff", "fy_NL.zip", "fy_NL.dic", "fy_NL.aff", "ga_IE.zip", "ga_IE.dic", "ga_IE.aff", "gd_GB.zip", "gd_GB.dic", "gd_GB.aff", "gl_ES.zip", "gl_ES.dic", "gl_ES.aff", "gsc_FR.zip", "gsc_FR.dic", "gsc_FR.aff", "gu_IN.zip", "gu_IN.dic", "gu_IN.aff", "he_IL.zip", "he_IL.dic", "he_IL.aff", "hi_IN.zip", "hi_IN.dic", "hi_IN.aff", "hil_PH.zip", "hil_PH.dic", "hil_PH.aff", "hr_HR.zip", "hr_HR.dic", "hr_HR.aff", "hu_HU.zip", "hu_HU.dic", "hu_HU.aff", "hu_HU_comb.zip", "hu_HU.dic", "hu_HU.aff", "ia.zip", "ia.dic", "ia.aff", "id_ID.zip", "id_ID.dic", "id_ID.aff", "it_IT.zip", "it_IT.dic", "it_IT.aff", "ku_TR.zip", "ku_TR.dic", "ku_TR.aff", "la.zip", "la.dic", "la.aff", "lt_LT.zip", "lt_LT.dic", "lt_LT.aff", "lv_LV.zip", "lv_LV.dic", "lv_LV.aff", "mg_MG.zip", "mg_MG.dic", "mg_MG.aff", "mi_NZ.zip", "mi_NZ.dic", "mi_NZ.aff", "mk_MK.zip", "mk_MK.dic", "mk_MK.aff", "mos_BF.zip", "mos_BF.dic", "mos_BF.aff", "mr_IN.zip", "mr_IN.dic", "mr_IN.aff", "ms_MY.zip
 ", "ms_MY.dic", "ms_MY.aff", "nb_NO.zip", "nb_NO.dic", "nb_NO.aff", "ne_NP.zip", "ne_NP.dic", "ne_NP.aff", "nl_NL.zip", "nl_NL.dic", "nl_NL.aff", "nl_med.zip", "nl_med.dic", "nl_med.aff", "nn_NO.zip", "nn_NO.dic", "nn_NO.aff", "nr_ZA.zip", "nr_ZA.dic", "nr_ZA.aff", "ns_ZA.zip", "ns_ZA.dic", "ns_ZA.aff", "ny_MW.zip", "ny_MW.dic", "ny_MW.aff", "oc_FR.zip", "oc_FR.dic", "oc_FR.aff", "pl_PL.zip", "pl_PL.dic", "pl_PL.aff", "pt_BR.zip", "pt_BR.dic", "pt_BR.aff", "pt_PT.zip", "pt_PT.dic", "pt_PT.aff", "ro_RO.zip", "ro_RO.dic", "ro_RO.aff", "ru_RU.zip", "ru_RU.dic", "ru_RU.aff", "ru_RU_ye.zip", "ru_RU_ie.dic", "ru_RU_ie.aff", "ru_RU_yo.zip", "ru_RU_yo.dic", "ru_RU_yo.aff", "rw_RW.zip", "rw_RW.dic", "rw_RW.aff", "sk_SK.zip", "sk_SK.dic", "sk_SK.aff", "sl_SI.zip", "sl_SI.dic", "sl_SI.aff", "sq_AL.zip", "sq_AL.dic", "sq_AL.aff", "ss_ZA.zip", "ss_ZA.dic", "ss_ZA.aff", "st_ZA.zip", "st_ZA.dic", "st_ZA.aff", "sv_SE.zip", "sv_SE.dic", "sv_SE.aff", "sw_KE.zip", "sw_KE.dic", "sw_KE.aff", "tet_ID.zip
 ", "tet_ID.dic", "tet_ID.aff", "th_TH.zip", "th_TH.dic", "th_TH.aff", "tl_PH.zip", "tl_PH.dic", "tl_PH.aff", "tn_ZA.zip", "tn_ZA.dic", "tn_ZA.aff", "ts_ZA.zip", "ts_ZA.dic", "ts_ZA.aff", "uk_UA.zip", "uk_UA.dic", "uk_UA.aff", "ve_ZA.zip", "ve_ZA.dic", "ve_ZA.aff", "vi_VN.zip", "vi_VN.dic", "vi_VN.aff", "xh_ZA.zip", "xh_ZA.dic", "xh_ZA.aff", "zu_ZA.zip", "zu_ZA.dic", "zu_ZA.aff"};
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void test() throws Exception
+	  public virtual void test()
+	  {
+		for (int i = 0; i < tests.Length; i += 3)
+		{
+		  File f = new File(DICTIONARY_HOME, tests[i]);
+		  Debug.Assert(f.exists());
+
+		  using (ZipFile zip = new ZipFile(f, StandardCharsets.UTF_8))
+		  {
+			ZipEntry dicEntry = zip.getEntry(tests[i + 1]);
+			Debug.Assert(dicEntry != null);
+			ZipEntry affEntry = zip.getEntry(tests[i + 2]);
+			Debug.Assert(affEntry != null);
+
+			using (System.IO.Stream dictionary = zip.getInputStream(dicEntry), System.IO.Stream affix = zip.getInputStream(affEntry))
+			{
+			  Dictionary dic = new Dictionary(affix, dictionary);
+			  Console.WriteLine(tests[i] + "\t" + RamUsageEstimator.humanSizeOf(dic) + "\t(" + "words=" + RamUsageEstimator.humanSizeOf(dic.words) + ", " + "flags=" + RamUsageEstimator.humanSizeOf(dic.flagLookup) + ", " + "strips=" + RamUsageEstimator.humanSizeOf(dic.stripData) + ", " + "conditions=" + RamUsageEstimator.humanSizeOf(dic.patterns) + ", " + "affixData=" + RamUsageEstimator.humanSizeOf(dic.affixData) + ", " + "prefixes=" + RamUsageEstimator.humanSizeOf(dic.prefixes) + ", " + "suffixes=" + RamUsageEstimator.humanSizeOf(dic.suffixes) + ")");
+			}
+		  }
+		}
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testOneDictionary() throws Exception
+	  public virtual void testOneDictionary()
+	  {
+		string toTest = "hu_HU.zip";
+		for (int i = 0; i < tests.Length; i++)
+		{
+		  if (tests[i].Equals(toTest))
+		  {
+			File f = new File(DICTIONARY_HOME, tests[i]);
+			Debug.Assert(f.exists());
+
+			using (ZipFile zip = new ZipFile(f, StandardCharsets.UTF_8))
+			{
+			  ZipEntry dicEntry = zip.getEntry(tests[i + 1]);
+			  Debug.Assert(dicEntry != null);
+			  ZipEntry affEntry = zip.getEntry(tests[i + 2]);
+			  Debug.Assert(affEntry != null);
+
+			  using (System.IO.Stream dictionary = zip.getInputStream(dicEntry), System.IO.Stream affix = zip.getInputStream(affEntry))
+			  {
+				  new Dictionary(affix, dictionary);
+			  }
+			}
+		  }
+		}
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries2.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries2.cs
new file mode 100644
index 0000000..f2e76ec
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries2.cs
@@ -0,0 +1,99 @@
+using System;
+using System.Diagnostics;
+
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using IOUtils = org.apache.lucene.util.IOUtils;
+	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
+	using RamUsageEstimator = org.apache.lucene.util.RamUsageEstimator;
+	using Ignore = org.junit.Ignore;
+
+	/// <summary>
+	/// These thunderbird dictionaries can be retrieved via:
+	/// https://addons.mozilla.org/en-US/thunderbird/language-tools/
+	/// You must click and download every file: sorry!
+	/// </summary>
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @Ignore("enable manually") public class TestAllDictionaries2 extends org.apache.lucene.util.LuceneTestCase
+	public class TestAllDictionaries2 : LuceneTestCase
+	{
+
+	  // set this to the location of where you downloaded all the files
+	  internal static readonly File DICTIONARY_HOME = new File("/data/thunderbirdDicts");
+
+	  internal readonly string[] tests = new string[] {"addon-0.4.5-an+fx+tb+fn+sm.xpi", "dictionaries/ru.dic", "dictionaries/ru.aff", "addon-0.5.5-fx+tb.xpi", "dictionaries/ko-KR.dic", "dictionaries/ko-KR.aff", "afrikaans_spell_checker-20110323-fx+tb+fn+sm.xpi", "dictionaries/af-ZA.dic", "dictionaries/af-ZA.aff", "albanisches_worterbuch-1.6.9-fx+tb+sm+fn.xpi", "dictionaries/sq.dic", "dictionaries/sq.aff", "amharic_spell_checker-0.4-fx+fn+tb+sm.xpi", "dictionaries/am_ET.dic", "dictionaries/am_ET.aff", "arabic_spell_checking_dictionary-3.2.20120321-fx+tb.xpi", "dictionaries/ar.dic", "dictionaries/ar.aff", "armenian_spell_checker_dictionary-0.32-fx+tb+sm.xpi", "dictionaries/hy_AM.dic", "dictionaries/hy_AM.aff", "azerbaijani_spell_checker-0.3-fx+tb+fn+sm+sb.xpi", "dictionaries/az-Latn-AZ.dic", "dictionaries/az-Latn-AZ.aff", "belarusian_classic_dictionary-0.1.2-tb+fx+sm.xpi", "dictionaries/be-classic.dic", "dictionaries/be-classic.aff", "belarusian_dictionary-0.1.2-fx+sm+tb.xpi", "dictiona
 ries/be.dic", "dictionaries/be.aff", "bengali_bangladesh_dictionary-0.08-sm+tb+fx.xpi", "dictionaries/bn-BD.dic", "dictionaries/bn-BD.aff", "brazilian_portuguese_dictionary_former_spelling-28.20140203-tb+sm+fx.xpi", "dictionaries/pt-BR-antigo.dic", "dictionaries/pt-BR-antigo.aff", "brazilian_portuguese_dictionary_new_spelling-28.20140203-fx+sm+tb.xpi", "dictionaries/pt-BR.dic", "dictionaries/pt-BR.aff", "british_english_dictionary_updated-1.19.5-sm+fx+tb.xpi", "dictionaries/en-GB.dic", "dictionaries/en-GB.aff", "bulgarian_dictionary-4.3-fx+tb+sm.xpi", "dictionaries/bg.dic", "dictionaries/bg.aff", "canadian_english_dictionary-2.0.8-fx+sm+tb.xpi", "dictionaries/en-CA.dic", "dictionaries/en-CA.aff", "ceske_slovniky_pro_kontrolu_pravopisu-1.0.4-tb+sm+fx.xpi", "dictionaries/cs.dic", "dictionaries/cs.aff", "chichewa_spell_checker-0.3-fx+tb+fn+sm+sb.xpi", "dictionaries/ny_MW.dic", "dictionaries/ny_MW.aff", "corrector_de_galego-13.10.0-fn+sm+tb+fx.xpi", "dictionaries/gl_ES.dic", "dictionari
 es/gl_ES.aff", "corrector_ortografico_aragones-0.2-fx+tb+sm.xpi", "dictionaries/an_ES.dic", "dictionaries/an_ES.aff", "croatian_dictionary_-_hrvatski_rjecnik-1.0.1-firefox+thunderbird+seamonkey.xpi", "dictionaries/hr.dic", "dictionaries/hr.aff", "croatian_dictionary_hrvatski_rjecnik-1.0.9-an+fx+fn+tb+sm.xpi", "dictionaries/hr-HR.dic", "dictionaries/hr-HR.aff", "dansk_ordbog_til_stavekontrollen-2.2.1-sm+tb+fx.xpi", "dictionaries/da.dic", "dictionaries/da.aff", "deutsches_worterbuch_de_de_alte_rechtschreibung-2.1.8-sm.xpi", "dictionaries/de-DE-1901.dic", "dictionaries/de-DE-1901.aff", "diccionario_de_espanolespana-1.7-sm+tb+fn+fx.xpi", "dictionaries/es-ES.dic", "dictionaries/es-ES.aff", "diccionario_en_espanol_para_venezuela-1.1.17-sm+an+tb+fn+fx.xpi", "dictionaries/es_VE.dic", "dictionaries/es_VE.aff", "diccionario_espanol_argentina-2.5.1-tb+fx+sm.xpi", "dictionaries/es_AR.dic", "dictionaries/es_AR.aff", "diccionario_espanol_mexico-1.1.3-fn+tb+fx+sm.xpi", "dictionaries/es_MX.dic", "d
 ictionaries/es_MX.aff", "diccionario_ortografico_valenciano-2.2.0-fx+tb+fn+sm.xpi", "dictionaries/roa-ES-val.dic", "dictionaries/roa-ES-val.aff", "diccionario_papiamentoaruba-0.2-fn+sm+tb+fx.xpi", "dictionaries/Papiamento.dic", "dictionaries/Papiamento.aff", "dictionnaires_francais-5.0.2-fx+tb+sm.xpi", "dictionaries/fr-classic-reform.dic", "dictionaries/fr-classic-reform.aff", "dictionnaires_francais-5.0.2-fx+tb+sm.xpi", "dictionaries/fr-classic.dic", "dictionaries/fr-classic.aff", "dictionnaires_francais-5.0.2-fx+tb+sm.xpi", "dictionaries/fr-modern.dic", "dictionaries/fr-modern.aff", "dictionnaires_francais-5.0.2-fx+tb+sm.xpi", "dictionaries/fr-reform.dic", "dictionaries/fr-reform.aff", "difazier_an_drouizig-0.12-tb+sm+fx.xpi", "dictionaries/br.dic", "dictionaries/br.aff", "dikshonario_papiamentuantia_hulandes-0.5-fx+tb+fn+sb+sm.xpi", "dictionaries/Papiamentu.dic", "dictionaries/Papiamentu.aff", "dizionari_furlan-3.1-tb+fx+sm.xpi", "dictionaries/fur-IT.dic", "dictionaries/fur-IT.af
 f", "dizionario_italiano-3.3.2-fx+sm+tb.xpi", "dictionaries/it_IT.dic", "dictionaries/it_IT.aff", "eesti_keele_speller-3.2-fx+tb+sm.xpi", "dictionaries/et-EE.dic", "dictionaries/et-EE.aff", "english_australian_dictionary-2.1.2-tb+fx+sm.xpi", "dictionaries/en-AU.dic", "dictionaries/en-AU.aff", "esperanta_vortaro-1.0.2-fx+tb+sm.xpi", "dictionaries/eo-EO.dic", "dictionaries/eo-EO.aff", "european_portuguese_spellchecker-14.1.1.1-tb+fx.xpi", "dictionaries/pt-PT.dic", "dictionaries/pt-PT.aff", "faroese_spell_checker_faroe_islands-2.0-tb+sm+fx+fn.xpi", "dictionaries/fo_FO.dic", "dictionaries/fo_FO.aff", "frysk_wurdboek-2.1.1-fn+sm+fx+an+tb.xpi", "dictionaries/fy.dic", "dictionaries/fy.aff", "geiriadur_cymraeg-1.08-tb+sm+fx.xpi", "dictionaries/cy_GB.dic", "dictionaries/cy_GB.aff", "general_catalan_dictionary-2.5.0-tb+sm+fn+fx.xpi", "dictionaries/ca.dic", "dictionaries/ca.aff", "german_dictionary-2.0.3-fn+fx+sm+tb.xpi", "dictionaries/de-DE.dic", "dictionaries/de-DE.aff", "german_dictionary_d
 e_at_new_orthography-20130905-tb+fn+an+fx+sm.xpi", "dictionaries/de-AT.dic", "dictionaries/de-AT.aff", "german_dictionary_de_ch_new_orthography-20130905-fx+tb+fn+sm+an.xpi", "dictionaries/de-CH.dic", "dictionaries/de-CH.aff", "german_dictionary_de_de_new_orthography-20130905-tb+sm+an+fn+fx.xpi", "dictionaries/de-DE.dic", "dictionaries/de-DE.aff", "german_dictionary_extended_for_austria-2.0.3-fx+fn+sm+tb.xpi", "dictionaries/de-AT.dic", "dictionaries/de-AT.aff", "german_dictionary_switzerland-2.0.3-sm+fx+tb+fn.xpi", "dictionaries/de-CH.dic", "dictionaries/de-CH.aff", "greek_spelling_dictionary-0.8.5-fx+tb+sm.xpi", "dictionaries/el-GR.dic", "dictionaries/el-GR.aff", "gujarati_spell_checker-0.3-fx+tb+fn+sm+sb.xpi", "dictionaries/gu_IN.dic", "dictionaries/gu_IN.aff", "haitian_creole_spell_checker-0.08-tb+sm+fx.xpi", "dictionaries/ht-HT.dic", "dictionaries/ht-HT.aff", "hausa_spelling_dictionary-0.2-tb+fx.xpi", "dictionaries/ha-GH.dic", "dictionaries/ha-GH.aff", "hebrew_spell_checking_dict
 ionary_from_hspell-1.2.0.1-fx+sm+tb.xpi", "dictionaries/he.dic", "dictionaries/he.aff", "hindi_spell_checker-0.4-fx+tb+sm+sb+fn.xpi", "dictionaries/hi_IN.dic", "dictionaries/hi_IN.aff", "hungarian_dictionary-1.6.1.1-fx+tb+sm+fn.xpi", "dictionaries/hu.dic", "dictionaries/hu.aff", "kamus_pengecek_ejaan_bahasa_indonesia-1.1-fx+tb.xpi", "dictionaries/id.dic", "dictionaries/id.aff", "kannada_spell_checker-2.0.1-tb+sm+fn+an+fx.xpi", "dictionaries/kn.dic", "dictionaries/kn.aff", "kashubian_spell_checker_poland-0.9-sm+tb+fx.xpi", "dictionaries/Kaszebsczi.dic", "dictionaries/Kaszebsczi.aff", "kiswahili_spell_checker-0.3-sb+tb+fn+fx+sm.xpi", "dictionaries/sw_TZ.dic", "dictionaries/sw_TZ.aff", "kurdish_spell_checker-0.96-fx+tb+sm.xpi", "dictionaries/ku-TR.dic", "dictionaries/ku-TR.aff", "lao_spellchecking_dictionary-0-fx+tb+sm+fn+an.xpi", "dictionaries/lo_LA.dic", "dictionaries/lo_LA.aff", "latviesu_valodas_pareizrakstibas_parbaudes_vardnica-1.0.0-fn+fx+tb+sm.xpi", "dictionaries/lv_LV.dic", "d
 ictionaries/lv_LV.aff", "lithuanian_spelling_check_dictionary-1.3-fx+tb+sm+fn.xpi", "dictionaries/lt.dic", "dictionaries/lt.aff", "litreoir_gaelspell_do_mhozilla-4.7-tb+fx+sm+fn.xpi", "dictionaries/ga.dic", "dictionaries/ga.aff", "litreoir_na_liongailise-0.03-fx+sm+tb.xpi", "dictionaries/ln-CD.dic", "dictionaries/ln-CD.aff", "macedonian_mk_mk_spellchecker-1.2-fn+tb+fx+sm+sb.xpi", "dictionaries/mk-MK-Cyrl.dic", "dictionaries/mk-MK-Cyrl.aff", "macedonian_mk_mk_spellchecker-1.2-fn+tb+fx+sm+sb.xpi", "dictionaries/mk-MK-Latn.dic", "dictionaries/mk-MK-Latn.aff", "malagasy_spell_checker-0.3-fn+tb+fx+sm+sb.xpi", "dictionaries/mg_MG.dic", "dictionaries/mg_MG.aff", "marathi_dictionary-9.3-sm+tb+sb+fx.xpi", "dictionaries/mr-IN.dic", "dictionaries/mr-IN.aff", "ndebele_south_spell_checker-20110323-tb+fn+fx+sm.xpi", "dictionaries/nr-ZA.dic", "dictionaries/nr-ZA.aff", "nepali_dictionary-1.2-fx+tb.xpi", "dictionaries/ne_NP.dic", "dictionaries/ne_NP.aff", "norsk_bokmal_ordliste-2.0.10.2-fx+tb+sm.xpi
 ", "dictionaries/nb.dic", "dictionaries/nb.aff", "norsk_nynorsk_ordliste-2.1.0-sm+fx+tb.xpi", "dictionaries/nn.dic", "dictionaries/nn.aff", "northern_sotho_spell_checker-20110323-tb+fn+fx+sm.xpi", "dictionaries/nso-ZA.dic", "dictionaries/nso-ZA.aff", "oriya_spell_checker-0.3-fn+tb+fx+sm+sb.xpi", "dictionaries/or-IN.dic", "dictionaries/or-IN.aff", "polski_slownik_poprawnej_pisowni-1.0.20110621-fx+tb+sm.xpi", "dictionaries/pl.dic", "dictionaries/pl.aff", "punjabi_spell_checker-0.3-fx+tb+sm+sb+fn.xpi", "dictionaries/pa-IN.dic", "dictionaries/pa-IN.aff", "romanian_spellchecking_dictionary-1.14-sm+tb+fx.xpi", "dictionaries/ro_RO-ante1993.dic", "dictionaries/ro_RO-ante1993.aff", "russian_hunspell_dictionary-1.0.20131101-tb+sm+fn+fx.xpi", "dictionaries/ru_RU.dic", "dictionaries/ru_RU.aff", "sanskrit_spell_checker-1.1-fx+tb+sm+sb+fn.xpi", "dictionaries/sa_IN.dic", "dictionaries/sa_IN.aff", "scottish_gaelic_spell_checker-2.7-tb+fx+sm.xpi", "dictionaries/gd-GB.dic", "dictionaries/gd-GB.aff", 
 "serbian_dictionary-0.18-fx+tb+sm.xpi", "dictionaries/sr-RS-Cyrl.dic", "dictionaries/sr-RS-Cyrl.aff", "serbian_dictionary-0.18-fx+tb+sm.xpi", "dictionaries/sr-RS-Latn.dic", "dictionaries/sr-RS-Latn.aff", "slovak_spell_checking_dictionary-2.04.0-tb+fx+sm.xpi", "dictionaries/sk-SK.dic", "dictionaries/sk-SK.aff", "slovak_spell_checking_dictionary-2.04.0-tb+fx+sm.xpi", "dictionaries/sk-SK-ascii.dic", "dictionaries/sk-SK-ascii.aff", "slovar_za_slovenski_jezik-0.1.1.1-fx+tb+sm.xpi", "dictionaries/sl.dic", "dictionaries/sl.aff", "songhay_spell_checker-0.03-fx+tb+sm.xpi", "dictionaries/Songhay - Mali.dic", "dictionaries/Songhay - Mali.aff", "southern_sotho_spell_checker-20110323-tb+fn+fx+sm.xpi", "dictionaries/st-ZA.dic", "dictionaries/st-ZA.aff", "sownik_acinski-0.41.20110603-tb+fx+sm.xpi", "dictionaries/la.dic", "dictionaries/la.aff", "sownik_jezyka_dolnouzyckiego-1.4.8-an+fx+tb+fn+sm.xpi", "dictionaries/dsb.dic", "dictionaries/dsb.aff", "srpska_latinica-0.1-fx+tb+sm.xpi", "dictionaries/S
 rpski_latinica.dic", "dictionaries/Srpski_latinica.aff", "svenska_fria_ordlistan-1.1-tb+sm+fx.xpi", "dictionaries/sv.dic", "dictionaries/sv.aff", "svenska_fria_ordlistan-1.1-tb+sm+fx.xpi", "dictionaries/sv_FI.dic", "dictionaries/sv_FI.aff", "swati_spell_checker-20110323-tb+sm+fx+fn.xpi", "dictionaries/ss-ZA.dic", "dictionaries/ss-ZA.aff", "tamil_spell_checker_for_firefox-0.4-tb+fx.xpi", "dictionaries/ta-TA.dic", "dictionaries/ta-TA.aff", "telugu_spell_checker-0.3-tb+fx+sm.xpi", "dictionaries/te_IN.dic", "dictionaries/te_IN.aff", "te_papakupu_m__ori-0.9.9.20080630-fx+tb.xpi", "dictionaries/mi-x-Tai Tokerau.dic", "dictionaries/mi-x-Tai Tokerau.aff", "te_papakupu_m__ori-0.9.9.20080630-fx+tb.xpi", "dictionaries/mi.dic", "dictionaries/mi.aff", "tsonga_spell_checker-20110323-tb+sm+fx+fn.xpi", "dictionaries/ts-ZA.dic", "dictionaries/ts-ZA.aff", "tswana_spell_checker-20110323-tb+sm+fx+fn.xpi", "dictionaries/tn-ZA.dic", "dictionaries/tn-ZA.aff", "turkmen_spell_checker_dictionary-0.1.6-tb+fx+
 sm.xpi", "dictionaries/tk_TM.dic", "dictionaries/tk_TM.aff", "ukrainian_dictionary-1.7.0-sm+an+fx+fn+tb.xpi", "dictionaries/uk-UA.dic", "dictionaries/uk-UA.aff", "united_states_english_spellchecker-7.0.1-sm+tb+fx+an.xpi", "dictionaries/en-US.dic", "dictionaries/en-US.aff", "upper_sorbian_spelling_dictionary-0.0.20060327.3-tb+fx+sm.xpi", "dictionaries/hsb.dic", "dictionaries/hsb.aff", "urdu_dictionary-0.64-fx+tb+sm+sb.xpi", "dictionaries/ur.dic", "dictionaries/ur.aff", "uzbek_spell_checker-0.3-fn+tb+fx+sm+sb.xpi", "dictionaries/uz.dic", "dictionaries/uz.aff", "valencian_catalan_dictionary-2.5.0-tb+fn+sm+fx.xpi", "dictionaries/ca-ES-valencia.dic", "dictionaries/ca-ES-valencia.aff", "venda_spell_checker-20110323-tb+fn+fx+sm.xpi", "dictionaries/ve-ZA.dic", "dictionaries/ve-ZA.aff", "verificador_ortografico_para_portugues_do_brasil-2.3-3.2b1-tb+sm+fn+fx.xpi", "dictionaries/pt_BR.dic", "dictionaries/pt_BR.aff", "vietnamese_dictionary-2.1.0.159-an+sm+tb+fx+fn.xpi", "dictionaries/vi-DauCu.d
 ic", "dictionaries/vi-DauCu.aff", "vietnamese_dictionary-2.1.0.159-an+sm+tb+fx+fn.xpi", "dictionaries/vi-DauMoi.dic", "dictionaries/vi-DauMoi.aff", "woordenboek_nederlands-3.1.1-sm+tb+fx+fn.xpi", "dictionaries/nl.dic", "dictionaries/nl.aff", "xhosa_spell_checker-20110323-tb+fn+fx+sm.xpi", "dictionaries/xh-ZA.dic", "dictionaries/xh-ZA.aff", "xuxen-4.0.1-fx+tb+sm.xpi", "dictionaries/eu.dic", "dictionaries/eu.aff", "yiddish_spell_checker_yivo-0.0.3-sm+fn+fx+tb.xpi", "dictionaries/yi.dic", "dictionaries/yi.aff", "zulu_spell_checker-20110323-tb+fn+fx+sm.xpi", "dictionaries/zu-ZA.dic", "dictionaries/zu-ZA.aff"};
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void test() throws Exception
+	  public virtual void test()
+	  {
+		for (int i = 0; i < tests.Length; i += 3)
+		{
+		  File f = new File(DICTIONARY_HOME, tests[i]);
+		  Debug.Assert(f.exists());
+
+		  using (ZipFile zip = new ZipFile(f, StandardCharsets.UTF_8))
+		  {
+			ZipEntry dicEntry = zip.getEntry(tests[i + 1]);
+			Debug.Assert(dicEntry != null);
+			ZipEntry affEntry = zip.getEntry(tests[i + 2]);
+			Debug.Assert(affEntry != null);
+
+			using (System.IO.Stream dictionary = zip.getInputStream(dicEntry), System.IO.Stream affix = zip.getInputStream(affEntry))
+			{
+			  Dictionary dic = new Dictionary(affix, dictionary);
+			  Console.WriteLine(tests[i] + "\t" + RamUsageEstimator.humanSizeOf(dic) + "\t(" + "words=" + RamUsageEstimator.humanSizeOf(dic.words) + ", " + "flags=" + RamUsageEstimator.humanSizeOf(dic.flagLookup) + ", " + "strips=" + RamUsageEstimator.humanSizeOf(dic.stripData) + ", " + "conditions=" + RamUsageEstimator.humanSizeOf(dic.patterns) + ", " + "affixData=" + RamUsageEstimator.humanSizeOf(dic.affixData) + ", " + "prefixes=" + RamUsageEstimator.humanSizeOf(dic.prefixes) + ", " + "suffixes=" + RamUsageEstimator.humanSizeOf(dic.suffixes) + ")");
+			}
+		  }
+		}
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testOneDictionary() throws Exception
+	  public virtual void testOneDictionary()
+	  {
+		string toTest = "hungarian_dictionary-1.6.1.1-fx+tb+sm+fn.xpi";
+		for (int i = 0; i < tests.Length; i++)
+		{
+		  if (tests[i].Equals(toTest))
+		  {
+			File f = new File(DICTIONARY_HOME, tests[i]);
+			Debug.Assert(f.exists());
+
+			using (ZipFile zip = new ZipFile(f, StandardCharsets.UTF_8))
+			{
+			  ZipEntry dicEntry = zip.getEntry(tests[i + 1]);
+			  Debug.Assert(dicEntry != null);
+			  ZipEntry affEntry = zip.getEntry(tests[i + 2]);
+			  Debug.Assert(affEntry != null);
+
+			  using (System.IO.Stream dictionary = zip.getInputStream(dicEntry), System.IO.Stream affix = zip.getInputStream(affEntry))
+			  {
+				new Dictionary(affix, dictionary);
+			  }
+			}
+		  }
+		}
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs
new file mode 100644
index 0000000..1a84783
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCaseInsensitive.cs
@@ -0,0 +1,90 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestCaseInsensitive : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init(true, "simple.aff", "mixedcase.dic");
+	  }
+
+	  public virtual void testCaseInsensitivity()
+	  {
+		assertStemsTo("lucene", "lucene", "lucen");
+		assertStemsTo("LuCeNe", "lucene", "lucen");
+		assertStemsTo("mahoute", "mahout");
+		assertStemsTo("MaHoUte", "mahout");
+	  }
+
+	  public virtual void testSimplePrefix()
+	  {
+		assertStemsTo("solr", "olr");
+	  }
+
+	  public virtual void testRecursiveSuffix()
+	  {
+		// we should not recurse here! as the suffix has no continuation!
+		assertStemsTo("abcd");
+	  }
+
+	  // all forms unmunched from dictionary
+	  public virtual void testAllStems()
+	  {
+		assertStemsTo("ab", "ab");
+		assertStemsTo("abc", "ab");
+		assertStemsTo("apach", "apach");
+		assertStemsTo("apache", "apach");
+		assertStemsTo("foo", "foo", "foo");
+		assertStemsTo("food", "foo");
+		assertStemsTo("foos", "foo");
+		assertStemsTo("lucen", "lucen");
+		assertStemsTo("lucene", "lucen", "lucene");
+		assertStemsTo("mahout", "mahout");
+		assertStemsTo("mahoute", "mahout");
+		assertStemsTo("moo", "moo");
+		assertStemsTo("mood", "moo");
+		assertStemsTo("olr", "olr");
+		assertStemsTo("solr", "olr");
+	  }
+
+	  // some bogus stuff that should not stem (empty lists)!
+	  public virtual void testBogusStems()
+	  {
+		assertStemsTo("abs");
+		assertStemsTo("abe");
+		assertStemsTo("sab");
+		assertStemsTo("sapach");
+		assertStemsTo("sapache");
+		assertStemsTo("apachee");
+		assertStemsTo("sfoo");
+		assertStemsTo("sfoos");
+		assertStemsTo("fooss");
+		assertStemsTo("lucenee");
+		assertStemsTo("solre");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs
new file mode 100644
index 0000000..0fd32a8
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCircumfix.cs
@@ -0,0 +1,46 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestCircumfix : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("circumfix.aff", "circumfix.dic");
+	  }
+
+	  public virtual void testCircumfix()
+	  {
+		assertStemsTo("nagy", "nagy");
+		assertStemsTo("nagyobb", "nagy");
+		assertStemsTo("legnagyobb", "nagy");
+		assertStemsTo("legeslegnagyobb", "nagy");
+		assertStemsTo("nagyobbobb");
+		assertStemsTo("legnagy");
+		assertStemsTo("legeslegnagy");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs
new file mode 100644
index 0000000..ee892b4
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestComplexPrefix.cs
@@ -0,0 +1,47 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestComplexPrefix : StemmerTestBase
+	{
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("complexprefix.aff", "complexprefix.dic");
+	  }
+
+	  public virtual void testPrefixes()
+	  {
+		assertStemsTo("ptwofoo", "foo");
+		assertStemsTo("poneptwofoo", "foo");
+		assertStemsTo("foosuf", "foo");
+		assertStemsTo("ptwofoosuf", "foo");
+		assertStemsTo("poneptwofoosuf", "foo");
+		assertStemsTo("ponefoo");
+		assertStemsTo("ponefoosuf");
+		assertStemsTo("ptwoponefoo");
+		assertStemsTo("ptwoponefoosuf");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs
new file mode 100644
index 0000000..af1f60d
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestCondition.cs
@@ -0,0 +1,50 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestCondition : StemmerTestBase
+	{
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("condition.aff", "condition.dic");
+	  }
+
+	  public virtual void testStemming()
+	  {
+		assertStemsTo("hello", "hello");
+		assertStemsTo("try", "try");
+		assertStemsTo("tried", "try");
+		assertStemsTo("work", "work");
+		assertStemsTo("worked", "work");
+		assertStemsTo("rework", "work");
+		assertStemsTo("reworked", "work");
+		assertStemsTo("retried");
+		assertStemsTo("workied");
+		assertStemsTo("tryed");
+		assertStemsTo("tryied");
+		assertStemsTo("helloed");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs
new file mode 100644
index 0000000..0a1f209
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestConv.cs
@@ -0,0 +1,44 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	public class TestConv : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("conv.aff", "conv.dic");
+	  }
+
+	  public virtual void testConversion()
+	  {
+		assertStemsTo("drink", "drInk");
+		assertStemsTo("drInk", "drInk");
+		assertStemsTo("drInkAble", "drInk");
+		assertStemsTo("drInkABle", "drInk");
+		assertStemsTo("drinkABle", "drInk");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs
new file mode 100644
index 0000000..79a2b34
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDependencies.cs
@@ -0,0 +1,47 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestDependencies : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("dependencies.aff", "dependencies.dic");
+	  }
+
+	  public virtual void testDependencies()
+	  {
+		assertStemsTo("drink", "drink", "drink");
+		assertStemsTo("drinks", "drink", "drink");
+		assertStemsTo("drinkable", "drink");
+		assertStemsTo("drinkables", "drink");
+		assertStemsTo("undrinkable", "drink");
+		assertStemsTo("undrinkables", "drink");
+		assertStemsTo("undrink");
+		assertStemsTo("undrinks");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
new file mode 100644
index 0000000..266f4f5
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestDictionary.cs
@@ -0,0 +1,293 @@
+using System;
+using System.Text;
+
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using BytesRef = org.apache.lucene.util.BytesRef;
+	using CharsRef = org.apache.lucene.util.CharsRef;
+	using IOUtils = org.apache.lucene.util.IOUtils;
+	using IntsRef = org.apache.lucene.util.IntsRef;
+	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
+	using Builder = org.apache.lucene.util.fst.Builder;
+	using CharSequenceOutputs = org.apache.lucene.util.fst.CharSequenceOutputs;
+	using FST = org.apache.lucene.util.fst.FST;
+	using Outputs = org.apache.lucene.util.fst.Outputs;
+	using Util = org.apache.lucene.util.fst.Util;
+
+	public class TestDictionary : LuceneTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testSimpleDictionary() throws Exception
+	  public virtual void testSimpleDictionary()
+	  {
+		System.IO.Stream affixStream = this.GetType().getResourceAsStream("simple.aff");
+		System.IO.Stream dictStream = this.GetType().getResourceAsStream("simple.dic");
+
+		Dictionary dictionary = new Dictionary(affixStream, dictStream);
+		assertEquals(3, dictionary.lookupSuffix(new char[]{'e'}, 0, 1).length);
+		assertEquals(1, dictionary.lookupPrefix(new char[]{'s'}, 0, 1).length);
+		IntsRef ordList = dictionary.lookupWord(new char[]{'o', 'l', 'r'}, 0, 3);
+		assertNotNull(ordList);
+		assertEquals(1, ordList.length);
+
+		BytesRef @ref = new BytesRef();
+		dictionary.flagLookup.get(ordList.ints[0], @ref);
+		char[] flags = Dictionary.decodeFlags(@ref);
+		assertEquals(1, flags.Length);
+
+		ordList = dictionary.lookupWord(new char[]{'l', 'u', 'c', 'e', 'n'}, 0, 5);
+		assertNotNull(ordList);
+		assertEquals(1, ordList.length);
+		dictionary.flagLookup.get(ordList.ints[0], @ref);
+		flags = Dictionary.decodeFlags(@ref);
+		assertEquals(1, flags.Length);
+
+		affixStream.Close();
+		dictStream.Close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testCompressedDictionary() throws Exception
+	  public virtual void testCompressedDictionary()
+	  {
+		System.IO.Stream affixStream = this.GetType().getResourceAsStream("compressed.aff");
+		System.IO.Stream dictStream = this.GetType().getResourceAsStream("compressed.dic");
+
+		Dictionary dictionary = new Dictionary(affixStream, dictStream);
+		assertEquals(3, dictionary.lookupSuffix(new char[]{'e'}, 0, 1).length);
+		assertEquals(1, dictionary.lookupPrefix(new char[]{'s'}, 0, 1).length);
+		IntsRef ordList = dictionary.lookupWord(new char[]{'o', 'l', 'r'}, 0, 3);
+		BytesRef @ref = new BytesRef();
+		dictionary.flagLookup.get(ordList.ints[0], @ref);
+		char[] flags = Dictionary.decodeFlags(@ref);
+		assertEquals(1, flags.Length);
+
+		affixStream.Close();
+		dictStream.Close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testCompressedBeforeSetDictionary() throws Exception
+	  public virtual void testCompressedBeforeSetDictionary()
+	  {
+		System.IO.Stream affixStream = this.GetType().getResourceAsStream("compressed-before-set.aff");
+		System.IO.Stream dictStream = this.GetType().getResourceAsStream("compressed.dic");
+
+		Dictionary dictionary = new Dictionary(affixStream, dictStream);
+		assertEquals(3, dictionary.lookupSuffix(new char[]{'e'}, 0, 1).length);
+		assertEquals(1, dictionary.lookupPrefix(new char[]{'s'}, 0, 1).length);
+		IntsRef ordList = dictionary.lookupWord(new char[]{'o', 'l', 'r'}, 0, 3);
+		BytesRef @ref = new BytesRef();
+		dictionary.flagLookup.get(ordList.ints[0], @ref);
+		char[] flags = Dictionary.decodeFlags(@ref);
+		assertEquals(1, flags.Length);
+
+		affixStream.Close();
+		dictStream.Close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testCompressedEmptyAliasDictionary() throws Exception
+	  public virtual void testCompressedEmptyAliasDictionary()
+	  {
+		System.IO.Stream affixStream = this.GetType().getResourceAsStream("compressed-empty-alias.aff");
+		System.IO.Stream dictStream = this.GetType().getResourceAsStream("compressed.dic");
+
+		Dictionary dictionary = new Dictionary(affixStream, dictStream);
+		assertEquals(3, dictionary.lookupSuffix(new char[]{'e'}, 0, 1).length);
+		assertEquals(1, dictionary.lookupPrefix(new char[]{'s'}, 0, 1).length);
+		IntsRef ordList = dictionary.lookupWord(new char[]{'o', 'l', 'r'}, 0, 3);
+		BytesRef @ref = new BytesRef();
+		dictionary.flagLookup.get(ordList.ints[0], @ref);
+		char[] flags = Dictionary.decodeFlags(@ref);
+		assertEquals(1, flags.Length);
+
+		affixStream.Close();
+		dictStream.Close();
+	  }
+
+	  // malformed rule causes ParseException
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testInvalidData() throws Exception
+	  public virtual void testInvalidData()
+	  {
+		System.IO.Stream affixStream = this.GetType().getResourceAsStream("broken.aff");
+		System.IO.Stream dictStream = this.GetType().getResourceAsStream("simple.dic");
+
+		try
+		{
+		  new Dictionary(affixStream, dictStream);
+		  fail("didn't get expected exception");
+		}
+		catch (ParseException expected)
+		{
+		  assertTrue(expected.Message.startsWith("The affix file contains a rule with less than four elements"));
+		  assertEquals(24, expected.ErrorOffset);
+		}
+
+		affixStream.Close();
+		dictStream.Close();
+	  }
+
+	  // malformed flags causes ParseException
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testInvalidFlags() throws Exception
+	  public virtual void testInvalidFlags()
+	  {
+		System.IO.Stream affixStream = this.GetType().getResourceAsStream("broken-flags.aff");
+		System.IO.Stream dictStream = this.GetType().getResourceAsStream("simple.dic");
+
+		try
+		{
+		  new Dictionary(affixStream, dictStream);
+		  fail("didn't get expected exception");
+		}
+		catch (Exception expected)
+		{
+		  assertTrue(expected.Message.startsWith("expected only one flag"));
+		}
+
+		affixStream.Close();
+		dictStream.Close();
+	  }
+
+	  private class CloseCheckInputStream : FilterInputStream
+	  {
+		  private readonly TestDictionary outerInstance;
+
+		internal bool closed = false;
+
+		public CloseCheckInputStream(TestDictionary outerInstance, System.IO.Stream @delegate) : base(@delegate)
+		{
+			this.outerInstance = outerInstance;
+		}
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: @Override public void close() throws java.io.IOException
+		public override void close()
+		{
+		  this.closed = true;
+		  base.close();
+		}
+
+		public virtual bool Closed
+		{
+			get
+			{
+			  return this.closed;
+			}
+		}
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testResourceCleanup() throws Exception
+	  public virtual void testResourceCleanup()
+	  {
+		CloseCheckInputStream affixStream = new CloseCheckInputStream(this, this.GetType().getResourceAsStream("compressed.aff"));
+		CloseCheckInputStream dictStream = new CloseCheckInputStream(this, this.GetType().getResourceAsStream("compressed.dic"));
+
+		new Dictionary(affixStream, dictStream);
+
+		assertFalse(affixStream.Closed);
+		assertFalse(dictStream.Closed);
+
+		affixStream.close();
+		dictStream.close();
+
+		assertTrue(affixStream.Closed);
+		assertTrue(dictStream.Closed);
+	  }
+
+
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReplacements() throws Exception
+	  public virtual void testReplacements()
+	  {
+		Outputs<CharsRef> outputs = CharSequenceOutputs.Singleton;
+		Builder<CharsRef> builder = new Builder<CharsRef>(FST.INPUT_TYPE.BYTE2, outputs);
+		IntsRef scratchInts = new IntsRef();
+
+		// a -> b
+		Util.toUTF16("a", scratchInts);
+		builder.add(scratchInts, new CharsRef("b"));
+
+		// ab -> c
+		Util.toUTF16("ab", scratchInts);
+		builder.add(scratchInts, new CharsRef("c"));
+
+		// c -> de
+		Util.toUTF16("c", scratchInts);
+		builder.add(scratchInts, new CharsRef("de"));
+
+		// def -> gh
+		Util.toUTF16("def", scratchInts);
+		builder.add(scratchInts, new CharsRef("gh"));
+
+		FST<CharsRef> fst = builder.finish();
+
+		StringBuilder sb = new StringBuilder("atestanother");
+		Dictionary.applyMappings(fst, sb);
+		assertEquals("btestbnother", sb.ToString());
+
+		sb = new StringBuilder("abtestanother");
+		Dictionary.applyMappings(fst, sb);
+		assertEquals("ctestbnother", sb.ToString());
+
+		sb = new StringBuilder("atestabnother");
+		Dictionary.applyMappings(fst, sb);
+		assertEquals("btestcnother", sb.ToString());
+
+		sb = new StringBuilder("abtestabnother");
+		Dictionary.applyMappings(fst, sb);
+		assertEquals("ctestcnother", sb.ToString());
+
+		sb = new StringBuilder("abtestabcnother");
+		Dictionary.applyMappings(fst, sb);
+		assertEquals("ctestcdenother", sb.ToString());
+
+		sb = new StringBuilder("defdefdefc");
+		Dictionary.applyMappings(fst, sb);
+		assertEquals("ghghghde", sb.ToString());
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testSetWithCrazyWhitespaceAndBOMs() throws Exception
+	  public virtual void testSetWithCrazyWhitespaceAndBOMs()
+	  {
+		assertEquals("UTF-8", Dictionary.getDictionaryEncoding(new ByteArrayInputStream("SET\tUTF-8\n".GetBytes(StandardCharsets.UTF_8))));
+		assertEquals("UTF-8", Dictionary.getDictionaryEncoding(new ByteArrayInputStream("SET\t UTF-8\n".GetBytes(StandardCharsets.UTF_8))));
+		assertEquals("UTF-8", Dictionary.getDictionaryEncoding(new ByteArrayInputStream("\uFEFFSET\tUTF-8\n".GetBytes(StandardCharsets.UTF_8))));
+		assertEquals("UTF-8", Dictionary.getDictionaryEncoding(new ByteArrayInputStream("\uFEFFSET\tUTF-8\r\n".GetBytes(StandardCharsets.UTF_8))));
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFlagWithCrazyWhitespace() throws Exception
+	  public virtual void testFlagWithCrazyWhitespace()
+	  {
+		assertNotNull(Dictionary.getFlagParsingStrategy("FLAG\tUTF-8"));
+		assertNotNull(Dictionary.getFlagParsingStrategy("FLAG    UTF-8"));
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs
new file mode 100644
index 0000000..1a50fe4
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestEscaped.cs
@@ -0,0 +1,44 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestEscaped : StemmerTestBase
+	{
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("escaped.aff", "escaped.dic");
+	  }
+
+	  public virtual void testStemming()
+	  {
+		assertStemsTo("works", "work");
+		assertStemsTo("work", "work");
+		assertStemsTo("R2/D2", "R2/D2");
+		assertStemsTo("R2/D2s", "R2/D2");
+		assertStemsTo("N/A", "N/A");
+		assertStemsTo("N/As");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs
new file mode 100644
index 0000000..c94e5fb
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagLong.cs
@@ -0,0 +1,41 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestFlagLong : StemmerTestBase
+	{
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("flaglong.aff", "flaglong.dic");
+	  }
+
+	  public virtual void testLongFlags()
+	  {
+		assertStemsTo("foo", "foo");
+		assertStemsTo("foos", "foo");
+		assertStemsTo("fooss");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs
new file mode 100644
index 0000000..4873fc7
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestFlagNum.cs
@@ -0,0 +1,41 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestFlagNum : StemmerTestBase
+	{
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("flagnum.aff", "flagnum.dic");
+	  }
+
+	  public virtual void testNumFlags()
+	  {
+		assertStemsTo("foo", "foo");
+		assertStemsTo("foos", "foo");
+		assertStemsTo("fooss");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs
new file mode 100644
index 0000000..11bb494
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHomonyms.cs
@@ -0,0 +1,40 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestHomonyms : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("homonyms.aff", "homonyms.dic");
+	  }
+
+	  public virtual void testExamples()
+	  {
+		assertStemsTo("works", "work", "work");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs
new file mode 100644
index 0000000..6c3e22b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilter.cs
@@ -0,0 +1,178 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using KeywordTokenizer = org.apache.lucene.analysis.core.KeywordTokenizer;
+	using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
+	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+	using IOUtils = org.apache.lucene.util.IOUtils;
+	using AfterClass = org.junit.AfterClass;
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestHunspellStemFilter : BaseTokenStreamTestCase
+	{
+	  private static Dictionary dictionary;
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		System.IO.Stream affixStream = typeof(TestStemmer).getResourceAsStream("simple.aff");
+		System.IO.Stream dictStream = typeof(TestStemmer).getResourceAsStream("simple.dic");
+		try
+		{
+		  dictionary = new Dictionary(affixStream, dictStream);
+		}
+		finally
+		{
+		  IOUtils.closeWhileHandlingException(affixStream, dictStream);
+		}
+	  }
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @AfterClass public static void afterClass()
+	  public static void afterClass()
+	  {
+		dictionary = null;
+	  }
+
+	  /// <summary>
+	  /// Simple test for KeywordAttribute </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testKeywordAttribute() throws java.io.IOException
+	  public virtual void testKeywordAttribute()
+	  {
+		MockTokenizer tokenizer = new MockTokenizer(new StringReader("lucene is awesome"));
+		tokenizer.EnableChecks = true;
+		HunspellStemFilter filter = new HunspellStemFilter(tokenizer, dictionary);
+		assertTokenStreamContents(filter, new string[]{"lucene", "lucen", "is", "awesome"}, new int[] {1, 0, 1, 1});
+
+		// assert with keyword marker
+		tokenizer = new MockTokenizer(new StringReader("lucene is awesome"));
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, Arrays.asList("Lucene"), true);
+		filter = new HunspellStemFilter(new SetKeywordMarkerFilter(tokenizer, set), dictionary);
+		assertTokenStreamContents(filter, new string[]{"lucene", "is", "awesome"}, new int[] {1, 1, 1});
+	  }
+
+	  /// <summary>
+	  /// simple test for longestOnly option </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testLongestOnly() throws java.io.IOException
+	  public virtual void testLongestOnly()
+	  {
+		MockTokenizer tokenizer = new MockTokenizer(new StringReader("lucene is awesome"));
+		tokenizer.EnableChecks = true;
+		HunspellStemFilter filter = new HunspellStemFilter(tokenizer, dictionary, true, true);
+		assertTokenStreamContents(filter, new string[]{"lucene", "is", "awesome"}, new int[] {1, 1, 1});
+	  }
+
+	  /// <summary>
+	  /// blast some random strings through the analyzer </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testRandomStrings() throws Exception
+	  public virtual void testRandomStrings()
+	  {
+		Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper(this);
+		checkRandomData(random(), analyzer, 1000 * RANDOM_MULTIPLIER);
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  private readonly TestHunspellStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper(TestHunspellStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+			return new TokenStreamComponents(tokenizer, new HunspellStemFilter(tokenizer, dictionary));
+		  }
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testEmptyTerm() throws java.io.IOException
+	  public virtual void testEmptyTerm()
+	  {
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper2(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper2 : Analyzer
+	  {
+		  private readonly TestHunspellStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper2(TestHunspellStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new HunspellStemFilter(tokenizer, dictionary));
+		  }
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testIgnoreCaseNoSideEffects() throws Exception
+	  public virtual void testIgnoreCaseNoSideEffects()
+	  {
+//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
+//ORIGINAL LINE: final org.apache.lucene.analysis.hunspell.Dictionary d;
+		Dictionary d;
+		System.IO.Stream affixStream = typeof(TestStemmer).getResourceAsStream("simple.aff");
+		System.IO.Stream dictStream = typeof(TestStemmer).getResourceAsStream("simple.dic");
+		try
+		{
+		  d = new Dictionary(affixStream, Collections.singletonList(dictStream), true);
+		}
+		finally
+		{
+		  IOUtils.closeWhileHandlingException(affixStream, dictStream);
+		}
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper3(this, d);
+		checkOneTerm(a, "NoChAnGy", "NoChAnGy");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper3 : Analyzer
+	  {
+		  private readonly TestHunspellStemFilter outerInstance;
+
+		  private Dictionary d;
+
+		  public AnalyzerAnonymousInnerClassHelper3(TestHunspellStemFilter outerInstance, Dictionary d)
+		  {
+			  this.outerInstance = outerInstance;
+			  this.d = d;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new HunspellStemFilter(tokenizer, d));
+		  }
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilterFactory.cs
new file mode 100644
index 0000000..2073e7b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestHunspellStemFilterFactory.cs
@@ -0,0 +1,57 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+
+	using BaseTokenStreamFactoryTestCase = org.apache.lucene.analysis.util.BaseTokenStreamFactoryTestCase;
+
+	/// <summary>
+	/// Simple tests to ensure the Hunspell stemmer loads from factory
+	/// </summary>
+	public class TestHunspellStemFilterFactory : BaseTokenStreamFactoryTestCase
+	{
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStemming() throws Exception
+	  public virtual void testStemming()
+	  {
+		Reader reader = new StringReader("abc");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("HunspellStem", "dictionary", "simple.dic", "affix", "simple.aff").create(stream);
+		assertTokenStreamContents(stream, new string[] {"ab"});
+	  }
+
+	  /// <summary>
+	  /// Test that bogus arguments result in exception </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testBogusArguments() throws Exception
+	  public virtual void testBogusArguments()
+	  {
+		try
+		{
+		  tokenFilterFactory("HunspellStem", "dictionary", "simple.dic", "bogusArg", "bogusValue");
+		  fail();
+		}
+		catch (System.ArgumentException expected)
+		{
+		  assertTrue(expected.Message.contains("Unknown parameters"));
+		}
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs
new file mode 100644
index 0000000..77f5b84
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestIgnore.cs
@@ -0,0 +1,44 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestIgnore : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("ignore.aff", "ignore.dic");
+	  }
+
+	  public virtual void testExamples()
+	  {
+		assertStemsTo("drink", "drink");
+		assertStemsTo("drinkable", "drink");
+		assertStemsTo("dr'ink-able", "drink");
+		assertStemsTo("drank-able", "drank");
+		assertStemsTo("'-'-'-");
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs
new file mode 100644
index 0000000..20a1d77
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestMorph.cs
@@ -0,0 +1,42 @@
+namespace org.apache.lucene.analysis.hunspell
+{
+
+	/*
+	 * Licensed to the Apache Software Foundation (ASF) under one or more
+	 * contributor license agreements.  See the NOTICE file distributed with
+	 * this work for additional information regarding copyright ownership.
+	 * The ASF licenses this file to You under the Apache License, Version 2.0
+	 * (the "License"); you may not use this file except in compliance with
+	 * the License.  You may obtain a copy of the License at
+	 *
+	 *     http://www.apache.org/licenses/LICENSE-2.0
+	 *
+	 * Unless required by applicable law or agreed to in writing, software
+	 * distributed under the License is distributed on an "AS IS" BASIS,
+	 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+	 * See the License for the specific language governing permissions and
+	 * limitations under the License.
+	 */
+
+	using BeforeClass = org.junit.BeforeClass;
+
+	public class TestMorph : StemmerTestBase
+	{
+
+//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
+//ORIGINAL LINE: @BeforeClass public static void beforeClass() throws Exception
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+	  public static void beforeClass()
+	  {
+		init("morph.aff", "morph.dic");
+	  }
+
+	  public virtual void testExamples()
+	  {
+		assertStemsTo("drink", "drink");
+		assertStemsTo("drinkable", "drink");
+		assertStemsTo("drinkableable");
+	  }
+	}
+
+}
\ No newline at end of file