lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [26/27] lucenenet git commit: adding converted analysis common tests
Date Thu, 10 Dec 2015 18:39:15 GMT
adding converted analysis common tests


Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/c64856a7
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/c64856a7
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/c64856a7

Branch: refs/heads/master
Commit: c64856a7ba290b2cbd2129c1c33bb9cd39d6a938
Parents: 812e1c5
Author: Laimonas Simutis <laimis@gmail.com>
Authored: Sun Dec 6 08:31:22 2015 -0500
Committer: Laimonas Simutis <laimis@gmail.com>
Committed: Sun Dec 6 08:31:22 2015 -0500

----------------------------------------------------------------------
 .../Analysis/Ar/TestArabicAnalyzer.cs           |  122 +
 .../Analysis/Ar/TestArabicFilters.cs            |  131 +
 .../Analysis/Ar/TestArabicLetterTokenizer.cs    |   52 +
 .../Ar/TestArabicNormalizationFilter.cs         |  164 +
 .../Analysis/Ar/TestArabicStemFilter.cs         |  227 +
 .../Analysis/Bg/TestBulgarianAnalyzer.cs        |  100 +
 .../Bg/TestBulgarianStemFilterFactory.cs        |   60 +
 .../Analysis/Bg/TestBulgarianStemmer.cs         |  266 ++
 .../Br/TestBrazilianStemFilterFactory.cs        |   60 +
 .../Analysis/Br/TestBrazilianStemmer.cs         |  212 +
 .../Analysis/Ca/TestCatalanAnalyzer.cs          |   80 +
 .../Charfilter/HTMLStripCharFilterTest.cs       |  570 +++
 .../TestHTMLStripCharFilterFactory.cs           |  121 +
 .../Charfilter/TestMappingCharFilter.cs         |  636 +++
 .../Charfilter/TestMappingCharFilterFactory.cs  |   82 +
 .../Analysis/Cjk/TestCJKAnalyzer.cs             |  289 ++
 .../Analysis/Cjk/TestCJKBigramFilter.cs         |  171 +
 .../Analysis/Cjk/TestCJKBigramFilterFactory.cs  |   77 +
 .../Analysis/Cjk/TestCJKTokenizer.cs            |  240 +
 .../Analysis/Cjk/TestCJKTokenizerFactory.cs     |   62 +
 .../Analysis/Cjk/TestCJKWidthFilter.cs          |  100 +
 .../Analysis/Cjk/TestCJKWidthFilterFactory.cs   |   57 +
 .../Analysis/Ckb/TestSoraniAnalyzer.cs          |   82 +
 .../Ckb/TestSoraniNormalizationFilter.cs        |  122 +
 .../Ckb/TestSoraniNormalizationFilterFactory.cs |   58 +
 .../Analysis/Ckb/TestSoraniStemFilter.cs        |  144 +
 .../Analysis/Ckb/TestSoraniStemFilterFactory.cs |   58 +
 .../Analysis/Cn/TestChineseFilterFactory.cs     |   60 +
 .../Analysis/Cn/TestChineseTokenizer.cs         |  151 +
 .../Analysis/Cn/TestChineseTokenizerFactory.cs  |   59 +
 .../Commongrams/CommonGramsFilterTest.cs        |  346 ++
 .../Commongrams/TestCommonGramsFilterFactory.cs |  101 +
 .../TestCommonGramsQueryFilterFactory.cs        |  101 +
 .../Compound/TestCompoundWordTokenFilter.cs     |  412 ++
 ...tDictionaryCompoundWordTokenFilterFactory.cs |   60 +
 ...HyphenationCompoundWordTokenFilterFactory.cs |   77 +
 .../Core/TestAllAnalyzersHaveFactories.cs       |  193 +
 .../Analysis/Core/TestAnalyzers.cs              |  314 ++
 .../Analysis/Core/TestBugInSomething.cs         |  383 ++
 .../Analysis/Core/TestClassicAnalyzer.cs        |  395 ++
 .../Analysis/Core/TestDuelingAnalyzers.cs       |  302 ++
 .../Analysis/Core/TestFactories.cs              |  263 ++
 .../Analysis/Core/TestKeywordAnalyzer.cs        |  143 +
 .../Analysis/Core/TestRandomChains.cs           | 1587 +++++++
 .../Analysis/Core/TestStandardAnalyzer.cs       |  453 ++
 .../Analysis/Core/TestStopAnalyzer.cs           |  134 +
 .../Analysis/Core/TestStopFilter.cs             |  243 +
 .../Analysis/Core/TestStopFilterFactory.cs      |  116 +
 .../Analysis/Core/TestTypeTokenFilter.cs        |  121 +
 .../Analysis/Core/TestTypeTokenFilterFactory.cs |  102 +
 .../Analysis/Core/TestUAX29URLEmailAnalyzer.cs  |  361 ++
 .../Analysis/Core/TestUAX29URLEmailTokenizer.cs |  737 ++++
 .../Analysis/Core/WordBreakTestUnicode_6_3_0.cs | 4171 ++++++++++++++++++
 .../Analysis/Cz/TestCzechAnalyzer.cs            |   91 +
 .../Analysis/Cz/TestCzechStemFilterFactory.cs   |   60 +
 .../Analysis/Cz/TestCzechStemmer.cs             |  333 ++
 .../Analysis/Da/TestDanishAnalyzer.cs           |   70 +
 .../Analysis/De/TestGermanAnalyzer.cs           |   85 +
 .../Analysis/De/TestGermanLightStemFilter.cs    |  123 +
 .../De/TestGermanLightStemFilterFactory.cs      |   57 +
 .../Analysis/De/TestGermanMinimalStemFilter.cs  |  139 +
 .../De/TestGermanMinimalStemFilterFactory.cs    |   57 +
 .../De/TestGermanNormalizationFilter.cs         |  114 +
 .../De/TestGermanNormalizationFilterFactory.cs  |   57 +
 .../Analysis/De/TestGermanStemFilter.cs         |  136 +
 .../Analysis/De/TestGermanStemFilterFactory.cs  |   60 +
 .../Analysis/El/GreekAnalyzerTest.cs            |   98 +
 .../El/TestGreekLowerCaseFilterFactory.cs       |   60 +
 .../Analysis/El/TestGreekStemFilterFactory.cs   |   58 +
 .../Analysis/El/TestGreekStemmer.cs             |  571 +++
 .../Analysis/En/TestEnglishAnalyzer.cs          |   74 +
 .../Analysis/En/TestEnglishMinimalStemFilter.cs |   95 +
 .../En/TestEnglishMinimalStemFilterFactory.cs   |   57 +
 .../Analysis/En/TestKStemFilterFactory.cs       |   57 +
 .../Analysis/En/TestKStemmer.cs                 |  124 +
 .../Analysis/En/TestPorterStemFilter.cs         |  105 +
 .../Analysis/En/TestPorterStemFilterFactory.cs  |   60 +
 .../Analysis/Es/TestSpanishAnalyzer.cs          |   70 +
 .../Analysis/Es/TestSpanishLightStemFilter.cs   |   90 +
 .../Es/TestSpanishLightStemFilterFactory.cs     |   57 +
 .../Analysis/Eu/TestBasqueAnalyzer.cs           |   70 +
 .../Analysis/Fa/TestPersianAnalyzer.cs          |  252 ++
 .../Analysis/Fa/TestPersianCharFilter.cs        |   60 +
 .../Fa/TestPersianNormalizationFilter.cs        |  110 +
 .../Fa/TestPersianNormalizationFilterFactory.cs |   60 +
 .../Analysis/Fi/TestFinnishAnalyzer.cs          |   70 +
 .../Analysis/Fi/TestFinnishLightStemFilter.cs   |  123 +
 .../Fi/TestFinnishLightStemFilterFactory.cs     |   57 +
 .../Analysis/Fr/TestFrenchAnalyzer.cs           |  202 +
 .../Analysis/Fr/TestFrenchLightStemFilter.cs    |  257 ++
 .../Fr/TestFrenchLightStemFilterFactory.cs      |   57 +
 .../Analysis/Fr/TestFrenchMinimalStemFilter.cs  |  141 +
 .../Fr/TestFrenchMinimalStemFilterFactory.cs    |   57 +
 .../Analysis/Ga/TestIrishAnalyzer.cs            |   90 +
 .../Analysis/Ga/TestIrishLowerCaseFilter.cs     |   67 +
 .../Ga/TestIrishLowerCaseFilterFactory.cs       |   57 +
 .../Analysis/Gl/TestGalicianAnalyzer.cs         |   70 +
 .../Gl/TestGalicianMinimalStemFilter.cs         |  129 +
 .../Gl/TestGalicianMinimalStemFilterFactory.cs  |   57 +
 .../Analysis/Gl/TestGalicianStemFilter.cs       |   85 +
 .../Gl/TestGalicianStemFilterFactory.cs         |   57 +
 .../Analysis/Hi/TestHindiAnalyzer.cs            |   66 +
 .../Analysis/Hi/TestHindiFilters.cs             |  109 +
 .../Analysis/Hi/TestHindiNormalizer.cs          |   98 +
 .../Analysis/Hi/TestHindiStemmer.cs             |  126 +
 .../Analysis/Hu/TestHungarianAnalyzer.cs        |   70 +
 .../Analysis/Hu/TestHungarianLightStemFilter.cs |  114 +
 .../Hu/TestHungarianLightStemFilterFactory.cs   |   57 +
 .../Analysis/Hunspell/StemmerTestBase.cs        |   95 +
 .../Analysis/Hunspell/TestAllDictionaries.cs    |   99 +
 .../Analysis/Hunspell/TestAllDictionaries2.cs   |   99 +
 .../Analysis/Hunspell/TestCaseInsensitive.cs    |   90 +
 .../Analysis/Hunspell/TestCircumfix.cs          |   46 +
 .../Analysis/Hunspell/TestComplexPrefix.cs      |   47 +
 .../Analysis/Hunspell/TestCondition.cs          |   50 +
 .../Analysis/Hunspell/TestConv.cs               |   44 +
 .../Analysis/Hunspell/TestDependencies.cs       |   47 +
 .../Analysis/Hunspell/TestDictionary.cs         |  293 ++
 .../Analysis/Hunspell/TestEscaped.cs            |   44 +
 .../Analysis/Hunspell/TestFlagLong.cs           |   41 +
 .../Analysis/Hunspell/TestFlagNum.cs            |   41 +
 .../Analysis/Hunspell/TestHomonyms.cs           |   40 +
 .../Analysis/Hunspell/TestHunspellStemFilter.cs |  178 +
 .../Hunspell/TestHunspellStemFilterFactory.cs   |   57 +
 .../Analysis/Hunspell/TestIgnore.cs             |   44 +
 .../Analysis/Hunspell/TestMorph.cs              |   42 +
 .../Analysis/Hunspell/TestOptionalCondition.cs  |   50 +
 .../Analysis/Hunspell/TestStemmer.cs            |   88 +
 .../Analysis/Hunspell/TestTwoFold.cs            |   45 +
 .../Analysis/Hunspell/TestTwoSuffixes.cs        |   44 +
 .../Analysis/Hy/TestArmenianAnalyzer.cs         |   70 +
 .../Analysis/Id/TestIndonesianAnalyzer.cs       |   70 +
 .../Id/TestIndonesianStemFilterFactory.cs       |   73 +
 .../Analysis/Id/TestIndonesianStemmer.cs        |  187 +
 .../Analysis/In/TestIndicNormalizer.cs          |   80 +
 .../Analysis/It/TestItalianAnalyzer.cs          |   94 +
 .../Analysis/It/TestItalianLightStemFilter.cs   |   90 +
 .../It/TestItalianLightStemFilterFactory.cs     |   57 +
 .../Analysis/Lv/TestLatvianAnalyzer.cs          |   70 +
 .../Analysis/Lv/TestLatvianStemFilterFactory.cs |   57 +
 .../Analysis/Lv/TestLatvianStemmer.cs           |  328 ++
 .../Miscellaneous/PatternAnalyzerTest.cs        |  214 +
 .../Miscellaneous/TestASCIIFoldingFilter.cs     |  284 ++
 .../Miscellaneous/TestCapitalizationFilter.cs   |  177 +
 .../TestCapitalizationFilterFactory.cs          |  308 ++
 .../Miscellaneous/TestCodepointCountFilter.cs   |   99 +
 .../TestCodepointCountFilterFactory.cs          |   73 +
 .../Miscellaneous/TestEmptyTokenStream.cs       |   82 +
 .../Miscellaneous/TestHyphenatedWordsFilter.cs  |  117 +
 .../Miscellaneous/TestKeepFilterFactory.cs      |   63 +
 .../Miscellaneous/TestKeepWordFilter.cs         |  102 +
 .../Miscellaneous/TestKeywordMarkerFilter.cs    |  110 +
 .../TestKeywordMarkerFilterFactory.cs           |  115 +
 .../Miscellaneous/TestKeywordRepeatFilter.cs    |   48 +
 .../Analysis/Miscellaneous/TestLengthFilter.cs  |   86 +
 .../Miscellaneous/TestLengthFilterFactory.cs    |   85 +
 .../TestLimitTokenCountAnalyzer.cs              |  103 +
 .../Miscellaneous/TestLimitTokenCountFilter.cs  |   48 +
 .../TestLimitTokenCountFilterFactory.cs         |   79 +
 .../TestLimitTokenPositionFilter.cs             |  104 +
 .../TestLimitTokenPositionFilterFactory.cs      |  105 +
 .../TestLucene47WordDelimiterFilter.cs          |  446 ++
 .../TestPerFieldAnalyzerWrapper.cs              |  110 +
 .../TestPrefixAndSuffixAwareTokenFilter.cs      |   42 +
 .../Miscellaneous/TestPrefixAwareTokenFilter.cs |   50 +
 .../TestRemoveDuplicatesTokenFilter.cs          |  231 +
 .../TestRemoveDuplicatesTokenFilterFactory.cs   |   70 +
 .../TestScandinavianFoldingFilter.cs            |  155 +
 .../TestScandinavianFoldingFilterFactory.cs     |   53 +
 .../TestScandinavianNormalizationFilter.cs      |  154 +
 ...estScandinavianNormalizationFilterFactory.cs |   53 +
 .../Miscellaneous/TestSingleTokenTokenFilter.cs |   52 +
 .../Miscellaneous/TestStemmerOverrideFilter.cs  |  157 +
 .../TestStemmerOverrideFilterFactory.cs         |   73 +
 .../Analysis/Miscellaneous/TestTrimFilter.cs    |  180 +
 .../Miscellaneous/TestTrimFilterFactory.cs      |   57 +
 .../Miscellaneous/TestTruncateTokenFilter.cs    |   47 +
 .../TestTruncateTokenFilterFactory.cs           |   81 +
 .../Miscellaneous/TestWordDelimiterFilter.cs    |  568 +++
 .../Analysis/Ngram/EdgeNGramTokenFilterTest.cs  |  407 ++
 .../Analysis/Ngram/EdgeNGramTokenizerTest.cs    |  329 ++
 .../Analysis/Ngram/NGramTokenFilterTest.cs      |  288 ++
 .../Analysis/Ngram/NGramTokenizerTest.cs        |  386 ++
 .../Analysis/Ngram/TestNGramFilters.cs          |  203 +
 .../Analysis/Nl/TestDutchStemmer.cs             |  255 ++
 .../Analysis/No/TestNorwegianAnalyzer.cs        |   70 +
 .../Analysis/No/TestNorwegianLightStemFilter.cs |  157 +
 .../No/TestNorwegianLightStemFilterFactory.cs   |   81 +
 .../No/TestNorwegianMinimalStemFilter.cs        |  156 +
 .../No/TestNorwegianMinimalStemFilterFactory.cs |   81 +
 .../Analysis/Path/TestPathHierarchyTokenizer.cs |  223 +
 .../Path/TestReversePathHierarchyTokenizer.cs   |  191 +
 .../TestPatternCaptureGroupTokenFilter.cs       |  231 +
 .../Pattern/TestPatternReplaceCharFilter.cs     |  313 ++
 .../TestPatternReplaceCharFilterFactory.cs      |   86 +
 .../Pattern/TestPatternReplaceFilter.cs         |  145 +
 .../Pattern/TestPatternReplaceFilterFactory.cs  |   59 +
 .../Analysis/Pattern/TestPatternTokenizer.cs    |  170 +
 .../Pattern/TestPatternTokenizerFactory.cs      |   58 +
 .../Payloads/DelimitedPayloadTokenFilterTest.cs |  173 +
 .../Payloads/NumericPayloadTokenFilterTest.cs   |   93 +
 .../TestDelimitedPayloadTokenFilterFactory.cs   |   90 +
 .../TokenOffsetPayloadTokenFilterTest.cs        |   56 +
 .../Payloads/TypeAsPayloadTokenFilterTest.cs    |   81 +
 .../Analysis/Position/PositionFilterTest.cs     |  112 +
 .../Analysis/Pt/TestPortugueseAnalyzer.cs       |   70 +
 .../Pt/TestPortugueseLightStemFilter.cs         |  167 +
 .../Pt/TestPortugueseLightStemFilterFactory.cs  |   57 +
 .../Pt/TestPortugueseMinimalStemFilter.cs       |  138 +
 .../TestPortugueseMinimalStemFilterFactory.cs   |   57 +
 .../Analysis/Pt/TestPortugueseStemFilter.cs     |  137 +
 .../Pt/TestPortugueseStemFilterFactory.cs       |   57 +
 .../Query/QueryAutoStopWordAnalyzerTest.cs      |  165 +
 .../Analysis/Reverse/TestReverseStringFilter.cs |  169 +
 .../Reverse/TestReverseStringFilterFactory.cs   |   60 +
 .../Analysis/Ro/TestRomanianAnalyzer.cs         |   70 +
 .../Analysis/Ru/TestRussianAnalyzer.cs          |   85 +
 .../Analysis/Ru/TestRussianFilters.cs           |   59 +
 .../Analysis/Ru/TestRussianLetterTokenizer.cs   |   52 +
 .../Analysis/Ru/TestRussianLightStemFilter.cs   |  123 +
 .../Ru/TestRussianLightStemFilterFactory.cs     |   57 +
 .../Shingle/ShingleAnalyzerWrapperTest.cs       |  276 ++
 .../Analysis/Shingle/ShingleFilterTest.cs       |  716 +++
 .../Shingle/TestShingleFilterFactory.cs         |  224 +
 .../Sinks/DateRecognizerSinkTokenizerTest.cs    |   52 +
 .../Analysis/Sinks/TestTeeSinkTokenFilter.cs    |  357 ++
 .../Sinks/TokenRangeSinkTokenizerTest.cs        |   62 +
 .../Sinks/TokenTypeSinkTokenizerTest.cs         |   95 +
 .../Analysis/Snowball/TestSnowball.cs           |  232 +
 .../Snowball/TestSnowballPorterFilterFactory.cs |   82 +
 .../Analysis/Snowball/TestSnowballVocab.cs      |  106 +
 .../Analysis/Standard/TestStandardFactories.cs  |  249 ++
 .../TestUAX29URLEmailTokenizerFactory.cs        |  169 +
 .../Analysis/Sv/TestSwedishAnalyzer.cs          |   70 +
 .../Analysis/Sv/TestSwedishLightStemFilter.cs   |  123 +
 .../Sv/TestSwedishLightStemFilterFactory.cs     |   57 +
 .../Analysis/Synonym/TestMultiWordSynonyms.cs   |   62 +
 .../Analysis/Synonym/TestSlowSynonymFilter.cs   |  387 ++
 .../Analysis/Synonym/TestSolrSynonymParser.cs   |  177 +
 .../Synonym/TestSynonymFilterFactory.cs         |  216 +
 .../Analysis/Synonym/TestSynonymMap.cs          |  363 ++
 .../Analysis/Synonym/TestSynonymMapFilter.cs    | 1350 ++++++
 .../Synonym/TestWordnetSynonymParser.cs         |   70 +
 .../Analysis/Th/TestThaiAnalyzer.cs             |  183 +
 .../Analysis/Th/TestThaiTokenizerFactory.cs     |   59 +
 .../Analysis/Th/TestThaiWordFilterFactory.cs    |   65 +
 .../Analysis/Tr/TestApostropheFilter.cs         |   37 +
 .../Analysis/Tr/TestApostropheFilterFactory.cs  |   62 +
 .../Analysis/Tr/TestTurkishAnalyzer.cs          |   73 +
 .../Analysis/Tr/TestTurkishLowerCaseFilter.cs   |  102 +
 .../Tr/TestTurkishLowerCaseFilterFactory.cs     |   60 +
 .../Util/BaseTokenStreamFactoryTestCase.cs      |  186 +
 .../Analysis/Util/StringMockResourceLoader.cs   |   74 +
 .../Analysis/Util/TestAnalysisSPILoader.cs      |  256 ++
 .../Analysis/Util/TestCharArrayIterator.cs      |  181 +
 .../Analysis/Util/TestCharArrayMap.cs           |  288 ++
 .../Analysis/Util/TestCharArraySet.cs           |  593 +++
 .../Analysis/Util/TestCharTokenizers.cs         |  268 ++
 .../Analysis/Util/TestCharacterUtils.cs         |  290 ++
 .../Analysis/Util/TestElision.cs                |   89 +
 .../Analysis/Util/TestElisionFilterFactory.cs   |   85 +
 .../Util/TestFilesystemResourceLoader.cs        |  121 +
 .../Analysis/Util/TestRollingCharBuffer.cs      |  136 +
 .../Util/TestSegmentingTokenizerBase.cs         |  251 ++
 .../Analysis/Util/TestWordlistLoader.cs         |   79 +
 .../Wikipedia/TestWikipediaTokenizerFactory.cs  |   56 +
 .../Wikipedia/WikipediaTokenizerTest.cs         |  180 +
 .../Collation/TestCollationKeyAnalyzer.cs       |  126 +
 .../Collation/TestCollationKeyFilter.cs         |  125 +
 .../Collation/TestCollationKeyFilterFactory.cs  |  152 +
 .../DateTimeHelperClass.cs                      |   15 +
 .../HashMapHelperClass.cs                       |   26 +
 .../StringHelperClass.cs                        |   90 +
 273 files changed, 45055 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicAnalyzer.cs
