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:38:57 UTC

[08/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/Payloads/DelimitedPayloadTokenFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
new file mode 100644
index 0000000..1d30cee
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/DelimitedPayloadTokenFilterTest.cs
@@ -0,0 +1,173 @@
+namespace org.apache.lucene.analysis.payloads
+{
+	/*
+	 * 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 CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+	using PayloadAttribute = org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
+	using BytesRef = org.apache.lucene.util.BytesRef;
+	using LuceneTestCase = org.apache.lucene.util.LuceneTestCase;
+
+
+	public class DelimitedPayloadTokenFilterTest : LuceneTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testPayloads() throws Exception
+	  public virtual void testPayloads()
+	  {
+		string test = "The quick|JJ red|JJ fox|NN jumped|VB over the lazy|JJ brown|JJ dogs|NN";
+		DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false), DelimitedPayloadTokenFilter.DEFAULT_DELIMITER, new IdentityEncoder());
+		CharTermAttribute termAtt = filter.getAttribute(typeof(CharTermAttribute));
+		PayloadAttribute payAtt = filter.getAttribute(typeof(PayloadAttribute));
+		filter.reset();
+		assertTermEquals("The", filter, termAtt, payAtt, null);
+		assertTermEquals("quick", filter, termAtt, payAtt, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("red", filter, termAtt, payAtt, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("fox", filter, termAtt, payAtt, "NN".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("jumped", filter, termAtt, payAtt, "VB".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("over", filter, termAtt, payAtt, null);
+		assertTermEquals("the", filter, termAtt, payAtt, null);
+		assertTermEquals("lazy", filter, termAtt, payAtt, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("brown", filter, termAtt, payAtt, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("dogs", filter, termAtt, payAtt, "NN".GetBytes(StandardCharsets.UTF_8));
+		assertFalse(filter.incrementToken());
+		filter.end();
+		filter.close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNext() throws Exception
+	  public virtual void testNext()
+	  {
+
+		string test = "The quick|JJ red|JJ fox|NN jumped|VB over the lazy|JJ brown|JJ dogs|NN";
+		DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false), DelimitedPayloadTokenFilter.DEFAULT_DELIMITER, new IdentityEncoder());
+		filter.reset();
+		assertTermEquals("The", filter, null);
+		assertTermEquals("quick", filter, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("red", filter, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("fox", filter, "NN".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("jumped", filter, "VB".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("over", filter, null);
+		assertTermEquals("the", filter, null);
+		assertTermEquals("lazy", filter, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("brown", filter, "JJ".GetBytes(StandardCharsets.UTF_8));
+		assertTermEquals("dogs", filter, "NN".GetBytes(StandardCharsets.UTF_8));
+		assertFalse(filter.incrementToken());
+		filter.end();
+		filter.close();
+	  }
+
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFloatEncoding() throws Exception
+	  public virtual void testFloatEncoding()
+	  {
+		string test = "The quick|1.0 red|2.0 fox|3.5 jumped|0.5 over the lazy|5 brown|99.3 dogs|83.7";
+		DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false), '|', new FloatEncoder());
+		CharTermAttribute termAtt = filter.getAttribute(typeof(CharTermAttribute));
+		PayloadAttribute payAtt = filter.getAttribute(typeof(PayloadAttribute));
+		filter.reset();
+		assertTermEquals("The", filter, termAtt, payAtt, null);
+		assertTermEquals("quick", filter, termAtt, payAtt, PayloadHelper.encodeFloat(1.0f));
+		assertTermEquals("red", filter, termAtt, payAtt, PayloadHelper.encodeFloat(2.0f));
+		assertTermEquals("fox", filter, termAtt, payAtt, PayloadHelper.encodeFloat(3.5f));
+		assertTermEquals("jumped", filter, termAtt, payAtt, PayloadHelper.encodeFloat(0.5f));
+		assertTermEquals("over", filter, termAtt, payAtt, null);
+		assertTermEquals("the", filter, termAtt, payAtt, null);
+		assertTermEquals("lazy", filter, termAtt, payAtt, PayloadHelper.encodeFloat(5.0f));
+		assertTermEquals("brown", filter, termAtt, payAtt, PayloadHelper.encodeFloat(99.3f));
+		assertTermEquals("dogs", filter, termAtt, payAtt, PayloadHelper.encodeFloat(83.7f));
+		assertFalse(filter.incrementToken());
+		filter.end();
+		filter.close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testIntEncoding() throws Exception
+	  public virtual void testIntEncoding()
+	  {
+		string test = "The quick|1 red|2 fox|3 jumped over the lazy|5 brown|99 dogs|83";
+		DelimitedPayloadTokenFilter filter = new DelimitedPayloadTokenFilter(new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false), '|', new IntegerEncoder());
+		CharTermAttribute termAtt = filter.getAttribute(typeof(CharTermAttribute));
+		PayloadAttribute payAtt = filter.getAttribute(typeof(PayloadAttribute));
+		filter.reset();
+		assertTermEquals("The", filter, termAtt, payAtt, null);
+		assertTermEquals("quick", filter, termAtt, payAtt, PayloadHelper.encodeInt(1));
+		assertTermEquals("red", filter, termAtt, payAtt, PayloadHelper.encodeInt(2));
+		assertTermEquals("fox", filter, termAtt, payAtt, PayloadHelper.encodeInt(3));
+		assertTermEquals("jumped", filter, termAtt, payAtt, null);
+		assertTermEquals("over", filter, termAtt, payAtt, null);
+		assertTermEquals("the", filter, termAtt, payAtt, null);
+		assertTermEquals("lazy", filter, termAtt, payAtt, PayloadHelper.encodeInt(5));
+		assertTermEquals("brown", filter, termAtt, payAtt, PayloadHelper.encodeInt(99));
+		assertTermEquals("dogs", filter, termAtt, payAtt, PayloadHelper.encodeInt(83));
+		assertFalse(filter.incrementToken());
+		filter.end();
+		filter.close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: void assertTermEquals(String expected, org.apache.lucene.analysis.TokenStream stream, byte[] expectPay) throws Exception
+	  internal virtual void assertTermEquals(string expected, TokenStream stream, sbyte[] expectPay)
+	  {
+		CharTermAttribute termAtt = stream.getAttribute(typeof(CharTermAttribute));
+		PayloadAttribute payloadAtt = stream.getAttribute(typeof(PayloadAttribute));
+		assertTrue(stream.incrementToken());
+		assertEquals(expected, termAtt.ToString());
+		BytesRef payload = payloadAtt.Payload;
+		if (payload != null)
+		{
+		  assertTrue(payload.length + " does not equal: " + expectPay.Length, payload.length == expectPay.Length);
+		  for (int i = 0; i < expectPay.Length; i++)
+		  {
+			assertTrue(expectPay[i] + " does not equal: " + payload.bytes[i + payload.offset], expectPay[i] == payload.bytes[i + payload.offset]);
+
+		  }
+		}
+		else
+		{
+		  assertTrue("expectPay is not null and it should be", expectPay == null);
+		}
+	  }
+
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: void assertTermEquals(String expected, org.apache.lucene.analysis.TokenStream stream, org.apache.lucene.analysis.tokenattributes.CharTermAttribute termAtt, org.apache.lucene.analysis.tokenattributes.PayloadAttribute payAtt, byte[] expectPay) throws Exception
+	  internal virtual void assertTermEquals(string expected, TokenStream stream, CharTermAttribute termAtt, PayloadAttribute payAtt, sbyte[] expectPay)
+	  {
+		assertTrue(stream.incrementToken());
+		assertEquals(expected, termAtt.ToString());
+		BytesRef payload = payAtt.Payload;
+		if (payload != null)
+		{
+		  assertTrue(payload.length + " does not equal: " + expectPay.Length, payload.length == expectPay.Length);
+		  for (int i = 0; i < expectPay.Length; i++)
+		  {
+			assertTrue(expectPay[i] + " does not equal: " + payload.bytes[i + payload.offset], expectPay[i] == payload.bytes[i + payload.offset]);
+
+		  }
+		}
+		else
+		{
+		  assertTrue("expectPay is not null and it should be", expectPay == null);
+		}
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/NumericPayloadTokenFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/NumericPayloadTokenFilterTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/NumericPayloadTokenFilterTest.cs
new file mode 100644
index 0000000..389413b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/NumericPayloadTokenFilterTest.cs
@@ -0,0 +1,93 @@
+namespace org.apache.lucene.analysis.payloads
+{
+
+	/// <summary>
+	/// Copyright 2004 The Apache Software Foundation
+	/// 
+	/// Licensed 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.
+	/// </summary>
+
+	using CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+	using PayloadAttribute = org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
+	using TypeAttribute = org.apache.lucene.analysis.tokenattributes.TypeAttribute;
+
+
+	public class NumericPayloadTokenFilterTest : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void test() throws java.io.IOException
+	  public virtual void test()
+	  {
+		string test = "The quick red fox jumped over the lazy brown dogs";
+
+		NumericPayloadTokenFilter nptf = new NumericPayloadTokenFilter(new WordTokenFilter(this, new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false)), 3, "D");
+		bool seenDogs = false;
+		CharTermAttribute termAtt = nptf.getAttribute(typeof(CharTermAttribute));
+		TypeAttribute typeAtt = nptf.getAttribute(typeof(TypeAttribute));
+		PayloadAttribute payloadAtt = nptf.getAttribute(typeof(PayloadAttribute));
+		nptf.reset();
+		while (nptf.incrementToken())
+		{
+		  if (termAtt.ToString().Equals("dogs"))
+		  {
+			seenDogs = true;
+			assertTrue(typeAtt.type() + " is not equal to " + "D", typeAtt.type().Equals("D") == true);
+			assertTrue("payloadAtt.getPayload() is null and it shouldn't be", payloadAtt.Payload != null);
+			sbyte[] bytes = payloadAtt.Payload.bytes; //safe here to just use the bytes, otherwise we should use offset, length
+			assertTrue(bytes.Length + " does not equal: " + payloadAtt.Payload.length, bytes.Length == payloadAtt.Payload.length);
+			assertTrue(payloadAtt.Payload.offset + " does not equal: " + 0, payloadAtt.Payload.offset == 0);
+			float pay = PayloadHelper.decodeFloat(bytes);
+			assertTrue(pay + " does not equal: " + 3, pay == 3);
+		  }
+		  else
+		  {
+			assertTrue(typeAtt.type() + " is not null and it should be", typeAtt.type().Equals("word"));
+		  }
+		}
+		assertTrue(seenDogs + " does not equal: " + true, seenDogs == true);
+	  }
+
+	  private sealed class WordTokenFilter : TokenFilter
+	  {
+		  private readonly NumericPayloadTokenFilterTest outerInstance;
+
+		internal readonly CharTermAttribute termAtt = addAttribute(typeof(CharTermAttribute));
+		internal readonly TypeAttribute typeAtt = addAttribute(typeof(TypeAttribute));
+
+		internal WordTokenFilter(NumericPayloadTokenFilterTest outerInstance, TokenStream input) : base(input)
+		{
+			this.outerInstance = outerInstance;
+		}
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: @Override public boolean incrementToken() throws java.io.IOException
+		public override bool incrementToken()
+		{
+		  if (input.incrementToken())
+		  {
+			if (termAtt.ToString().Equals("dogs"))
+			{
+			  typeAtt.Type = "D";
+			}
+			return true;
+		  }
+		  else
+		  {
+			return false;
+		  }
+		}
+	  }
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TestDelimitedPayloadTokenFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TestDelimitedPayloadTokenFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TestDelimitedPayloadTokenFilterFactory.cs
new file mode 100644
index 0000000..7db6e66
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TestDelimitedPayloadTokenFilterFactory.cs
@@ -0,0 +1,90 @@
+namespace org.apache.lucene.analysis.payloads
+{
+
+	/*
+	 * 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 PayloadAttribute = org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
+	using BaseTokenStreamFactoryTestCase = org.apache.lucene.analysis.util.BaseTokenStreamFactoryTestCase;
+
+	public class TestDelimitedPayloadTokenFilterFactory : BaseTokenStreamFactoryTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testEncoder() throws Exception
+	  public virtual void testEncoder()
+	  {
+		Reader reader = new StringReader("the|0.1 quick|0.1 red|0.1");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("DelimitedPayload", "encoder", "float").create(stream);
+
+		stream.reset();
+		while (stream.incrementToken())
+		{
+		  PayloadAttribute payAttr = stream.getAttribute(typeof(PayloadAttribute));
+		  assertNotNull(payAttr);
+		  sbyte[] payData = payAttr.Payload.bytes;
+		  assertNotNull(payData);
+		  float payFloat = PayloadHelper.decodeFloat(payData);
+		  assertEquals(0.1f, payFloat, 0.0f);
+		}
+		stream.end();
+		stream.close();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testDelim() throws Exception
+	  public virtual void testDelim()
+	  {
+		Reader reader = new StringReader("the*0.1 quick*0.1 red*0.1");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("DelimitedPayload", "encoder", "float", "delimiter", "*").create(stream);
+		stream.reset();
+		while (stream.incrementToken())
+		{
+		  PayloadAttribute payAttr = stream.getAttribute(typeof(PayloadAttribute));
+		  assertNotNull(payAttr);
+		  sbyte[] payData = payAttr.Payload.bytes;
+		  assertNotNull(payData);
+		  float payFloat = PayloadHelper.decodeFloat(payData);
+		  assertEquals(0.1f, payFloat, 0.0f);
+		}
+		stream.end();
+		stream.close();
+	  }
+
+	  /// <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("DelimitedPayload", "encoder", "float", "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/Payloads/TokenOffsetPayloadTokenFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilterTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilterTest.cs
new file mode 100644
index 0000000..38b71ae
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TokenOffsetPayloadTokenFilterTest.cs
@@ -0,0 +1,56 @@
+namespace org.apache.lucene.analysis.payloads
+{
+
+	/// <summary>
+	/// Copyright 2004 The Apache Software Foundation
+	/// 
+	/// Licensed 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.
+	/// </summary>
+
+	using OffsetAttribute = org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
+	using PayloadAttribute = org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
+	using BytesRef = org.apache.lucene.util.BytesRef;
+
+
+	public class TokenOffsetPayloadTokenFilterTest : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void test() throws java.io.IOException
+	  public virtual void test()
+	  {
+		string test = "The quick red fox jumped over the lazy brown dogs";
+
+		TokenOffsetPayloadTokenFilter nptf = new TokenOffsetPayloadTokenFilter(new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false));
+		int count = 0;
+		PayloadAttribute payloadAtt = nptf.getAttribute(typeof(PayloadAttribute));
+		OffsetAttribute offsetAtt = nptf.getAttribute(typeof(OffsetAttribute));
+		nptf.reset();
+		while (nptf.incrementToken())
+		{
+		  BytesRef pay = payloadAtt.Payload;
+		  assertTrue("pay is null and it shouldn't be", pay != null);
+		  sbyte[] data = pay.bytes;
+		  int start = PayloadHelper.decodeInt(data, 0);
+		  assertTrue(start + " does not equal: " + offsetAtt.startOffset(), start == offsetAtt.startOffset());
+		  int end = PayloadHelper.decodeInt(data, 4);
+		  assertTrue(end + " does not equal: " + offsetAtt.endOffset(), end == offsetAtt.endOffset());
+		  count++;
+		}
+		assertTrue(count + " does not equal: " + 10, count == 10);
+
+	  }
+
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TypeAsPayloadTokenFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TypeAsPayloadTokenFilterTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TypeAsPayloadTokenFilterTest.cs
new file mode 100644
index 0000000..5796b39
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Payloads/TypeAsPayloadTokenFilterTest.cs
@@ -0,0 +1,81 @@
+namespace org.apache.lucene.analysis.payloads
+{
+
+	/// <summary>
+	/// Copyright 2004 The Apache Software Foundation
+	/// 
+	/// Licensed 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.
+	/// </summary>
+
+	using PayloadAttribute = org.apache.lucene.analysis.tokenattributes.PayloadAttribute;
+	using CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+	using TypeAttribute = org.apache.lucene.analysis.tokenattributes.TypeAttribute;
+
+
+	public class TypeAsPayloadTokenFilterTest : BaseTokenStreamTestCase
+	{
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void test() throws java.io.IOException
+	  public virtual void test()
+	  {
+		string test = "The quick red fox jumped over the lazy brown dogs";
+
+		TypeAsPayloadTokenFilter nptf = new TypeAsPayloadTokenFilter(new WordTokenFilter(this, new MockTokenizer(new StringReader(test), MockTokenizer.WHITESPACE, false)));
+		int count = 0;
+		CharTermAttribute termAtt = nptf.getAttribute(typeof(CharTermAttribute));
+		TypeAttribute typeAtt = nptf.getAttribute(typeof(TypeAttribute));
+		PayloadAttribute payloadAtt = nptf.getAttribute(typeof(PayloadAttribute));
+		nptf.reset();
+		while (nptf.incrementToken())
+		{
+		  assertTrue(typeAtt.type() + " is not null and it should be", typeAtt.type().Equals(char.ToUpper(termAtt.buffer()[0]).ToString()));
+		  assertTrue("nextToken.getPayload() is null and it shouldn't be", payloadAtt.Payload != null);
+		  string type = payloadAtt.Payload.utf8ToString();
+		  assertTrue(type + " is not equal to " + typeAtt.type(), type.Equals(typeAtt.type()));
+		  count++;
+		}
+
+		assertTrue(count + " does not equal: " + 10, count == 10);
+	  }
+
+	  private sealed class WordTokenFilter : TokenFilter
+	  {
+		  private readonly TypeAsPayloadTokenFilterTest outerInstance;
+
+		internal readonly CharTermAttribute termAtt = addAttribute(typeof(CharTermAttribute));
+		internal readonly TypeAttribute typeAtt = addAttribute(typeof(TypeAttribute));
+
+		internal WordTokenFilter(TypeAsPayloadTokenFilterTest outerInstance, TokenStream input) : base(input)
+		{
+			this.outerInstance = outerInstance;
+		}
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: @Override public boolean incrementToken() throws java.io.IOException
+		public override bool incrementToken()
+		{
+		  if (input.incrementToken())
+		  {
+			typeAtt.Type = char.ToUpper(termAtt.buffer()[0]).ToString();
+			return true;
+		  }
+		  else
+		  {
+			return false;
+		  }
+		}
+	  }
+
+	}
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Position/PositionFilterTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Position/PositionFilterTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Position/PositionFilterTest.cs
new file mode 100644
index 0000000..8af053f
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Position/PositionFilterTest.cs
@@ -0,0 +1,112 @@
+namespace org.apache.lucene.analysis.position
+{
+
+	/*
+	 * 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 ShingleFilter = org.apache.lucene.analysis.shingle.ShingleFilter;
+	using CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+
+	public class PositionFilterTest : BaseTokenStreamTestCase
+	{
+
+	  public class TestTokenStream : TokenStream
+	  {
+		  private readonly PositionFilterTest outerInstance;
+
+
+		protected internal int index = 0;
+		protected internal string[] testToken;
+		protected internal readonly CharTermAttribute termAtt = addAttribute(typeof(CharTermAttribute));
+
+		public TestTokenStream(PositionFilterTest outerInstance, string[] testToken) : base()
+		{
+			this.outerInstance = outerInstance;
+		  this.testToken = testToken;
+		}
+
+		public override bool incrementToken()
+		{
+		  clearAttributes();
+		  if (index < testToken.Length)
+		  {
+			termAtt.setEmpty().append(testToken[index++]);
+			return true;
+		  }
+		  else
+		  {
+			return false;
+		  }
+		}
+		public override void reset()
+		{
+		  index = 0;
+		}
+	  }
+
+	  public static readonly string[] TEST_TOKEN = new string[]{"please", "divide", "this", "sentence", "into", "shingles"};
+	  public static readonly int[] TEST_TOKEN_POSITION_INCREMENTS = new int[]{1, 0, 0, 0, 0, 0};
+	  public static readonly int[] TEST_TOKEN_NON_ZERO_POSITION_INCREMENTS = new int[]{1, 5, 5, 5, 5, 5};
+
+	  public static readonly string[] SIX_GRAM_NO_POSITIONS_TOKENS = new string[]{"please", "please divide", "please divide this", "please divide this sentence", "please divide this sentence into", "please divide this sentence into shingles", "divide", "divide this", "divide this sentence", "divide this sentence into", "divide this sentence into shingles", "this", "this sentence", "this sentence into", "this sentence into shingles", "sentence", "sentence into", "sentence into shingles", "into", "into shingles", "shingles"};
+	  public static readonly int[] SIX_GRAM_NO_POSITIONS_INCREMENTS = new int[]{1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+	  public static readonly string[] SIX_GRAM_NO_POSITIONS_TYPES = new string[]{"word", "shingle", "shingle", "shingle", "shingle", "shingle", "word", "shingle", "shingle", "shingle", "shingle", "word", "shingle", "shingle", "shingle", "word", "shingle", "shingle", "word", "shingle", "word"};
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFilter() throws Exception
+	  public virtual void testFilter()
+	  {
+
+		assertTokenStreamContents(new PositionFilter(new TestTokenStream(this, TEST_TOKEN)), TEST_TOKEN, TEST_TOKEN_POSITION_INCREMENTS);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNonZeroPositionIncrement() throws Exception
+	  public virtual void testNonZeroPositionIncrement()
+	  {
+
+		assertTokenStreamContents(new PositionFilter(new TestTokenStream(this, TEST_TOKEN), 5), TEST_TOKEN, TEST_TOKEN_NON_ZERO_POSITION_INCREMENTS);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReset() throws Exception
+	  public virtual void testReset()
+	  {
+
+		PositionFilter filter = new PositionFilter(new TestTokenStream(this, TEST_TOKEN));
+		assertTokenStreamContents(filter, TEST_TOKEN, TEST_TOKEN_POSITION_INCREMENTS);
+		filter.reset();
+		// Make sure that the reset filter provides correct position increments
+		assertTokenStreamContents(filter, TEST_TOKEN, TEST_TOKEN_POSITION_INCREMENTS);
+	  }
+
+	  /// <summary>
+	  /// Tests ShingleFilter up to six shingles against six terms.
+	  ///  Tests PositionFilter setting all but the first positionIncrement to zero. </summary> </exception>
+	  /// <exception cref="java.io.IOException"> <seealso cref= Token#next(Token) </seealso>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void test6GramFilterNoPositions() throws Exception
+	  public virtual void test6GramFilterNoPositions()
+	  {
+
+		ShingleFilter filter = new ShingleFilter(new TestTokenStream(this, TEST_TOKEN), 6);
+		assertTokenStreamContents(new PositionFilter(filter), SIX_GRAM_NO_POSITIONS_TOKENS, SIX_GRAM_NO_POSITIONS_INCREMENTS);
+	  }
+
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseAnalyzer.cs
new file mode 100644
index 0000000..53453be
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseAnalyzer.cs
@@ -0,0 +1,70 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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 TestPortugueseAnalyzer : BaseTokenStreamTestCase
+	{
+	  /// <summary>
+	  /// This test fails with NPE when the 
+	  /// stopwords file is missing in classpath 
+	  /// </summary>
+	  public virtual void testResourcesAvailable()
+	  {
+		new PortugueseAnalyzer(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 PortugueseAnalyzer(TEST_VERSION_CURRENT);
+		// stemming
+		checkOneTerm(a, "quilométricas", "quilometric");
+		checkOneTerm(a, "quilométricos", "quilometric");
+		// stopword
+		assertAnalyzesTo(a, "não", new string[] {});
+	  }
+
+	  /// <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("quilométricas"), false);
+		Analyzer a = new PortugueseAnalyzer(TEST_VERSION_CURRENT, PortugueseAnalyzer.DefaultStopSet, exclusionSet);
+		checkOneTerm(a, "quilométricas", "quilométricas");
+		checkOneTerm(a, "quilométricos", "quilometric");
+	  }
+
+	  /// <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 PortugueseAnalyzer(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/Pt/TestPortugueseLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseLightStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseLightStemFilter.cs
new file mode 100644
index 0000000..e8fc9c7
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseLightStemFilter.cs
@@ -0,0 +1,167 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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 TokenStreamComponents = org.apache.lucene.analysis.Analyzer.TokenStreamComponents;
+	using KeywordTokenizer = org.apache.lucene.analysis.core.KeywordTokenizer;
+	using LowerCaseFilter = org.apache.lucene.analysis.core.LowerCaseFilter;
+	using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
+	using StandardTokenizer = org.apache.lucene.analysis.standard.StandardTokenizer;
+	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="PortugueseLightStemFilter"/>
+	/// </summary>
+	public class TestPortugueseLightStemFilter : BaseTokenStreamTestCase
+	{
+	  private Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper();
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  public AnalyzerAnonymousInnerClassHelper()
+		  {
+		  }
+
+		  protected internal override Analyzer.TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new StandardTokenizer(TEST_VERSION_CURRENT, reader);
+			TokenStream result = new LowerCaseFilter(TEST_VERSION_CURRENT, source);
+			return new Analyzer.TokenStreamComponents(source, new PortugueseLightStemFilter(result));
+		  }
+	  }
+
+	  /// <summary>
+	  /// Test the example from the paper "Assessing the impact of stemming accuracy
+	  /// on information retrieval"
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testExamples() throws java.io.IOException
+	  public virtual void testExamples()
+	  {
+		assertAnalyzesTo(analyzer, "O debate político, pelo menos o que vem a público, parece, de modo nada " + "surpreendente, restrito a temas menores. Mas há, evidentemente, " + "grandes questões em jogo nas eleições que se aproximam.", new string[] {"o", "debat", "politic", "pelo", "meno", "o", "que", "vem", "a", "public", "parec", "de", "modo", "nada", "surpreendent", "restrit", "a", "tema", "menor", "mas", "há", "evident", "grand", "questa", "em", "jogo", "nas", "eleica", "que", "se", "aproximam"});
+	  }
+
+	  /// <summary>
+	  /// Test examples from the c implementation
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testMoreExamples() throws java.io.IOException
+	  public virtual void testMoreExamples()
+	  {
+		 checkOneTerm(analyzer, "doutores", "doutor");
+		 checkOneTerm(analyzer, "doutor", "doutor");
+
+		 checkOneTerm(analyzer, "homens", "homem");
+		 checkOneTerm(analyzer, "homem", "homem");
+
+		 checkOneTerm(analyzer, "papéis", "papel");
+		 checkOneTerm(analyzer, "papel", "papel");
+
+		 checkOneTerm(analyzer, "normais", "normal");
+		 checkOneTerm(analyzer, "normal", "normal");
+
+		 checkOneTerm(analyzer, "lencóis", "lencol");
+		 checkOneTerm(analyzer, "lencol", "lencol");
+
+		 checkOneTerm(analyzer, "barris", "barril");
+		 checkOneTerm(analyzer, "barril", "barril");
+
+		 checkOneTerm(analyzer, "botões", "bota");
+		 checkOneTerm(analyzer, "botão", "bota");
+	  }
+
+	  /// <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("ptlighttestdata.zip"), "ptlight.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("quilométricas"), false);
+		CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("quilométricas"), false);
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper2(this, exclusionSet);
+		checkOneTerm(a, "quilométricas", "quilométricas");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper2 : Analyzer
+	  {
+		  private readonly TestPortugueseLightStemFilter outerInstance;
+
+		  private CharArraySet exclusionSet;
+
+		  public AnalyzerAnonymousInnerClassHelper2(TestPortugueseLightStemFilter outerInstance, CharArraySet exclusionSet)
+		  {
+			  this.outerInstance = outerInstance;
+			  this.exclusionSet = exclusionSet;
+		  }
+
+		  protected internal override Analyzer.TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+			TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
+			return new Analyzer.TokenStreamComponents(source, new PortugueseLightStemFilter(sink));
+		  }
+	  }
+
+	  /// <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(), analyzer, 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 AnalyzerAnonymousInnerClassHelper3(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper3 : Analyzer
+	  {
+		  private readonly TestPortugueseLightStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper3(TestPortugueseLightStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override Analyzer.TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new Analyzer.TokenStreamComponents(tokenizer, new PortugueseLightStemFilter(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/Pt/TestPortugueseLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseLightStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseLightStemFilterFactory.cs
new file mode 100644
index 0000000..96c4b3a
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseLightStemFilterFactory.cs
@@ -0,0 +1,57 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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 Portuguese Light stem factory is working.
+	/// </summary>
+	public class TestPortugueseLightStemFilterFactory : 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("evidentemente");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("PortugueseLightStem").create(stream);
+		assertTokenStreamContents(stream, new string[] {"evident"});
+	  }
+
+	  /// <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("PortugueseLightStem", "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/Pt/TestPortugueseMinimalStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseMinimalStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseMinimalStemFilter.cs
new file mode 100644
index 0000000..77a9f1f
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseMinimalStemFilter.cs
@@ -0,0 +1,138 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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 TokenStreamComponents = org.apache.lucene.analysis.Analyzer.TokenStreamComponents;
+	using KeywordTokenizer = org.apache.lucene.analysis.core.KeywordTokenizer;
+	using LowerCaseFilter = org.apache.lucene.analysis.core.LowerCaseFilter;
+	using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
+	using StandardTokenizer = org.apache.lucene.analysis.standard.StandardTokenizer;
+	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="PortugueseMinimalStemFilter"/>
+	/// </summary>
+	public class TestPortugueseMinimalStemFilter : BaseTokenStreamTestCase
+	{
+	  private Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper();
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  public AnalyzerAnonymousInnerClassHelper()
+		  {
+		  }
+
+		  protected internal override Analyzer.TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new StandardTokenizer(TEST_VERSION_CURRENT, reader);
+			TokenStream result = new LowerCaseFilter(TEST_VERSION_CURRENT, source);
+			return new Analyzer.TokenStreamComponents(source, new PortugueseMinimalStemFilter(result));
+		  }
+	  }
+
+	  /// <summary>
+	  /// Test the example from the paper "Assessing the impact of stemming accuracy
+	  /// on information retrieval"
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testExamples() throws java.io.IOException
+	  public virtual void testExamples()
+	  {
+		assertAnalyzesTo(analyzer, "O debate político, pelo menos o que vem a público, parece, de modo nada " + "surpreendente, restrito a temas menores. Mas há, evidentemente, " + "grandes questões em jogo nas eleições que se aproximam.", new string[] {"o", "debate", "político", "pelo", "menos", "o", "que", "vem", "a", "público", "parece", "de", "modo", "nada", "surpreendente", "restrito", "a", "tema", "menor", "mas", "há", "evidentemente", "grande", "questão", "em", "jogo", "na", "eleição", "que", "se", "aproximam"});
+	  }
+
+	  /// <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("ptminimaltestdata.zip"), "ptminimal.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("quilométricas"), false);
+		CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("quilométricas"), false);
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper2(this, exclusionSet);
+		checkOneTerm(a, "quilométricas", "quilométricas");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper2 : Analyzer
+	  {
+		  private readonly TestPortugueseMinimalStemFilter outerInstance;
+
+		  private CharArraySet exclusionSet;
+
+		  public AnalyzerAnonymousInnerClassHelper2(TestPortugueseMinimalStemFilter outerInstance, CharArraySet exclusionSet)
+		  {
+			  this.outerInstance = outerInstance;
+			  this.exclusionSet = exclusionSet;
+		  }
+
+		  protected internal override Analyzer.TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+			TokenStream sink = new SetKeywordMarkerFilter(source, exclusionSet);
+			return new Analyzer.TokenStreamComponents(source, new PortugueseMinimalStemFilter(sink));
+		  }
+	  }
+
+	  /// <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(), analyzer, 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 AnalyzerAnonymousInnerClassHelper3(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper3 : Analyzer
+	  {
+		  private readonly TestPortugueseMinimalStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper3(TestPortugueseMinimalStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override Analyzer.TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new Analyzer.TokenStreamComponents(tokenizer, new PortugueseMinimalStemFilter(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/Pt/TestPortugueseMinimalStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseMinimalStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseMinimalStemFilterFactory.cs
new file mode 100644
index 0000000..0b71514
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseMinimalStemFilterFactory.cs
@@ -0,0 +1,57 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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 Portuguese Minimal stem factory is working.
+	/// </summary>
+	public class TestPortugueseMinimalStemFilterFactory : 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("questões");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("PortugueseMinimalStem").create(stream);
+		assertTokenStreamContents(stream, new string[] {"questão"});
+	  }
+
+	  /// <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("PortugueseMinimalStem", "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/Pt/TestPortugueseStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseStemFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseStemFilter.cs
new file mode 100644
index 0000000..7bb1d4d
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseStemFilter.cs
@@ -0,0 +1,137 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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.
+	 */
+
+//JAVA TO C# CONVERTER TODO TASK: This Java 'import static' statement cannot be converted to C#:
+//	import static org.apache.lucene.analysis.VocabularyAssert.assertVocabulary;
+
+
+	using KeywordTokenizer = org.apache.lucene.analysis.core.KeywordTokenizer;
+	using LowerCaseFilter = org.apache.lucene.analysis.core.LowerCaseFilter;
+	using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
+	using StandardTokenizer = org.apache.lucene.analysis.standard.StandardTokenizer;
+	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
+
+	/// <summary>
+	/// Simple tests for <seealso cref="PortugueseStemFilter"/>
+	/// </summary>
+	public class TestPortugueseStemFilter : BaseTokenStreamTestCase
+	{
+	  private Analyzer analyzer = new AnalyzerAnonymousInnerClassHelper();
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  public AnalyzerAnonymousInnerClassHelper()
+		  {
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer source = new StandardTokenizer(TEST_VERSION_CURRENT, reader);
+			TokenStream result = new LowerCaseFilter(TEST_VERSION_CURRENT, source);
+			return new TokenStreamComponents(source, new PortugueseStemFilter(result));
+		  }
+	  }
+
+	  /// <summary>
+	  /// Test the example from the paper "Assessing the impact of stemming accuracy
+	  /// on information retrieval"
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testExamples() throws java.io.IOException
+	  public virtual void testExamples()
+	  {
+		assertAnalyzesTo(analyzer, "O debate político, pelo menos o que vem a público, parece, de modo nada " + "surpreendente, restrito a temas menores. Mas há, evidentemente, " + "grandes questões em jogo nas eleições que se aproximam.", new string[] {"o", "debat", "politic", "pel", "menos", "o", "que", "vem", "a", "public", "parec", "de", "mod", "nad", "surpreend", "restrit", "a", "tem", "men", "mas", "ha", "evid", "grand", "quest", "em", "jog", "na", "eleic", "que", "se", "aproxim"});
+	  }
+
+	  /// <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("ptrslptestdata.zip"), "ptrslp.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("quilométricas"), false);
+		CharArraySet exclusionSet = new CharArraySet(TEST_VERSION_CURRENT, asSet("quilométricas"), false);
+		Analyzer a = new AnalyzerAnonymousInnerClassHelper2(this, exclusionSet);
+		checkOneTerm(a, "quilométricas", "quilométricas");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper2 : Analyzer
+	  {
+		  private readonly TestPortugueseStemFilter outerInstance;
+
+		  private CharArraySet exclusionSet;
+
+		  public AnalyzerAnonymousInnerClassHelper2(TestPortugueseStemFilter 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 PortugueseStemFilter(sink));
+		  }
+	  }
+
+	  /// <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(), analyzer, 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 AnalyzerAnonymousInnerClassHelper3(this);
+		checkOneTerm(a, "", "");
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper3 : Analyzer
+	  {
+		  private readonly TestPortugueseStemFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper3(TestPortugueseStemFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new PortugueseStemFilter(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/Pt/TestPortugueseStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseStemFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseStemFilterFactory.cs
new file mode 100644
index 0000000..4d5379b
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Pt/TestPortugueseStemFilterFactory.cs
@@ -0,0 +1,57 @@
+namespace org.apache.lucene.analysis.pt
+{
+
+	/*
+	 * 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 Portuguese stem factory is working.
+	/// </summary>
+	public class TestPortugueseStemFilterFactory : 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("maluquice");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("PortugueseStem").create(stream);
+		assertTokenStreamContents(stream, new string[] {"maluc"});
+	  }
+
+	  /// <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("PortugueseStem", "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/Query/QueryAutoStopWordAnalyzerTest.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzerTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzerTest.cs
new file mode 100644
index 0000000..c1ecca5
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Query/QueryAutoStopWordAnalyzerTest.cs
@@ -0,0 +1,165 @@
+namespace org.apache.lucene.analysis.query
+{
+	/*
+	 * 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 org.apache.lucene.analysis;
+	using Document = org.apache.lucene.document.Document;
+	using Field = org.apache.lucene.document.Field;
+	using TextField = org.apache.lucene.document.TextField;
+	using DirectoryReader = org.apache.lucene.index.DirectoryReader;
+	using IndexReader = org.apache.lucene.index.IndexReader;
+	using IndexWriter = org.apache.lucene.index.IndexWriter;
+	using IndexWriterConfig = org.apache.lucene.index.IndexWriterConfig;
+	using RAMDirectory = org.apache.lucene.store.RAMDirectory;
+
+
+	public class QueryAutoStopWordAnalyzerTest : BaseTokenStreamTestCase
+	{
+	  internal string[] variedFieldValues = new string[] {"the", "quick", "brown", "fox", "jumped", "over", "the", "lazy", "boring", "dog"};
+	  internal string[] repetitiveFieldValues = new string[] {"boring", "boring", "vaguelyboring"};
+	  internal RAMDirectory dir;
+	  internal Analyzer appAnalyzer;
+	  internal IndexReader reader;
+	  internal QueryAutoStopWordAnalyzer protectedAnalyzer;
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: @Override public void setUp() throws Exception
+	  public override void setUp()
+	  {
+		base.setUp();
+		dir = new RAMDirectory();
+		appAnalyzer = new MockAnalyzer(random(), MockTokenizer.WHITESPACE, false);
+		IndexWriter writer = new IndexWriter(dir, new IndexWriterConfig(TEST_VERSION_CURRENT, appAnalyzer));
+		int numDocs = 200;
+		for (int i = 0; i < numDocs; i++)
+		{
+		  Document doc = new Document();
+		  string variedFieldValue = variedFieldValues[i % variedFieldValues.Length];
+		  string repetitiveFieldValue = repetitiveFieldValues[i % repetitiveFieldValues.Length];
+		  doc.add(new TextField("variedField", variedFieldValue, Field.Store.YES));
+		  doc.add(new TextField("repetitiveField", repetitiveFieldValue, Field.Store.YES));
+		  writer.addDocument(doc);
+		}
+		writer.close();
+		reader = DirectoryReader.open(dir);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: @Override public void tearDown() throws Exception
+	  public override void tearDown()
+	  {
+		reader.close();
+		base.tearDown();
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNoStopwords() throws Exception
+	  public virtual void testNoStopwords()
+	  {
+		// Note: an empty list of fields passed in
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, System.Linq.Enumerable.Empty<string>(), 1);
+		TokenStream protectedTokenStream = protectedAnalyzer.tokenStream("variedField", "quick");
+		assertTokenStreamContents(protectedTokenStream, new string[]{"quick"});
+
+		protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "boring");
+		assertTokenStreamContents(protectedTokenStream, new string[]{"boring"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testDefaultStopwordsAllFields() throws Exception
+	  public virtual void testDefaultStopwordsAllFields()
+	  {
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader);
+		TokenStream protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "boring");
+		assertTokenStreamContents(protectedTokenStream, new string[0]); // Default stop word filtering will remove boring
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStopwordsAllFieldsMaxPercentDocs() throws Exception
+	  public virtual void testStopwordsAllFieldsMaxPercentDocs()
+	  {
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, 1f / 2f);
+
+		TokenStream protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "boring");
+		// A filter on terms in > one half of docs remove boring
+		assertTokenStreamContents(protectedTokenStream, new string[0]);
+
+		protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "vaguelyboring");
+		 // A filter on terms in > half of docs should not remove vaguelyBoring
+		assertTokenStreamContents(protectedTokenStream, new string[]{"vaguelyboring"});
+
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, 1f / 4f);
+		protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "vaguelyboring");
+		 // A filter on terms in > quarter of docs should remove vaguelyBoring
+		assertTokenStreamContents(protectedTokenStream, new string[0]);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStopwordsPerFieldMaxPercentDocs() throws Exception
+	  public virtual void testStopwordsPerFieldMaxPercentDocs()
+	  {
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, Arrays.asList("variedField"), 1f / 2f);
+		TokenStream protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "boring");
+		// A filter on one Field should not affect queries on another
+		assertTokenStreamContents(protectedTokenStream, new string[]{"boring"});
+
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, Arrays.asList("variedField", "repetitiveField"), 1f / 2f);
+		protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "boring");
+		// A filter on the right Field should affect queries on it
+		assertTokenStreamContents(protectedTokenStream, new string[0]);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testStopwordsPerFieldMaxDocFreq() throws Exception
+	  public virtual void testStopwordsPerFieldMaxDocFreq()
+	  {
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, Arrays.asList("repetitiveField"), 10);
+		int numStopWords = protectedAnalyzer.getStopWords("repetitiveField").length;
+		assertTrue("Should have identified stop words", numStopWords > 0);
+
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, Arrays.asList("repetitiveField", "variedField"), 10);
+		int numNewStopWords = protectedAnalyzer.getStopWords("repetitiveField").length + protectedAnalyzer.getStopWords("variedField").length;
+		assertTrue("Should have identified more stop words", numNewStopWords > numStopWords);
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testNoFieldNamePollution() throws Exception
+	  public virtual void testNoFieldNamePollution()
+	  {
+		protectedAnalyzer = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, appAnalyzer, reader, Arrays.asList("repetitiveField"), 10);
+
+		TokenStream protectedTokenStream = protectedAnalyzer.tokenStream("repetitiveField", "boring");
+		// Check filter set up OK
+		assertTokenStreamContents(protectedTokenStream, new string[0]);
+
+		protectedTokenStream = protectedAnalyzer.tokenStream("variedField", "boring");
+		// Filter should not prevent stopwords in one field being used in another
+		assertTokenStreamContents(protectedTokenStream, new string[]{"boring"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testTokenStream() throws Exception
+	  public virtual void testTokenStream()
+	  {
+		QueryAutoStopWordAnalyzer a = new QueryAutoStopWordAnalyzer(TEST_VERSION_CURRENT, new MockAnalyzer(random(), MockTokenizer.WHITESPACE, false), reader, 10);
+		TokenStream ts = a.tokenStream("repetitiveField", "this boring");
+		assertTokenStreamContents(ts, new string[] {"this"});
+	  }
+	}
+
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/c64856a7/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilter.cs
new file mode 100644
index 0000000..72510cb
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilter.cs
@@ -0,0 +1,169 @@
+using System;
+
+/*
+ * 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.
+ */
+
+namespace org.apache.lucene.analysis.reverse
+{
+
+
+	using KeywordTokenizer = org.apache.lucene.analysis.core.KeywordTokenizer;
+	using Version = org.apache.lucene.util.Version;
+
+	public class TestReverseStringFilter : BaseTokenStreamTestCase
+	{
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFilter() throws Exception
+	  public virtual void testFilter()
+	  {
+		TokenStream stream = new MockTokenizer(new StringReader("Do have a nice day"), MockTokenizer.WHITESPACE, false); // 1-4 length string
+		ReverseStringFilter filter = new ReverseStringFilter(TEST_VERSION_CURRENT, stream);
+		assertTokenStreamContents(filter, new string[] {"oD", "evah", "a", "ecin", "yad"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testFilterWithMark() throws Exception
+	  public virtual void testFilterWithMark()
+	  {
+		TokenStream stream = new MockTokenizer(new StringReader("Do have a nice day"), MockTokenizer.WHITESPACE, false); // 1-4 length string
+		ReverseStringFilter filter = new ReverseStringFilter(TEST_VERSION_CURRENT, stream, '\u0001');
+		assertTokenStreamContents(filter, new string[] {"\u0001oD", "\u0001evah", "\u0001a", "\u0001ecin", "\u0001yad"});
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReverseString() throws Exception
+	  public virtual void testReverseString()
+	  {
+		assertEquals("A", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "A"));
+		assertEquals("BA", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "AB"));
+		assertEquals("CBA", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "ABC"));
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReverseChar() throws Exception
+	  public virtual void testReverseChar()
+	  {
+		char[] buffer = new char[] {'A', 'B', 'C', 'D', 'E', 'F'};
+		ReverseStringFilter.reverse(TEST_VERSION_CURRENT, buffer, 2, 3);
+		assertEquals("ABEDCF", new string(buffer));
+	  }
+
+	  /// <summary>
+	  /// Test the broken 3.0 behavior, for back compat </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 testBackCompat() throws Exception
+	  [Obsolete("(3.1) Remove in Lucene 5.0")]
+	  public virtual void testBackCompat()
+	  {
+		assertEquals("\uDF05\uD866\uDF05\uD866", ReverseStringFilter.reverse(Version.LUCENE_30, "𩬅𩬅"));
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReverseSupplementary() throws Exception
+	  public virtual void testReverseSupplementary()
+	  {
+		// supplementary at end
+		assertEquals("𩬅艱鍟䇹愯瀛", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "瀛愯䇹鍟艱𩬅"));
+		// supplementary at end - 1
+		assertEquals("a𩬅艱鍟䇹愯瀛", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "瀛愯䇹鍟艱𩬅a"));
+		// supplementary at start
+		assertEquals("fedcba𩬅", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "𩬅abcdef"));
+		// supplementary at start + 1
+		assertEquals("fedcba𩬅z", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "z𩬅abcdef"));
+		// supplementary medial
+		assertEquals("gfe𩬅dcba", ReverseStringFilter.reverse(TEST_VERSION_CURRENT, "abcd𩬅efg"));
+	  }
+
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReverseSupplementaryChar() throws Exception
+	  public virtual void testReverseSupplementaryChar()
+	  {
+		// supplementary at end
+		char[] buffer = "abc瀛愯䇹鍟艱𩬅".ToCharArray();
+		ReverseStringFilter.reverse(TEST_VERSION_CURRENT, buffer, 3, 7);
+		assertEquals("abc𩬅艱鍟䇹愯瀛", new string(buffer));
+		// supplementary at end - 1
+		buffer = "abc瀛愯䇹鍟艱𩬅d".ToCharArray();
+		ReverseStringFilter.reverse(TEST_VERSION_CURRENT, buffer, 3, 8);
+		assertEquals("abcd𩬅艱鍟䇹愯瀛", new string(buffer));
+		// supplementary at start
+		buffer = "abc𩬅瀛愯䇹鍟艱".ToCharArray();
+		ReverseStringFilter.reverse(TEST_VERSION_CURRENT, buffer, 3, 7);
+		assertEquals("abc艱鍟䇹愯瀛𩬅", new string(buffer));
+		// supplementary at start + 1
+		buffer = "abcd𩬅瀛愯䇹鍟艱".ToCharArray();
+		ReverseStringFilter.reverse(TEST_VERSION_CURRENT, buffer, 3, 8);
+		assertEquals("abc艱鍟䇹愯瀛𩬅d", new string(buffer));
+		// supplementary medial
+		buffer = "abc瀛愯𩬅def".ToCharArray();
+		ReverseStringFilter.reverse(TEST_VERSION_CURRENT, buffer, 3, 7);
+		assertEquals("abcfed𩬅愯瀛", new string(buffer));
+	  }
+
+	  /// <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 a = new AnalyzerAnonymousInnerClassHelper(this);
+		checkRandomData(random(), a, 1000 * RANDOM_MULTIPLIER);
+	  }
+
+	  private class AnalyzerAnonymousInnerClassHelper : Analyzer
+	  {
+		  private readonly TestReverseStringFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper(TestReverseStringFilter 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 ReverseStringFilter(TEST_VERSION_CURRENT, tokenizer));
+		  }
+	  }
+
+//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 TestReverseStringFilter outerInstance;
+
+		  public AnalyzerAnonymousInnerClassHelper2(TestReverseStringFilter outerInstance)
+		  {
+			  this.outerInstance = outerInstance;
+		  }
+
+		  protected internal override TokenStreamComponents createComponents(string fieldName, Reader reader)
+		  {
+			Tokenizer tokenizer = new KeywordTokenizer(reader);
+			return new TokenStreamComponents(tokenizer, new ReverseStringFilter(TEST_VERSION_CURRENT, 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/Reverse/TestReverseStringFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilterFactory.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilterFactory.cs
new file mode 100644
index 0000000..25c9090
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Reverse/TestReverseStringFilterFactory.cs
@@ -0,0 +1,60 @@
+namespace org.apache.lucene.analysis.reverse
+{
+
+	/*
+	 * 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 Reverse string filter factory is working.
+	/// </summary>
+	public class TestReverseStringFilterFactory : BaseTokenStreamFactoryTestCase
+	{
+	  /// <summary>
+	  /// Ensure the filter actually reverses text.
+	  /// </summary>
+//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
+//ORIGINAL LINE: public void testReversing() throws Exception
+	  public virtual void testReversing()
+	  {
+		Reader reader = new StringReader("simple test");
+		TokenStream stream = new MockTokenizer(reader, MockTokenizer.WHITESPACE, false);
+		stream = tokenFilterFactory("ReverseString").create(stream);
+		assertTokenStreamContents(stream, new string[] {"elpmis", "tset"});
+	  }
+
+	  /// <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("ReverseString", "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/Ro/TestRomanianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ro/TestRomanianAnalyzer.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ro/TestRomanianAnalyzer.cs
new file mode 100644
index 0000000..48214d3
--- /dev/null
+++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Ro/TestRomanianAnalyzer.cs
@@ -0,0 +1,70 @@
+namespace org.apache.lucene.analysis.ro
+{
+
+	/*
+	 * 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 TestRomanianAnalyzer : BaseTokenStreamTestCase
+	{
+	  /// <summary>
+	  /// This test fails with NPE when the 
+	  /// stopwords file is missing in classpath 
+	  /// </summary>
+	  public virtual void testResourcesAvailable()
+	  {
+		new RomanianAnalyzer(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 RomanianAnalyzer(TEST_VERSION_CURRENT);
+		// stemming
+		checkOneTerm(a, "absenţa", "absenţ");
+		checkOneTerm(a, "absenţi", "absenţ");
+		// stopword
+		assertAnalyzesTo(a, "îl", new string[] {});
+	  }
+
+	  /// <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("absenţa"), false);
+		Analyzer a = new RomanianAnalyzer(TEST_VERSION_CURRENT, RomanianAnalyzer.DefaultStopSet, exclusionSet);
+		checkOneTerm(a, "absenţa", "absenţa");
+		checkOneTerm(a, "absenţi", "absenţ");
+	  }
+
+	  /// <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 RomanianAnalyzer(TEST_VERSION_CURRENT), 1000 * RANDOM_MULTIPLIER);
+	  }
+	}
+
+}
\ No newline at end of file