new file mode 100644
index 0000000..6f9118b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicAnalyzer.cs
@@ -0,0 +1,122 @@
+namespace org.apache.lucene.analysis.ar
+{
+
+	/*
+	 * 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 CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+
+	/// <summary>
+	/// Test the Arabic Analyzer
+	/// 
+	/// </summary>
+	public class TestArabicAnalyzer : BaseTokenStreamTestCase
+	{
+
+	  /// <summary>
+	  /// This test fails with NPE when the 
+	  /// stopwords file is missing in classpath 
+	  /// </summary>
+	  public virtual void testResourcesAvailable()
+	  {
+		new ArabicAnalyzer(TEST_VERSION_CURRENT);
+	  }
+
+	  /// <summary>
+	  /// Some simple tests showing some features of the analyzer, how some regular forms will conflate
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testBasicFeatures() throws Exception
+	  public virtual void testBasicFeatures()
+	  {
+		ArabicAnalyzer a = new ArabicAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "كبير", new string[] {"كبير"});
+		assertAnalyzesTo(a, "كبيرة", new string[] {"كبير"}); // feminine marker
+
+		assertAnalyzesTo(a, "مشروب", new string[] {"مشروب"});
+		assertAnalyzesTo(a, "مشروبات", new string[] {"مشروب"}); // plural -at
+
+		assertAnalyzesTo(a, "أمريكيين", new string[] {"امريك"}); // plural -in
+		assertAnalyzesTo(a, "امريكي", new string[] {"امريك"}); // singular with bare alif
+
+		assertAnalyzesTo(a, "كتاب", new string[] {"كتاب"});
+		assertAnalyzesTo(a, "الكتاب", new string[] {"كتاب"}); // definite article
+
+		assertAnalyzesTo(a, "ما ملكت أيمانكم", new string[] {"ملكت", "ايمانكم"});
+		assertAnalyzesTo(a, "الذين ملكت أيمانكم", new string[] {"ملكت", "ايمانكم"}); // stopwords
+	  }
+
+	  /// <summary>
+	  /// Simple tests to show things are getting reset correctly, etc.
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReusableTokenStream() throws Exception
+	  public virtual void testReusableTokenStream()
+	  {
+		ArabicAnalyzer a = new ArabicAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "كبير", new string[] {"كبير"});
+		assertAnalyzesTo(a, "كبيرة", new string[] {"كبير"}); // feminine marker
+	  }
+
+	  /// <summary>
+	  /// Non-arabic text gets treated in a similar way as SimpleAnalyzer.
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testEnglishInput() throws Exception
+	  public virtual void testEnglishInput()
+	  {
+		assertAnalyzesTo(new ArabicAnalyzer(TEST_VERSION_CURRENT), "English text.", new string[] {"english", "text"});
+	  }
+
+	  /// <summary>
+	  /// Test that custom stopwords work, and are not case-sensitive.
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testCustomStopwords() throws Exception
+	  public virtual void testCustomStopwords()
+	  {
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, asSet("the", "and", "a"), false);
+		ArabicAnalyzer a = new ArabicAnalyzer(TEST_VERSION_CURRENT, set);
+		assertAnalyzesTo(a, "The quick brown fox.", new string[] {"quick", "brown", "fox"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWithStemExclusionSet() throws java.io.IOException
+	  public virtual void testWithStemExclusionSet()
+	  {
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, asSet("ساهدهات"), false);
+		ArabicAnalyzer a = new ArabicAnalyzer(TEST_VERSION_CURRENT, CharArraySet.EMPTY_SET, set);
+		assertAnalyzesTo(a, "كبيرة the quick ساهدهات", new string[] {"كبير","the", "quick", "ساهدهات"});
+		assertAnalyzesTo(a, "كبيرة the quick ساهدهات", new string[] {"كبير","the", "quick", "ساهدهات"});
+
+
+		a = new ArabicAnalyzer(TEST_VERSION_CURRENT, CharArraySet.EMPTY_SET, CharArraySet.EMPTY_SET);
+		assertAnalyzesTo(a, "كبيرة the quick ساهدهات", new string[] {"كبير","the", "quick", "ساهد"});
+		assertAnalyzesTo(a, "كبيرة the quick ساهدهات", new string[] {"كبير","the", "quick", "ساهد"});
+	  }
+
+	  /// <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()
+	  {
+		checkRandomData(random(), new ArabicAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicFilters.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicFilters.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicFilters.cs
new file mode 100644
index 0000000..622e2b9
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicFilters.cs
@@ -0,0 +1,131 @@
+using System;
+
+namespace org.apache.lucene.analysis.ar
+{
+
+	/*
+	 * 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 Arabic filter Factories are working.
+	/// </summary>
+	public class TestArabicFilters : BaseTokenStreamFactoryTestCase
+	{
+	  /// <summary>
+	  /// Test ArabicLetterTokenizerFactory </summary>
+	  /// @deprecated (3.1) Remove in Lucene 5.0 
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: @Deprecated("(3.1) Remove in Lucene 5.0") public void testTokenizer() throws Exception
+	  [Obsolete("(3.1) Remove in Lucene 5.0")]
+	  public virtual void testTokenizer()
+	  {
+		Reader reader = new StringReader("الذين مَلكت أيمانكم");
+		TokenStream stream = tokenizerFactory("ArabicLetter").create(reader);
+		assertTokenStreamContents(stream, new string[] {"الذين", "مَلكت", "أيمانكم"});
+	  }
+
+	  /// <summary>
+	  /// Test ArabicNormalizationFilterFactory
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNormalizer() throws Exception
+	  public virtual void testNormalizer()
+	  {
+		Reader reader = new StringReader("الذين مَلكت أيمانكم");
+		Tokenizer tokenizer = tokenizerFactory("Standard").create(reader);
+		TokenStream stream = tokenFilterFactory("ArabicNormalization").create(tokenizer);
+		assertTokenStreamContents(stream, new string[] {"الذين", "ملكت", "ايمانكم"});
+	  }
+
+	  /// <summary>
+	  /// Test ArabicStemFilterFactory
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStemmer() throws Exception
+	  public virtual void testStemmer()
+	  {
+		Reader reader = new StringReader("الذين مَلكت أيمانكم");
+		Tokenizer tokenizer = tokenizerFactory("Standard").create(reader);
+		TokenStream stream = tokenFilterFactory("ArabicNormalization").create(tokenizer);
+		stream = tokenFilterFactory("ArabicStem").create(stream);
+		assertTokenStreamContents(stream, new string[] {"ذين", "ملكت", "ايمانكم"});
+	  }
+
+	  /// <summary>
+	  /// Test PersianCharFilterFactory
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testPersianCharFilter() throws Exception
+	  public virtual void testPersianCharFilter()
+	  {
+		Reader reader = charFilterFactory("Persian").create(new StringReader("می‌خورد"));
+		Tokenizer tokenizer = tokenizerFactory("Standard").create(reader);
+		assertTokenStreamContents(tokenizer, new string[] {"می", "خورد"});
+	  }
+
+	  /// <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("ArabicNormalization", "bogusArg", "bogusValue");
+		  fail();
+		}
+		catch (System.ArgumentException expected)
+		{
+		  assertTrue(expected.Message.contains("Unknown parameters"));
+		}
+
+		try
+		{
+		  tokenFilterFactory("Arabicstem", "bogusArg", "bogusValue");
+		  fail();
+		}
+		catch (System.ArgumentException expected)
+		{
+		  assertTrue(expected.Message.contains("Unknown parameters"));
+		}
+
+		try
+		{
+		  charFilterFactory("Persian", "bogusArg", "bogusValue");
+		  fail();
+		}
+		catch (System.ArgumentException expected)
+		{
+		  assertTrue(expected.Message.contains("Unknown parameters"));
+		}
+
+		try
+		{
+		  tokenizerFactory("ArabicLetter", "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/Ar/TestArabicLetterTokenizer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicLetterTokenizer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicLetterTokenizer.cs
new file mode 100644
index 0000000..88fba37
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicLetterTokenizer.cs
@@ -0,0 +1,52 @@
+using System;
+
+namespace org.apache.lucene.analysis.ar
+{
+
+	/*
+	 * 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 Version = org.apache.lucene.util.Version;
+
+	/// <summary>
+	/// Testcase for <seealso cref="TestArabicLetterTokenizer"/> </summary>
+	/// @deprecated (3.1) Remove in Lucene 5.0 
+	[Obsolete("(3.1) Remove in Lucene 5.0")]
+	public class TestArabicLetterTokenizer : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testArabicLetterTokenizer() throws java.io.IOException
+	  public virtual void testArabicLetterTokenizer()
+	  {
+		StringReader reader = new StringReader("1234567890 Tokenizer \ud801\udc1c\u0300test");
+		ArabicLetterTokenizer tokenizer = new ArabicLetterTokenizer(Version.LUCENE_31, reader);
+		assertTokenStreamContents(tokenizer, new string[] {"Tokenizer", "\ud801\udc1c\u0300test"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testArabicLetterTokenizerBWCompat() throws java.io.IOException
+	  public virtual void testArabicLetterTokenizerBWCompat()
+	  {
+		StringReader reader = new StringReader("1234567890 Tokenizer \ud801\udc1c\u0300test");
+		ArabicLetterTokenizer tokenizer = new ArabicLetterTokenizer(Version.LUCENE_30, reader);
+		assertTokenStreamContents(tokenizer, new string[] {"Tokenizer", "\u0300test"});
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicNormalizationFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicNormalizationFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicNormalizationFilter.cs
new file mode 100644
index 0000000..99d1989
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicNormalizationFilter.cs
@@ -0,0 +1,164 @@
+namespace org.apache.lucene.analysis.ar
+{
+
+	/*
+	 * 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;
+
+	/// <summary>
+	/// Test the Arabic Normalization Filter
+	/// </summary>
+	public class TestArabicNormalizationFilter : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAlifMadda() throws java.io.IOException
+	  public virtual void testAlifMadda()
+	  {
+		check("آجن", "اجن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAlifHamzaAbove() throws java.io.IOException
+	  public virtual void testAlifHamzaAbove()
+	  {
+		check("أحمد", "احمد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAlifHamzaBelow() throws java.io.IOException
+	  public virtual void testAlifHamzaBelow()
+	  {
+		check("إعاذ", "اعاذ");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAlifMaksura() throws java.io.IOException
+	  public virtual void testAlifMaksura()
+	  {
+		check("بنى", "بني");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testTehMarbuta() throws java.io.IOException
+	  public virtual void testTehMarbuta()
+	  {
+		check("فاطمة", "فاطمه");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testTatweel() throws java.io.IOException
+	  public virtual void testTatweel()
+	  {
+		check("روبرـــــت", "روبرت");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFatha() throws java.io.IOException
+	  public virtual void testFatha()
+	  {
+		check("مَبنا", "مبنا");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testKasra() throws java.io.IOException
+	  public virtual void testKasra()
+	  {
+		check("علِي", "علي");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testDamma() throws java.io.IOException
+	  public virtual void testDamma()
+	  {
+		check("بُوات", "بوات");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFathatan() throws java.io.IOException
+	  public virtual void testFathatan()
+	  {
+		check("ولداً", "ولدا");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testKasratan() throws java.io.IOException
+	  public virtual void testKasratan()
+	  {
+		check("ولدٍ", "ولد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testDammatan() throws java.io.IOException
+	  public virtual void testDammatan()
+	  {
+		check("ولدٌ", "ولد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testSukun() throws java.io.IOException
+	  public virtual void testSukun()
+	  {
+		check("نلْسون", "نلسون");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testShaddah() throws java.io.IOException
+	  public virtual void testShaddah()
+	  {
+		check("هتميّ", "هتمي");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: private void check(final String input, final String expected) throws java.io.IOException
+//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
+	  private void check(string input, string expected)
+	  {
+		ArabicLetterTokenizer tokenStream = new ArabicLetterTokenizer(TEST_VERSION_CURRENT, new StringReader(input));
+		ArabicNormalizationFilter filter = new ArabicNormalizationFilter(tokenStream);
+		assertTokenStreamContents(filter, new string[]{expected});
+	  }
+
+//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 AnalyzerAnonymousInnerClassHelper(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  private readonly TestArabicNormalizationFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper(TestArabicNormalizationFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new ArabicNormalizationFilter(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/Ar/TestArabicStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicStemFilter.cs
new file mode 100644
index 0000000..73e24ad
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ar/TestArabicStemFilter.cs
@@ -0,0 +1,227 @@
+namespace org.apache.lucene.analysis.ar
+{
+
+	/*
+	 * 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;
+
+	/// <summary>
+	/// Test the Arabic Normalization Filter
+	/// 
+	/// </summary>
+	public class TestArabicStemFilter : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAlPrefix() throws java.io.IOException
+	  public virtual void testAlPrefix()
+	  {
+		check("الحسن", "حسن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWalPrefix() throws java.io.IOException
+	  public virtual void testWalPrefix()
+	  {
+		check("والحسن", "حسن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testBalPrefix() throws java.io.IOException
+	  public virtual void testBalPrefix()
+	  {
+		check("بالحسن", "حسن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testKalPrefix() throws java.io.IOException
+	  public virtual void testKalPrefix()
+	  {
+		check("كالحسن", "حسن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFalPrefix() throws java.io.IOException
+	  public virtual void testFalPrefix()
+	  {
+		check("فالحسن", "حسن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testLlPrefix() throws java.io.IOException
+	  public virtual void testLlPrefix()
+	  {
+		check("للاخر", "اخر");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWaPrefix() throws java.io.IOException
+	  public virtual void testWaPrefix()
+	  {
+		check("وحسن", "حسن");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAhSuffix() throws java.io.IOException
+	  public virtual void testAhSuffix()
+	  {
+		check("زوجها", "زوج");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAnSuffix() throws java.io.IOException
+	  public virtual void testAnSuffix()
+	  {
+		check("ساهدان", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAtSuffix() throws java.io.IOException
+	  public virtual void testAtSuffix()
+	  {
+		check("ساهدات", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWnSuffix() throws java.io.IOException
+	  public virtual void testWnSuffix()
+	  {
+		check("ساهدون", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testYnSuffix() throws java.io.IOException
+	  public virtual void testYnSuffix()
+	  {
+		check("ساهدين", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testYhSuffix() throws java.io.IOException
+	  public virtual void testYhSuffix()
+	  {
+		check("ساهديه", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testYpSuffix() throws java.io.IOException
+	  public virtual void testYpSuffix()
+	  {
+		check("ساهدية", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testHSuffix() throws java.io.IOException
+	  public virtual void testHSuffix()
+	  {
+		check("ساهده", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testPSuffix() throws java.io.IOException
+	  public virtual void testPSuffix()
+	  {
+		check("ساهدة", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testYSuffix() throws java.io.IOException
+	  public virtual void testYSuffix()
+	  {
+		check("ساهدي", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testComboPrefSuf() throws java.io.IOException
+	  public virtual void testComboPrefSuf()
+	  {
+		check("وساهدون", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testComboSuf() throws java.io.IOException
+	  public virtual void testComboSuf()
+	  {
+		check("ساهدهات", "ساهد");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testShouldntStem() throws java.io.IOException
+	  public virtual void testShouldntStem()
+	  {
+		check("الو", "الو");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNonArabic() throws java.io.IOException
+	  public virtual void testNonArabic()
+	  {
+		check("English", "English");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWithKeywordAttribute() throws java.io.IOException
+	  public virtual void testWithKeywordAttribute()
+	  {
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, 1, true);
+		set.add("ساهدهات");
+		ArabicLetterTokenizer tokenStream = new ArabicLetterTokenizer(TEST_VERSION_CURRENT, new StringReader("ساهدهات"));
+
+		ArabicStemFilter filter = new ArabicStemFilter(new SetKeywordMarkerFilter(tokenStream, set));
+		assertTokenStreamContents(filter, new string[]{"ساهدهات"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: private void check(final String input, final String expected) throws java.io.IOException
+//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
+	  private void check(string input, string expected)
+	  {
+		ArabicLetterTokenizer tokenStream = new ArabicLetterTokenizer(TEST_VERSION_CURRENT, new StringReader(input));
+		ArabicStemFilter filter = new ArabicStemFilter(tokenStream);
+		assertTokenStreamContents(filter, new string[]{expected});
+	  }
+
+//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 AnalyzerAnonymousInnerClassHelper(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  private readonly TestArabicStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper(TestArabicStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new ArabicStemFilter(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/Bg/TestBulgarianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianAnalyzer.cs
new file mode 100644
index 0000000..464a655
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianAnalyzer.cs
@@ -0,0 +1,100 @@
+namespace org.apache.lucene.analysis.bg
+{
+
+	/*
+	 * 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 CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+	using Version = org.apache.lucene.util.Version;
+
+	/// <summary>
+	/// Test the Bulgarian analyzer
+	/// </summary>
+	public class TestBulgarianAnalyzer : BaseTokenStreamTestCase
+	{
+
+	  /// <summary>
+	  /// This test fails with NPE when the stopwords file is missing in classpath
+	  /// </summary>
+	  public virtual void testResourcesAvailable()
+	  {
+		new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStopwords() throws java.io.IOException
+	  public virtual void testStopwords()
+	  {
+		Analyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "Как се казваш?", new string[] {"казваш"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testCustomStopwords() throws java.io.IOException
+	  public virtual void testCustomStopwords()
+	  {
+		Analyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT, CharArraySet.EMPTY_SET);
+		assertAnalyzesTo(a, "Как се казваш?", new string[] {"как", "се", "казваш"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReusableTokenStream() throws java.io.IOException
+	  public virtual void testReusableTokenStream()
+	  {
+		Analyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "документи", new string[] {"документ"});
+		assertAnalyzesTo(a, "документ", new string[] {"документ"});
+	  }
+
+	  /// <summary>
+	  /// Test some examples from the paper
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testBasicExamples() throws java.io.IOException
+	  public virtual void testBasicExamples()
+	  {
+		Analyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "енергийни кризи", new string[] {"енергийн", "криз"});
+		assertAnalyzesTo(a, "Атомната енергия", new string[] {"атомн", "енерг"});
+
+		assertAnalyzesTo(a, "компютри", new string[] {"компютр"});
+		assertAnalyzesTo(a, "компютър", new string[] {"компютр"});
+
+		assertAnalyzesTo(a, "градове", new string[] {"град"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWithStemExclusionSet() throws java.io.IOException
+	  public virtual void testWithStemExclusionSet()
+	  {
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, 1, true);
+		set.add("строеве");
+		Analyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT, CharArraySet.EMPTY_SET, set);
+		assertAnalyzesTo(a, "строевете строеве", new string[] {"строй", "строеве"});
+	  }
+
+	  /// <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()
+	  {
+		checkRandomData(random(), new BulgarianAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemFilterFactory.cs
new file mode 100644
index 0000000..38c26b3
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemFilterFactory.cs
@@ -0,0 +1,60 @@
+namespace org.apache.lucene.analysis.bg
+{
+
+	/*
+	 * 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 Bulgarian stem filter factory is working.
+	/// </summary>
+	public class TestBulgarianStemFilterFactory : BaseTokenStreamFactoryTestCase
+	{
+	  /// <summary>
+	  /// Ensure the filter actually stems text.
+	  /// </summary>
+//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("компютри");
+		Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		TokenStream stream = tokenFilterFactory("BulgarianStem").create(tokenizer);
+		assertTokenStreamContents(stream, new string[] {"компютр"});
+	  }
+
+	  /// <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("BulgarianStem", "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/Bg/TestBulgarianStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemmer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemmer.cs
new file mode 100644
index 0000000..0609bb2
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Bg/TestBulgarianStemmer.cs
@@ -0,0 +1,266 @@
+namespace org.apache.lucene.analysis.bg
+{
+
+	/*
+	 * 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 Version = org.apache.lucene.util.Version;
+
+	/// <summary>
+	/// Test the Bulgarian Stemmer
+	/// </summary>
+	public class TestBulgarianStemmer : BaseTokenStreamTestCase
+	{
+	  /// <summary>
+	  /// Test showing how masculine noun forms conflate. An example noun for each
+	  /// common (and some rare) plural pattern is listed.
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testMasculineNouns() throws java.io.IOException
+	  public virtual void testMasculineNouns()
+	  {
+		BulgarianAnalyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+
+		// -и pattern
+		assertAnalyzesTo(a, "град", new string[] {"град"});
+		assertAnalyzesTo(a, "града", new string[] {"град"});
+		assertAnalyzesTo(a, "градът", new string[] {"град"});
+		assertAnalyzesTo(a, "градове", new string[] {"град"});
+		assertAnalyzesTo(a, "градовете", new string[] {"град"});
+
+		// -ове pattern
+		assertAnalyzesTo(a, "народ", new string[] {"народ"});
+		assertAnalyzesTo(a, "народа", new string[] {"народ"});
+		assertAnalyzesTo(a, "народът", new string[] {"народ"});
+		assertAnalyzesTo(a, "народи", new string[] {"народ"});
+		assertAnalyzesTo(a, "народите", new string[] {"народ"});
+		assertAnalyzesTo(a, "народе", new string[] {"народ"});
+
+		// -ища pattern
+		assertAnalyzesTo(a, "път", new string[] {"път"});
+		assertAnalyzesTo(a, "пътя", new string[] {"път"});
+		assertAnalyzesTo(a, "пътят", new string[] {"път"});
+		assertAnalyzesTo(a, "пътища", new string[] {"път"});
+		assertAnalyzesTo(a, "пътищата", new string[] {"път"});
+
+		// -чета pattern
+		assertAnalyzesTo(a, "градец", new string[] {"градец"});
+		assertAnalyzesTo(a, "градеца", new string[] {"градец"});
+		assertAnalyzesTo(a, "градецът", new string[] {"градец"});
+		/* note the below forms conflate with each other, but not the rest */
+		assertAnalyzesTo(a, "градовце", new string[] {"градовц"});
+		assertAnalyzesTo(a, "градовцете", new string[] {"градовц"});
+
+		// -овци pattern
+		assertAnalyzesTo(a, "дядо", new string[] {"дяд"});
+		assertAnalyzesTo(a, "дядото", new string[] {"дяд"});
+		assertAnalyzesTo(a, "дядовци", new string[] {"дяд"});
+		assertAnalyzesTo(a, "дядовците", new string[] {"дяд"});
+
+		// -е pattern
+		assertAnalyzesTo(a, "мъж", new string[] {"мъж"});
+		assertAnalyzesTo(a, "мъжа", new string[] {"мъж"});
+		assertAnalyzesTo(a, "мъже", new string[] {"мъж"});
+		assertAnalyzesTo(a, "мъжете", new string[] {"мъж"});
+		assertAnalyzesTo(a, "мъжо", new string[] {"мъж"});
+		/* word is too short, will not remove -ът */
+		assertAnalyzesTo(a, "мъжът", new string[] {"мъжът"});
+
+		// -а pattern
+		assertAnalyzesTo(a, "крак", new string[] {"крак"});
+		assertAnalyzesTo(a, "крака", new string[] {"крак"});
+		assertAnalyzesTo(a, "кракът", new string[] {"крак"});
+		assertAnalyzesTo(a, "краката", new string[] {"крак"});
+
+		// брат
+		assertAnalyzesTo(a, "брат", new string[] {"брат"});
+		assertAnalyzesTo(a, "брата", new string[] {"брат"});
+		assertAnalyzesTo(a, "братът", new string[] {"брат"});
+		assertAnalyzesTo(a, "братя", new string[] {"брат"});
+		assertAnalyzesTo(a, "братята", new string[] {"брат"});
+		assertAnalyzesTo(a, "брате", new string[] {"брат"});
+	  }
+
+	  /// <summary>
+	  /// Test showing how feminine noun forms conflate
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFeminineNouns() throws java.io.IOException
+	  public virtual void testFeminineNouns()
+	  {
+		BulgarianAnalyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+
+		assertAnalyzesTo(a, "вест", new string[] {"вест"});
+		assertAnalyzesTo(a, "вестта", new string[] {"вест"});
+		assertAnalyzesTo(a, "вести", new string[] {"вест"});
+		assertAnalyzesTo(a, "вестите", new string[] {"вест"});
+	  }
+
+	  /// <summary>
+	  /// Test showing how neuter noun forms conflate an example noun for each common
+	  /// plural pattern is listed
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNeuterNouns() throws java.io.IOException
+	  public virtual void testNeuterNouns()
+	  {
+		BulgarianAnalyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+
+		// -а pattern
+		assertAnalyzesTo(a, "дърво", new string[] {"дърв"});
+		assertAnalyzesTo(a, "дървото", new string[] {"дърв"});
+		assertAnalyzesTo(a, "дърва", new string[] {"дърв"});
+		assertAnalyzesTo(a, "дървета", new string[] {"дърв"});
+		assertAnalyzesTo(a, "дървата", new string[] {"дърв"});
+		assertAnalyzesTo(a, "дърветата", new string[] {"дърв"});
+
+		// -та pattern
+		assertAnalyzesTo(a, "море", new string[] {"мор"});
+		assertAnalyzesTo(a, "морето", new string[] {"мор"});
+		assertAnalyzesTo(a, "морета", new string[] {"мор"});
+		assertAnalyzesTo(a, "моретата", new string[] {"мор"});
+
+		// -я pattern
+		assertAnalyzesTo(a, "изключение", new string[] {"изключени"});
+		assertAnalyzesTo(a, "изключението", new string[] {"изключени"});
+		assertAnalyzesTo(a, "изключенията", new string[] {"изключени"});
+		/* note the below form in this example does not conflate with the rest */
+		assertAnalyzesTo(a, "изключения", new string[] {"изключн"});
+	  }
+
+	  /// <summary>
+	  /// Test showing how adjectival forms conflate
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testAdjectives() throws java.io.IOException
+	  public virtual void testAdjectives()
+	  {
+		BulgarianAnalyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "красив", new string[] {"красив"});
+		assertAnalyzesTo(a, "красивия", new string[] {"красив"});
+		assertAnalyzesTo(a, "красивият", new string[] {"красив"});
+		assertAnalyzesTo(a, "красива", new string[] {"красив"});
+		assertAnalyzesTo(a, "красивата", new string[] {"красив"});
+		assertAnalyzesTo(a, "красиво", new string[] {"красив"});
+		assertAnalyzesTo(a, "красивото", new string[] {"красив"});
+		assertAnalyzesTo(a, "красиви", new string[] {"красив"});
+		assertAnalyzesTo(a, "красивите", new string[] {"красив"});
+	  }
+
+	  /// <summary>
+	  /// Test some exceptional rules, implemented as rewrites.
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testExceptions() throws java.io.IOException
+	  public virtual void testExceptions()
+	  {
+		BulgarianAnalyzer a = new BulgarianAnalyzer(TEST_VERSION_CURRENT);
+
+		// ци -> к
+		assertAnalyzesTo(a, "собственик", new string[] {"собственик"});
+		assertAnalyzesTo(a, "собственика", new string[] {"собственик"});
+		assertAnalyzesTo(a, "собственикът", new string[] {"собственик"});
+		assertAnalyzesTo(a, "собственици", new string[] {"собственик"});
+		assertAnalyzesTo(a, "собствениците", new string[] {"собственик"});
+
+		// зи -> г
+		assertAnalyzesTo(a, "подлог", new string[] {"подлог"});
+		assertAnalyzesTo(a, "подлога", new string[] {"подлог"});
+		assertAnalyzesTo(a, "подлогът", new string[] {"подлог"});
+		assertAnalyzesTo(a, "подлози", new string[] {"подлог"});
+		assertAnalyzesTo(a, "подлозите", new string[] {"подлог"});
+
+		// си -> х
+		assertAnalyzesTo(a, "кожух", new string[] {"кожух"});
+		assertAnalyzesTo(a, "кожуха", new string[] {"кожух"});
+		assertAnalyzesTo(a, "кожухът", new string[] {"кожух"});
+		assertAnalyzesTo(a, "кожуси", new string[] {"кожух"});
+		assertAnalyzesTo(a, "кожусите", new string[] {"кожух"});
+
+		// ъ deletion
+		assertAnalyzesTo(a, "център", new string[] {"центр"});
+		assertAnalyzesTo(a, "центъра", new string[] {"центр"});
+		assertAnalyzesTo(a, "центърът", new string[] {"центр"});
+		assertAnalyzesTo(a, "центрове", new string[] {"центр"});
+		assertAnalyzesTo(a, "центровете", new string[] {"центр"});
+
+		// е*и -> я*
+		assertAnalyzesTo(a, "промяна", new string[] {"промян"});
+		assertAnalyzesTo(a, "промяната", new string[] {"промян"});
+		assertAnalyzesTo(a, "промени", new string[] {"промян"});
+		assertAnalyzesTo(a, "промените", new string[] {"промян"});
+
+		// ен -> н
+		assertAnalyzesTo(a, "песен", new string[] {"песн"});
+		assertAnalyzesTo(a, "песента", new string[] {"песн"});
+		assertAnalyzesTo(a, "песни", new string[] {"песн"});
+		assertAnalyzesTo(a, "песните", new string[] {"песн"});
+
+		// -еве -> й
+		// note: this is the only word i think this rule works for.
+		// most -еве pluralized nouns are monosyllabic,
+		// and the stemmer requires length > 6...
+		assertAnalyzesTo(a, "строй", new string[] {"строй"});
+		assertAnalyzesTo(a, "строеве", new string[] {"строй"});
+		assertAnalyzesTo(a, "строевете", new string[] {"строй"});
+		/* note the below forms conflate with each other, but not the rest */
+		assertAnalyzesTo(a, "строя", new string[] {"стр"});
+		assertAnalyzesTo(a, "строят", new string[] {"стр"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWithKeywordAttribute() throws java.io.IOException
+	  public virtual void testWithKeywordAttribute()
+	  {
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, 1, true);
+		set.add("строеве");
+		MockTokenizer tokenStream = new MockTokenizer(new StringReader("строевете строеве"), MockTokenizer.WHITESPACE, false);
+
+		BulgarianStemFilter filter = new BulgarianStemFilter(new SetKeywordMarkerFilter(tokenStream, set));
+		assertTokenStreamContents(filter, new string[] {"строй", "строеве"});
+	  }
+
+//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 AnalyzerAnonymousInnerClassHelper(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  private readonly TestBulgarianStemmer outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper(TestBulgarianStemmer outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new BulgarianStemFilter(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/Br/TestBrazilianStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Br/TestBrazilianStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Br/TestBrazilianStemFilterFactory.cs
new file mode 100644
index 0000000..63a2d75
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Br/TestBrazilianStemFilterFactory.cs
@@ -0,0 +1,60 @@
+namespace org.apache.lucene.analysis.br
+{
+
+	/*
+	 * 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 Brazilian stem filter factory is working.
+	/// </summary>
+	public class TestBrazilianStemFilterFactory : BaseTokenStreamFactoryTestCase
+	{
+	  /// <summary>
+	  /// Ensure the filter actually stems and normalizes text.
+	  /// </summary>
+//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("Brasília");
+		Tokenizer tokenizer = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		TokenStream stream = tokenFilterFactory("BrazilianStem").create(tokenizer);
+		assertTokenStreamContents(stream, new string[] {"brasil"});
+	  }
+
+	  /// <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("BrazilianStem", "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/Br/TestBrazilianStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Br/TestBrazilianStemmer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Br/TestBrazilianStemmer.cs
new file mode 100644
index 0000000..1cd6d59
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Br/TestBrazilianStemmer.cs
@@ -0,0 +1,212 @@
+namespace org.apache.lucene.analysis.br
+{
+
+	/*
+	 * 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 LowerCaseTokenizer = org.apache.lucene.analysis.core.LowerCaseTokenizer;
+	using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
+	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+
+	/// <summary>
+	/// Test the Brazilian Stem Filter, which only modifies the term text.
+	/// 
+	/// It is very similar to the snowball portuguese algorithm but not exactly the same.
+	/// 
+	/// </summary>
+	public class TestBrazilianStemmer : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWithSnowballExamples() throws Exception
+	  public virtual void testWithSnowballExamples()
+	  {
+	   check("boa", "boa");
+	   check("boainain", "boainain");
+	   check("boas", "boas");
+	   check("bôas", "boas"); // removes diacritic: different from snowball portugese
+	   check("boassu", "boassu");
+	   check("boataria", "boat");
+	   check("boate", "boat");
+	   check("boates", "boat");
+	   check("boatos", "boat");
+	   check("bob", "bob");
+	   check("boba", "bob");
+	   check("bobagem", "bobag");
+	   check("bobagens", "bobagens");
+	   check("bobalhões", "bobalho"); // removes diacritic: different from snowball portugese
+	   check("bobear", "bob");
+	   check("bobeira", "bobeir");
+	   check("bobinho", "bobinh");
+	   check("bobinhos", "bobinh");
+	   check("bobo", "bob");
+	   check("bobs", "bobs");
+	   check("boca", "boc");
+	   check("bocadas", "boc");
+	   check("bocadinho", "bocadinh");
+	   check("bocado", "boc");
+	   check("bocaiúva", "bocaiuv"); // removes diacritic: different from snowball portuguese
+	   check("boçal", "bocal"); // removes diacritic: different from snowball portuguese
+	   check("bocarra", "bocarr");
+	   check("bocas", "boc");
+	   check("bode", "bod");
+	   check("bodoque", "bodoqu");
+	   check("body", "body");
+	   check("boeing", "boeing");
+	   check("boem", "boem");
+	   check("boemia", "boem");
+	   check("boêmio", "boemi"); // removes diacritic: different from snowball portuguese
+	   check("bogotá", "bogot");
+	   check("boi", "boi");
+	   check("bóia", "boi"); // removes diacritic: different from snowball portuguese
+	   check("boiando", "boi");
+	   check("quiabo", "quiab");
+	   check("quicaram", "quic");
+	   check("quickly", "quickly");
+	   check("quieto", "quiet");
+	   check("quietos", "quiet");
+	   check("quilate", "quilat");
+	   check("quilates", "quilat");
+	   check("quilinhos", "quilinh");
+	   check("quilo", "quil");
+	   check("quilombo", "quilomb");
+	   check("quilométricas", "quilometr"); // removes diacritic: different from snowball portuguese
+	   check("quilométricos", "quilometr"); // removes diacritic: different from snowball portuguese
+	   check("quilômetro", "quilometr"); // removes diacritic: different from snowball portoguese
+	   check("quilômetros", "quilometr"); // removes diacritic: different from snowball portoguese
+	   check("quilos", "quil");
+	   check("quimica", "quimic");
+	   check("quilos", "quil");
+	   check("quimica", "quimic");
+	   check("quimicas", "quimic");
+	   check("quimico", "quimic");
+	   check("quimicos", "quimic");
+	   check("quimioterapia", "quimioterap");
+	   check("quimioterápicos", "quimioterap"); // removes diacritic: different from snowball portoguese
+	   check("quimono", "quimon");
+	   check("quincas", "quinc");
+	   check("quinhão", "quinha"); // removes diacritic: different from snowball portoguese
+	   check("quinhentos", "quinhent");
+	   check("quinn", "quinn");
+	   check("quino", "quin");
+	   check("quinta", "quint");
+	   check("quintal", "quintal");
+	   check("quintana", "quintan");
+	   check("quintanilha", "quintanilh");
+	   check("quintão", "quinta"); // removes diacritic: different from snowball portoguese
+	   check("quintessência", "quintessente"); // versus snowball portuguese 'quintessent'
+	   check("quintino", "quintin");
+	   check("quinto", "quint");
+	   check("quintos", "quint");
+	   check("quintuplicou", "quintuplic");
+	   check("quinze", "quinz");
+	   check("quinzena", "quinzen");
+	   check("quiosque", "quiosqu");
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNormalization() throws Exception
+	  public virtual void testNormalization()
+	  {
+		check("Brasil", "brasil"); // lowercase by default
+		check("Brasília", "brasil"); // remove diacritics
+		check("quimio5terápicos", "quimio5terapicos"); // contains non-letter, diacritic will still be removed
+		check("áá", "áá"); // token is too short: diacritics are not removed
+		check("ááá", "aaa"); // normally, diacritics are removed
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReusableTokenStream() throws Exception
+	  public virtual void testReusableTokenStream()
+	  {
+		Analyzer a = new BrazilianAnalyzer(TEST_VERSION_CURRENT);
+		checkReuse(a, "boa", "boa");
+		checkReuse(a, "boainain", "boainain");
+		checkReuse(a, "boas", "boas");
+		checkReuse(a, "bôas", "boas"); // removes diacritic: different from snowball portugese
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStemExclusionTable() throws Exception
+	  public virtual void testStemExclusionTable()
+	  {
+		BrazilianAnalyzer a = new BrazilianAnalyzer(TEST_VERSION_CURRENT, CharArraySet.EMPTY_SET, new CharArraySet(TEST_VERSION_CURRENT, asSet("quintessência"), false));
+		checkReuse(a, "quintessência", "quintessência"); // excluded words will be completely unchanged.
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testWithKeywordAttribute() throws java.io.IOException
+	  public virtual void testWithKeywordAttribute()
+	  {
+		CharArraySet set = new CharArraySet(TEST_VERSION_CURRENT, 1, true);
+		set.add("Brasília");
+		BrazilianStemFilter filter = new BrazilianStemFilter(new SetKeywordMarkerFilter(new LowerCaseTokenizer(TEST_VERSION_CURRENT, new StringReader("Brasília Brasilia")), set));
+		assertTokenStreamContents(filter, new string[] {"brasília", "brasil"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: private void check(final String input, final String expected) throws Exception
+//JAVA TO C# CONVERTER WARNING: 'final' parameters are not available in .NET:
+	  private void check(string input, string expected)
+	  {
+		checkOneTerm(new BrazilianAnalyzer(TEST_VERSION_CURRENT), input, expected);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: private void checkReuse(org.apache.lucene.analysis.Analyzer a, String input, String expected) throws Exception
+	  private void checkReuse(Analyzer a, string input, string expected)
+	  {
+		checkOneTerm(a, input, expected);
+	  }
+
+	  /// <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()
+	  {
+		checkRandomData(random(), new BrazilianAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
+	  }
+
+//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 AnalyzerAnonymousInnerClassHelper(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  private readonly TestBrazilianStemmer outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper(TestBrazilianStemmer outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new BrazilianStemFilter(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/Ca/TestCatalanAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ca/TestCatalanAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ca/TestCatalanAnalyzer.cs
new file mode 100644
index 0000000..5ed025b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ca/TestCatalanAnalyzer.cs
@@ -0,0 +1,80 @@
+namespace org.apache.lucene.analysis.ca
+{
+
+	/*
+	 * 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 CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+
+	public class TestCatalanAnalyzer : BaseTokenStreamTestCase
+	{
+	  /// <summary>
+	  /// This test fails with NPE when the 
+	  /// stopwords file is missing in classpath 
+	  /// </summary>
+	  public virtual void testResourcesAvailable()
+	  {
+		new CatalanAnalyzer(TEST_VERSION_CURRENT);
+	  }
+
+	  /// <summary>
+	  /// test stopwords and stemming </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testBasics() throws java.io.IOException
+	  public virtual void testBasics()
+	  {
+		Analyzer a = new CatalanAnalyzer(TEST_VERSION_CURRENT);
+		// stemming
+		checkOneTerm(a, "llengües", "llengu");
+		checkOneTerm(a, "llengua", "llengu");
+		// stopword
+		assertAnalyzesTo(a, "un", new string[] { });
+	  }
+
+	  /// <summary>
+	  /// test use of elisionfilter </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testContractions() throws java.io.IOException
+	  public virtual void testContractions()
+	  {
+		Analyzer a = new CatalanAnalyzer(TEST_VERSION_CURRENT);
+		assertAnalyzesTo(a, "Diccionari de l'Institut d'Estudis Catalans", new string[] {"diccion", "inst", "estud", "catalan"});
+	  }
+
+	  /// <summary>
+	  /// test use of exclusion set </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testExclude() throws java.io.IOException
+	  public virtual void testExclude()
+	  {
+		CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("llengües"), false);
+		Analyzer a = new CatalanAnalyzer(TEST_VERSION_CURRENT, CatalanAnalyzer.DefaultStopSet, exclusionSet);
+		checkOneTerm(a, "llengües", "llengües");
+		checkOneTerm(a, "llengua", "llengu");
+	  }
+
+	  /// <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()
+	  {
+		checkRandomData(random(), new CatalanAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
+	  }
+	}
+
+}
\ No newline at end of file


Mime
View raw message