lucenenet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From synhers...@apache.org
Subject [4/4] lucenenet git commit: More Analysis porting fixes
Date Sun, 09 Nov 2014 04:48:00 GMT
More Analysis porting fixes


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

Branch: refs/heads/master
Commit: cd3ee13667f98fb0ee64c82868ba1fed9cd1349e
Parents: 6f6f938
Author: Itamar Syn-Hershko <itamar@code972.com>
Authored: Sun Nov 9 06:47:50 2014 +0200
Committer: Itamar Syn-Hershko <itamar@code972.com>
Committed: Sun Nov 9 06:47:50 2014 +0200

----------------------------------------------------------------------
 .../Analysis/CharFilter/BaseCharFilter.cs       | 161 +++---
 .../Analysis/CharFilter/MappingCharFilter.cs    |  36 +-
 .../Analysis/CharFilter/NormalizeCharMap.cs     |   2 +-
 .../Analysis/CommonGrams/CommonGramsFilter.cs   |   1 +
 .../Compound/CompoundWordTokenFilterBase.cs     |  36 +-
 .../DictionaryCompoundWordTokenFilter.cs        | 259 +++++-----
 .../DictionaryCompoundWordTokenFilterFactory.cs | 136 +++--
 .../HyphenationCompoundWordTokenFilter.cs       | 497 +++++++++----------
 ...HyphenationCompoundWordTokenFilterFactory.cs |  25 +-
 .../Analysis/Core/LowerCaseFilter.cs            |   1 +
 .../Analysis/Core/StopAnalyzer.cs               |   5 +-
 .../Analysis/Core/StopFilterFactory.cs          | 286 ++++++-----
 .../Analysis/Core/UpperCaseFilter.cs            |   3 +-
 .../Analysis/Core/UpperCaseFilterFactory.cs     | 124 +++--
 .../Miscellaneous/ASCIIFoldingFilter.cs         |  56 +--
 .../Miscellaneous/ASCIIFoldingFilterFactory.cs  |  12 +-
 .../Miscellaneous/CapitalizationFilter.cs       |  31 +-
 .../CapitalizationFilterFactory.cs              | 207 ++++----
 .../Analysis/Miscellaneous/KeepWordFilter.cs    |  88 ++--
 .../Miscellaneous/KeepWordFilterFactory.cs      | 194 ++++----
 .../Miscellaneous/KeywordMarkerFilterFactory.cs | 172 +++----
 .../Miscellaneous/KeywordRepeatFilterFactory.cs |  87 ++--
 .../Lucene47WordDelimiterFilter.cs              |   3 +-
 .../Analysis/Miscellaneous/PatternAnalyzer.cs   |   5 +-
 .../RemoveDuplicatesTokenFilter.cs              | 131 +++--
 .../RemoveDuplicatesTokenFilterFactory.cs       |  11 +-
 .../Miscellaneous/ScandinavianFoldingFilter.cs  |   6 +-
 .../ScandinavianNormalizationFilter.cs          |   6 +-
 .../Miscellaneous/SetKeywordMarkerFilter.cs     | 107 ++--
 .../StemmerOverrideFilterFactory.cs             | 168 +++----
 .../Miscellaneous/WordDelimiterFilter.cs        |   3 +-
 .../Miscellaneous/WordDelimiterFilterFactory.cs |  34 +-
 .../Analysis/Ngram/EdgeNGramFilterFactory.cs    | 105 ++--
 .../Analysis/Ngram/EdgeNGramTokenFilter.cs      |  97 ++--
 .../Analysis/Ngram/EdgeNGramTokenizerFactory.cs |  19 +-
 .../Analysis/Ngram/NGramTokenFilter.cs          |   6 +-
 .../Analysis/Ngram/NGramTokenizer.cs            |   3 +-
 .../DelimitedPayloadTokenFilterFactory.cs       | 147 +++---
 .../Analysis/Position/PositionFilter.cs         |  25 +-
 .../Analysis/Position/PositionFilterFactory.cs  | 119 +++--
 .../Analysis/Query/QueryAutoStopWordAnalyzer.cs | 401 +++++++--------
 .../Analysis/Standard/ClassicAnalyzer.cs        |   8 +-
 .../Analysis/Standard/StandardAnalyzer.cs       |   8 +-
 .../Analysis/Standard/UAX29URLEmailAnalyzer.cs  |   6 +-
 .../Analysis/Synonym/FSTSynonymFilterFactory.cs |  12 +-
 .../Analysis/Synonym/SlowSynonymFilter.cs       |  22 +-
 .../Synonym/SlowSynonymFilterFactory.cs         |   1 +
 .../Analysis/Synonym/SlowSynonymMap.cs          |  10 +-
 .../Analysis/Synonym/SynonymFilterFactory.cs    | 173 ++++---
 .../Analysis/Util/AnalysisSPILoader.cs          |   9 +-
 .../Analysis/Util/CharArrayMap.cs               |  57 +--
 .../Analysis/Util/CharArraySet.cs               |  54 +-
 .../Analysis/Util/CharacterUtils.cs             |  14 +-
 .../Analysis/Util/ClasspathResourceLoader.cs    |  11 +-
 .../Analysis/Util/ElisionFilter.cs              | 141 +++---
 .../Analysis/Util/FilesystemResourceLoader.cs   |   7 +-
 .../Analysis/Util/FilteringTokenFilter.cs       |   2 +
 .../Analysis/Util/MultiTermAwareComponent.cs    |  67 ++-
 .../Analysis/Util/OpenStringBuilder.cs          |   2 +-
 .../Analysis/Util/ResourceLoader.cs             |  87 ++--
 .../Analysis/Util/ResourceLoaderAware.cs        |  33 +-
 .../Analysis/Util/RollingCharBuffer.cs          | 364 +++++++-------
 .../Analysis/Util/SegmentingTokenizerBase.cs    | 113 ++---
 .../Analysis/Util/StemmerUtil.cs                | 271 +++++-----
 .../Analysis/Util/StopwordAnalyzerBase.cs       |  53 +-
 .../Analysis/Util/WordlistLoader.cs             |  39 +-
 src/Lucene.Net.Core/Analysis/CharFilter.cs      |   8 +-
 .../Analysis/MockCharFilter.cs                  |   2 +-
 .../core/Analysis/TestCharFilter.cs             |   4 +-
 .../core/Analysis/TestMockAnalyzer.cs           |   2 +-
 70 files changed, 2532 insertions(+), 2863 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs
index 1127842..064b653 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/BaseCharFilter.cs
@@ -15,91 +15,97 @@
  * limitations under the License.
  */
 
+using System.Diagnostics;
+using System.IO;
+using Lucene.Net.Support;
+using Lucene.Net.Util;
+
 namespace Lucene.Net.Analysis.CharFilter
 {
     /// <summary>
-	/// Base utility class for implementing a <seealso cref="CharFilter"/>.
-	/// You subclass this, and then record mappings by calling
-	/// <seealso cref="#addOffCorrectMap"/>, and then invoke the correct
-	/// method to correct an offset.
-	/// </summary>
-	public abstract class BaseCharFilter : CharFilter
-	{
+    /// Base utility class for implementing a <seealso cref="CharFilter"/>.
+    /// You subclass this, and then record mappings by calling
+    /// <seealso cref="#addOffCorrectMap"/>, and then invoke the correct
+    /// method to correct an offset.
+    /// </summary>
+    public abstract class BaseCharFilter : CharFilter
+    {
 
-	  private int[] offsets;
-	  private int[] diffs;
-	  private int size = 0;
+        private int[] offsets;
+        private int[] diffs;
+        private int size = 0;
 
-	  public BaseCharFilter(Reader @in) : base(@in)
-	  {
-	  }
+        protected BaseCharFilter(TextReader @in)
+            : base(@in)
+        {
+        }
 
-	  /// <summary>
-	  /// Retrieve the corrected offset. </summary>
-	  protected internal override int correct(int currentOff)
-	  {
-		if (offsets == null || currentOff < offsets[0])
-		{
-		  return currentOff;
-		}
+        /// <summary>
+        /// Retrieve the corrected offset. </summary>
+        protected internal override int Correct(int currentOff)
+        {
+            if (offsets == null || currentOff < offsets[0])
+            {
+                return currentOff;
+            }
 
-		int hi = size - 1;
-		if (currentOff >= offsets[hi])
-		{
-		  return currentOff + diffs[hi];
-		}
+            int hi = size - 1;
+            if (currentOff >= offsets[hi])
+            {
+                return currentOff + diffs[hi];
+            }
 
-		int lo = 0;
-		int mid = -1;
+            int lo = 0;
+            int mid = -1;
 
-		while (hi >= lo)
-		{
-		  mid = (int)((uint)(lo + hi) >> 1);
-		  if (currentOff < offsets[mid])
-		  {
-			hi = mid - 1;
-		  }
-		  else if (currentOff > offsets[mid])
-		  {
-			lo = mid + 1;
-		  }
-		  else
-		  {
-			return currentOff + diffs[mid];
-		  }
-		}
+            while (hi >= lo)
+            {
+                mid = (int)((uint)(lo + hi) >> 1);
+                if (currentOff < offsets[mid])
+                {
+                    hi = mid - 1;
+                }
+                else if (currentOff > offsets[mid])
+                {
+                    lo = mid + 1;
+                }
+                else
+                {
+                    return currentOff + diffs[mid];
+                }
+            }
 
-		if (currentOff < offsets[mid])
-		{
-		  return mid == 0 ? currentOff : currentOff + diffs[mid - 1];
-		}
-		else
-		{
-		  return currentOff + diffs[mid];
-		}
-	  }
+            if (currentOff < offsets[mid])
+            {
+                return mid == 0 ? currentOff : currentOff + diffs[mid - 1];
+            }
+            else
+            {
+                return currentOff + diffs[mid];
+            }
+        }
 
-	  protected internal virtual int LastCumulativeDiff
-	  {
-		  get
-		  {
-			return offsets == null ? 0 : diffs[size-1];
-		  }
-	  }
+        protected internal virtual int LastCumulativeDiff
+        {
+            get
+            {
+                return offsets == null ? 0 : diffs[size - 1];
+            }
+        }
 
-	  /// <summary>
-	  /// <para>
-	  ///   Adds an offset correction mapping at the given output stream offset.
-	  /// </para>
-	  /// <para>
-	  ///   Assumption: the offset given with each successive call to this method
-	  ///   will not be smaller than the offset given at the previous invocation.
-	  /// </para>
-	  /// </summary>
-	  /// <param name="off"> The output stream offset at which to apply the correction </param>
-	  /// <param name="cumulativeDiff"> The input offset is given by adding this
-	  ///                       to the output offset </param>
-	  protected internal virtual void addOffCorrectMap(int off, int cumulativeDiff)
+        /// <summary>
+        /// <para>
+        ///   Adds an offset correction mapping at the given output stream offset.
+        /// </para>
+        /// <para>
+        ///   Assumption: the offset given with each successive call to this method
+        ///   will not be smaller than the offset given at the previous invocation.
+        /// </para>
+        /// </summary>
+        /// <param name="off"> The output stream offset at which to apply the correction </param>
+        /// <param name="cumulativeDiff"> The input offset is given by adding this
+        ///                       to the output offset </param>
+        protected internal virtual void AddOffCorrectMap(int off, int cumulativeDiff)
 	  {
 		if (offsets == null)
 		{
@@ -108,11 +114,11 @@ namespace Lucene.Net.Analysis.CharFilter
 		}
 		else if (size == offsets.Length)
 		{
-		  offsets = ArrayUtil.grow(offsets);
-		  diffs = ArrayUtil.grow(diffs);
+		  offsets = ArrayUtil.Grow(offsets);
+		  diffs = ArrayUtil.Grow(diffs);
 		}
 
-		assert(size == 0 || off >= offsets[size - 1]) : "Offset #" + size + "(" + off + ") is less than the last recorded offset " + offsets[size - 1] + "\n" + Arrays.ToString(offsets) + "\n" + Arrays.ToString(diffs);
+		Debug.Assert(size == 0 || off >= offsets[size - 1]) : "Offset #" + size + "(" + off + ") is less than the last recorded offset " + offsets[size - 1] + "\n" + Arrays.ToString(offsets) + "\n" + Arrays.ToString(diffs);
 
 		if (size == 0 || off != offsets[size - 1])
 		{
@@ -124,6 +130,5 @@ namespace Lucene.Net.Analysis.CharFilter
 		  diffs[size - 1] = cumulativeDiff;
 		}
 	  }
-	}
-
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
index 5a148be..cd0cdc2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/MappingCharFilter.cs
@@ -1,7 +1,4 @@
-using System;
-using System.Diagnostics;
-using System.Collections.Generic;
-/*
+/*
  * 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.
@@ -17,19 +14,18 @@ using System.Collections.Generic;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-using Lucene.Net.Analysis.CharFilter;
+using System;
+using System.Collections.Generic;
+using System.Diagnostics;
+using System.IO;
+using Lucene.Net.Analysis.Util;
+using Lucene.Net.Util;
+using Lucene.Net.Util.Fst;
+using org.apache.lucene.analysis.charfilter;
 
-namespace org.apache.lucene.analysis.charfilter
+namespace Lucene.Net.Analysis.CharFilter
 {
-
-
-	using RollingCharBuffer = org.apache.lucene.analysis.util.RollingCharBuffer;
-	using CharsRef = org.apache.lucene.util.CharsRef;
-	using CharSequenceOutputs = org.apache.lucene.util.fst.CharSequenceOutputs;
-	using FST = org.apache.lucene.util.fst.FST;
-	using Outputs = org.apache.lucene.util.fst.Outputs;
-
-	/// <summary>
+    /// <summary>
 	/// Simplistic <seealso cref="CharFilter"/> that applies the mappings
 	/// contained in a <seealso cref="NormalizeCharMap"/> to the character
 	/// stream, and correcting the resulting changes to the
@@ -54,9 +50,9 @@ namespace org.apache.lucene.analysis.charfilter
 
 	  /// <summary>
 	  /// Default constructor that takes a <seealso cref="Reader"/>. </summary>
-	  public MappingCharFilter(NormalizeCharMap normMap, Reader @in) : base(@in)
+	  public MappingCharFilter(NormalizeCharMap normMap, TextReader @in) : base(@in)
 	  {
-		buffer.reset(@in);
+		buffer.Reset(@in);
 
 		map = normMap.map;
 		cachedRootArcs = normMap.cachedRootArcs;
@@ -71,11 +67,9 @@ namespace org.apache.lucene.analysis.charfilter
 		}
 	  }
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void reset() throws java.io.IOException
-	  public override void reset()
+	  public override void Reset()
 	  {
-		input.reset();
+		input.Reset();
 		buffer.reset(input);
 		replacement = null;
 		inputOff = 0;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
index ade4318..c143455 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CharFilter/NormalizeCharMap.cs
@@ -1,7 +1,6 @@
 using System;
 using System.Diagnostics;
 using System.Collections.Generic;
-
 /*
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -18,6 +17,7 @@ using System.Collections.Generic;
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
+using Lucene.Net.Analysis.CharFilter;
 
 namespace org.apache.lucene.analysis.charfilter
 {

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
index 06deccf..0d083c4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/CommonGrams/CommonGramsFilter.cs
@@ -16,6 +16,7 @@
  */
 using System.Text;
 using Lucene.Net.Analysis.Tokenattributes;
+using Lucene.Net.Analysis.Util;
 using Lucene.Net.Util;
 using org.apache.lucene.analysis.util;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Compound/CompoundWordTokenFilterBase.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/CompoundWordTokenFilterBase.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/CompoundWordTokenFilterBase.cs
index 58b40a1..f9cdf1f 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/CompoundWordTokenFilterBase.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/CompoundWordTokenFilterBase.cs
@@ -1,7 +1,10 @@
-using System.Diagnostics;
-using System.Collections.Generic;
+using System.Collections.Generic;
+using System.Diagnostics;
+using Lucene.Net.Analysis.Tokenattributes;
+using Lucene.Net.Analysis.Util;
+using Lucene.Net.Util;
 
-namespace org.apache.lucene.analysis.compound
+namespace Lucene.Net.Analysis.Compound
 {
 
 	/*
@@ -20,16 +23,7 @@ namespace org.apache.lucene.analysis.compound
 	 * See the License for the specific language governing permissions and
 	 * limitations under the License.
 	 */
-
-
-	using CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-	using OffsetAttribute = org.apache.lucene.analysis.tokenattributes.OffsetAttribute;
-	using PositionIncrementAttribute = org.apache.lucene.analysis.tokenattributes.PositionIncrementAttribute;
-	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
-	using AttributeSource = org.apache.lucene.util.AttributeSource;
-	using Version = org.apache.lucene.util.Version;
-
-	/// <summary>
+    /// <summary>
 	/// Base class for decomposition token filters.
 	/// <para>
 	/// 
@@ -86,7 +80,7 @@ namespace org.apache.lucene.analysis.compound
 	  protected internal CompoundWordTokenFilterBase(Version matchVersion, TokenStream input, CharArraySet dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, bool onlyLongestMatch) : base(input)
 	  {
 		this.matchVersion = matchVersion;
-		this.tokens = new LinkedList<>();
+		this.tokens = new LinkedList<CompoundToken>();
 		if (minWordSize < 0)
 		{
 		  throw new System.ArgumentException("minWordSize cannot be negative");
@@ -106,17 +100,15 @@ namespace org.apache.lucene.analysis.compound
 		this.dictionary = dictionary;
 	  }
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public final boolean incrementToken() throws java.io.IOException
-	  public override bool incrementToken()
+	  public override bool IncrementToken()
 	  {
 		if (tokens.Count > 0)
 		{
 		  Debug.Assert(current != null);
-		  CompoundToken token = tokens.RemoveFirst();
-		  restoreState(current); // keep all other attributes untouched
-		  termAtt.setEmpty().append(token.txt);
-		  offsetAtt.setOffset(token.startOffset, token.endOffset);
+		  CompoundToken token = tokens.First.Value; tokens.RemoveFirst();
+		  RestoreState(current); // keep all other attributes untouched
+		  termAtt.SetEmpty().Append(token.txt);
+		  offsetAtt.SetOffset(token.startOffset, token.endOffset);
 		  posIncAtt.PositionIncrement = 0;
 		  return true;
 		}
@@ -165,7 +157,7 @@ namespace org.apache.lucene.analysis.compound
 	  {
 		  private readonly CompoundWordTokenFilterBase outerInstance;
 
-		public readonly CharSequence txt;
+		public readonly string txt;
 		public readonly int startOffset, endOffset;
 
 		/// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilter.cs
index 6b875e0..a69c35d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilter.cs
@@ -1,137 +1,134 @@
-namespace org.apache.lucene.analysis.compound
-{
-
-	/*
-	 * 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 Lucene.Net.Analysis.Util;
+using Lucene.Net.Util;
 
-	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
-	using Version = org.apache.lucene.util.Version;
-
-	/// <summary>
-	/// A <seealso cref="TokenFilter"/> that decomposes compound words found in many Germanic languages.
-	/// <para>
-	/// "Donaudampfschiff" becomes Donau, dampf, schiff so that you can find
-	/// "Donaudampfschiff" even when you only enter "schiff". 
-	///  It uses a brute-force algorithm to achieve this.
-	/// </para>
-	/// <para>
-	/// You must specify the required <seealso cref="Version"/> compatibility when creating
-	/// CompoundWordTokenFilterBase:
-	/// <ul>
-	/// <li>As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0
-	/// supplementary characters in strings and char arrays provided as compound word
-	/// dictionaries.
-	/// </ul>
-	/// </para>
-	/// </summary>
-	public class DictionaryCompoundWordTokenFilter : CompoundWordTokenFilterBase
-	{
+namespace Lucene.Net.Analysis.Compound
+{
 
-	  /// <summary>
-	  /// Creates a new <seealso cref="DictionaryCompoundWordTokenFilter"/>
-	  /// </summary>
-	  /// <param name="matchVersion">
-	  ///          Lucene version to enable correct Unicode 4.0 behavior in the
-	  ///          dictionaries if Version > 3.0. See <a
-	  ///          href="CompoundWordTokenFilterBase.html#version"
-	  ///          >CompoundWordTokenFilterBase</a> for details. </param>
-	  /// <param name="input">
-	  ///          the <seealso cref="TokenStream"/> to process </param>
-	  /// <param name="dictionary">
-	  ///          the word dictionary to match against. </param>
-	  public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, CharArraySet dictionary) : base(matchVersion, input, dictionary)
-	  {
-		if (dictionary == null)
-		{
-		  throw new System.ArgumentException("dictionary cannot be null");
-		}
-	  }
+    /*
+     * 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.
+     */
+    /// <summary>
+    /// A <seealso cref="TokenFilter"/> that decomposes compound words found in many Germanic languages.
+    /// <para>
+    /// "Donaudampfschiff" becomes Donau, dampf, schiff so that you can find
+    /// "Donaudampfschiff" even when you only enter "schiff". 
+    ///  It uses a brute-force algorithm to achieve this.
+    /// </para>
+    /// <para>
+    /// You must specify the required <seealso cref="Version"/> compatibility when creating
+    /// CompoundWordTokenFilterBase:
+    /// <ul>
+    /// <li>As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0
+    /// supplementary characters in strings and char arrays provided as compound word
+    /// dictionaries.
+    /// </ul>
+    /// </para>
+    /// </summary>
+    public class DictionaryCompoundWordTokenFilter : CompoundWordTokenFilterBase
+    {
 
-	  /// <summary>
-	  /// Creates a new <seealso cref="DictionaryCompoundWordTokenFilter"/>
-	  /// </summary>
-	  /// <param name="matchVersion">
-	  ///          Lucene version to enable correct Unicode 4.0 behavior in the
-	  ///          dictionaries if Version > 3.0. See <a
-	  ///          href="CompoundWordTokenFilterBase.html#version"
-	  ///          >CompoundWordTokenFilterBase</a> for details. </param>
-	  /// <param name="input">
-	  ///          the <seealso cref="TokenStream"/> to process </param>
-	  /// <param name="dictionary">
-	  ///          the word dictionary to match against. </param>
-	  /// <param name="minWordSize">
-	  ///          only words longer than this get processed </param>
-	  /// <param name="minSubwordSize">
-	  ///          only subwords longer than this get to the output stream </param>
-	  /// <param name="maxSubwordSize">
-	  ///          only subwords shorter than this get to the output stream </param>
-	  /// <param name="onlyLongestMatch">
-	  ///          Add only the longest matching subword to the stream </param>
-	  public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, CharArraySet dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, bool onlyLongestMatch) : base(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch)
-	  {
-		if (dictionary == null)
-		{
-		  throw new System.ArgumentException("dictionary cannot be null");
-		}
-	  }
+        /// <summary>
+        /// Creates a new <seealso cref="DictionaryCompoundWordTokenFilter"/>
+        /// </summary>
+        /// <param name="matchVersion">
+        ///          Lucene version to enable correct Unicode 4.0 behavior in the
+        ///          dictionaries if Version > 3.0. See <a
+        ///          href="CompoundWordTokenFilterBase.html#version"
+        ///          >CompoundWordTokenFilterBase</a> for details. </param>
+        /// <param name="input">
+        ///          the <seealso cref="TokenStream"/> to process </param>
+        /// <param name="dictionary">
+        ///          the word dictionary to match against. </param>
+        public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, CharArraySet dictionary)
+            : base(matchVersion, input, dictionary)
+        {
+            if (dictionary == null)
+            {
+                throw new System.ArgumentException("dictionary cannot be null");
+            }
+        }
 
-	  protected internal override void decompose()
-	  {
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final int len = termAtt.length();
-		int len = termAtt.length();
-		for (int i = 0;i <= len - this.minSubwordSize;++i)
-		{
-			CompoundToken longestMatchToken = null;
-			for (int j = this.minSubwordSize;j <= this.maxSubwordSize;++j)
-			{
-				if (i + j > len)
-				{
-					break;
-				}
-				if (dictionary.contains(termAtt.buffer(), i, j))
-				{
-					if (this.onlyLongestMatch)
-					{
-					   if (longestMatchToken != null)
-					   {
-						 if (longestMatchToken.txt.length() < j)
-						 {
-						   longestMatchToken = new CompoundToken(this, i,j);
-						 }
-					   }
-					   else
-					   {
-						 longestMatchToken = new CompoundToken(this, i,j);
-					   }
-					}
-					else
-					{
-					   tokens.AddLast(new CompoundToken(this, i,j));
-					}
-				}
-			}
-			if (this.onlyLongestMatch && longestMatchToken != null)
-			{
-			  tokens.AddLast(longestMatchToken);
-			}
-		}
-	  }
-	}
+        /// <summary>
+        /// Creates a new <seealso cref="DictionaryCompoundWordTokenFilter"/>
+        /// </summary>
+        /// <param name="matchVersion">
+        ///          Lucene version to enable correct Unicode 4.0 behavior in the
+        ///          dictionaries if Version > 3.0. See <a
+        ///          href="CompoundWordTokenFilterBase.html#version"
+        ///          >CompoundWordTokenFilterBase</a> for details. </param>
+        /// <param name="input">
+        ///          the <seealso cref="TokenStream"/> to process </param>
+        /// <param name="dictionary">
+        ///          the word dictionary to match against. </param>
+        /// <param name="minWordSize">
+        ///          only words longer than this get processed </param>
+        /// <param name="minSubwordSize">
+        ///          only subwords longer than this get to the output stream </param>
+        /// <param name="maxSubwordSize">
+        ///          only subwords shorter than this get to the output stream </param>
+        /// <param name="onlyLongestMatch">
+        ///          Add only the longest matching subword to the stream </param>
+        public DictionaryCompoundWordTokenFilter(Version matchVersion, TokenStream input, CharArraySet dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, bool onlyLongestMatch)
+            : base(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch)
+        {
+            if (dictionary == null)
+            {
+                throw new System.ArgumentException("dictionary cannot be null");
+            }
+        }
 
+        protected internal override void Decompose()
+        {
+            int len = termAtt.Length;
+            for (int i = 0; i <= len - this.minSubwordSize; ++i)
+            {
+                CompoundToken longestMatchToken = null;
+                for (int j = this.minSubwordSize; j <= this.maxSubwordSize; ++j)
+                {
+                    if (i + j > len)
+                    {
+                        break;
+                    }
+                    if (dictionary.Contains(termAtt.Buffer(), i, j))
+                    {
+                        if (this.onlyLongestMatch)
+                        {
+                            if (longestMatchToken != null)
+                            {
+                                if (longestMatchToken.txt.Length < j)
+                                {
+                                    longestMatchToken = new CompoundToken(this, i, j);
+                                }
+                            }
+                            else
+                            {
+                                longestMatchToken = new CompoundToken(this, i, j);
+                            }
+                        }
+                        else
+                        {
+                            tokens.AddLast(new CompoundToken(this, i, j));
+                        }
+                    }
+                }
+                if (this.onlyLongestMatch && longestMatchToken != null)
+                {
+                    tokens.AddLast(longestMatchToken);
+                }
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilterFactory.cs
index 497d89d..ef8f1dc 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/DictionaryCompoundWordTokenFilterFactory.cs
@@ -1,81 +1,71 @@
 using System.Collections.Generic;
-using TokenFilterFactory = Lucene.Net.Analysis.Util.TokenFilterFactory;
+using Lucene.Net.Analysis.Util;
 
-namespace org.apache.lucene.analysis.compound
+namespace Lucene.Net.Analysis.Compound
 {
 
-	/*
-	 * 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.
-	 */
+    /*
+     * 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.
+     */
+    /// <summary>
+    /// Factory for <seealso cref="DictionaryCompoundWordTokenFilter"/>. 
+    /// <pre class="prettyprint">
+    /// &lt;fieldType name="text_dictcomp" class="solr.TextField" positionIncrementGap="100"&gt;
+    ///   &lt;analyzer&gt;
+    ///     &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
+    ///     &lt;filter class="solr.DictionaryCompoundWordTokenFilterFactory" dictionary="dictionary.txt"
+    ///         minWordSize="5" minSubwordSize="2" maxSubwordSize="15" onlyLongestMatch="true"/&gt;
+    ///   &lt;/analyzer&gt;
+    /// &lt;/fieldType&gt;</pre>
+    /// </summary>
+    public class DictionaryCompoundWordTokenFilterFactory : TokenFilterFactory, ResourceLoaderAware
+    {
+        private CharArraySet dictionary;
+        private readonly string dictFile;
+        private readonly int minWordSize;
+        private readonly int minSubwordSize;
+        private readonly int maxSubwordSize;
+        private readonly bool onlyLongestMatch;
 
-	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
-	using ResourceLoader = org.apache.lucene.analysis.util.ResourceLoader;
-	using ResourceLoaderAware = org.apache.lucene.analysis.util.ResourceLoaderAware;
-	using TokenFilterFactory = TokenFilterFactory;
-
-
-	/// <summary>
-	/// Factory for <seealso cref="DictionaryCompoundWordTokenFilter"/>. 
-	/// <pre class="prettyprint">
-	/// &lt;fieldType name="text_dictcomp" class="solr.TextField" positionIncrementGap="100"&gt;
-	///   &lt;analyzer&gt;
-	///     &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
-	///     &lt;filter class="solr.DictionaryCompoundWordTokenFilterFactory" dictionary="dictionary.txt"
-	///         minWordSize="5" minSubwordSize="2" maxSubwordSize="15" onlyLongestMatch="true"/&gt;
-	///   &lt;/analyzer&gt;
-	/// &lt;/fieldType&gt;</pre>
-	/// </summary>
-	public class DictionaryCompoundWordTokenFilterFactory : TokenFilterFactory, ResourceLoaderAware
-	{
-	  private CharArraySet dictionary;
-	  private readonly string dictFile;
-	  private readonly int minWordSize;
-	  private readonly int minSubwordSize;
-	  private readonly int maxSubwordSize;
-	  private readonly bool onlyLongestMatch;
-
-	  /// <summary>
-	  /// Creates a new DictionaryCompoundWordTokenFilterFactory </summary>
-	  public DictionaryCompoundWordTokenFilterFactory(IDictionary<string, string> args) : base(args)
-	  {
-		assureMatchVersion();
-		dictFile = require(args, "dictionary");
-		minWordSize = getInt(args, "minWordSize", CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_SIZE);
-		minSubwordSize = getInt(args, "minSubwordSize", CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE);
-		maxSubwordSize = getInt(args, "maxSubwordSize", CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE);
-		onlyLongestMatch = getBoolean(args, "onlyLongestMatch", true);
-		if (args.Count > 0)
-		{
-		  throw new System.ArgumentException("Unknown parameters: " + args);
-		}
-	  }
-
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void inform(org.apache.lucene.analysis.util.ResourceLoader loader) throws java.io.IOException
-	  public virtual void inform(ResourceLoader loader)
-	  {
-		dictionary = base.getWordSet(loader, dictFile, false);
-	  }
-
-	  public override TokenStream create(TokenStream input)
-	  {
-		// if the dictionary is null, it means it was empty
-		return dictionary == null ? input : new DictionaryCompoundWordTokenFilter(luceneMatchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
-	  }
-	}
+        /// <summary>
+        /// Creates a new DictionaryCompoundWordTokenFilterFactory </summary>
+        public DictionaryCompoundWordTokenFilterFactory(IDictionary<string, string> args)
+            : base(args)
+        {
+            assureMatchVersion();
+            dictFile = require(args, "dictionary");
+            minWordSize = getInt(args, "minWordSize", CompoundWordTokenFilterBase.DEFAULT_MIN_WORD_SIZE);
+            minSubwordSize = getInt(args, "minSubwordSize", CompoundWordTokenFilterBase.DEFAULT_MIN_SUBWORD_SIZE);
+            maxSubwordSize = getInt(args, "maxSubwordSize", CompoundWordTokenFilterBase.DEFAULT_MAX_SUBWORD_SIZE);
+            onlyLongestMatch = getBoolean(args, "onlyLongestMatch", true);
+            if (args.Count > 0)
+            {
+                throw new System.ArgumentException("Unknown parameters: " + args);
+            }
+        }
 
+        public virtual void Inform(ResourceLoader loader)
+        {
+            dictionary = base.GetWordSet(loader, dictFile, false);
+        }
 
+        public override TokenStream Create(TokenStream input)
+        {
+            // if the dictionary is null, it means it was empty
+            return dictionary == null ? input : new DictionaryCompoundWordTokenFilter(luceneMatchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch);
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilter.cs
index 0b5e99c..a8014ad 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilter.cs
@@ -1,255 +1,248 @@
-namespace org.apache.lucene.analysis.compound
-{
+using System.IO;
+using Lucene.Net.Analysis.Util;
+using Lucene.Net.Util;
+using org.apache.lucene.analysis.compound;
+using org.apache.lucene.analysis.compound.hyphenation;
 
-	/*
-	 * 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 Hyphenation = org.apache.lucene.analysis.compound.hyphenation.Hyphenation;
-	using HyphenationTree = org.apache.lucene.analysis.compound.hyphenation.HyphenationTree;
-	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
-	using Version = org.apache.lucene.util.Version;
-	using InputSource = org.xml.sax.InputSource;
-
-	/// <summary>
-	/// A <seealso cref="TokenFilter"/> that decomposes compound words found in many Germanic languages.
-	/// <para>
-	/// "Donaudampfschiff" becomes Donau, dampf, schiff so that you can find
-	/// "Donaudampfschiff" even when you only enter "schiff". It uses a hyphenation
-	/// grammar and a word dictionary to achieve this.
-	/// </para>
-	/// <para>
-	/// You must specify the required <seealso cref="Version"/> compatibility when creating
-	/// CompoundWordTokenFilterBase:
-	/// <ul>
-	/// <li>As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0
-	/// supplementary characters in strings and char arrays provided as compound word
-	/// dictionaries.
-	/// </ul>
-	/// </para>
-	/// </summary>
-	public class HyphenationCompoundWordTokenFilter : CompoundWordTokenFilterBase
-	{
-	  private HyphenationTree hyphenator;
-
-	  /// <summary>
-	  /// Creates a new <seealso cref="HyphenationCompoundWordTokenFilter"/> instance. 
-	  /// </summary>
-	  /// <param name="matchVersion">
-	  ///          Lucene version to enable correct Unicode 4.0 behavior in the
-	  ///          dictionaries if Version > 3.0. See <a
-	  ///          href="CompoundWordTokenFilterBase.html#version"
-	  ///          >CompoundWordTokenFilterBase</a> for details. </param>
-	  /// <param name="input">
-	  ///          the <seealso cref="TokenStream"/> to process </param>
-	  /// <param name="hyphenator">
-	  ///          the hyphenation pattern tree to use for hyphenation </param>
-	  /// <param name="dictionary">
-	  ///          the word dictionary to match against. </param>
-	  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, CharArraySet dictionary) : this(matchVersion, input, hyphenator, dictionary, DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE, false)
-	  {
-	  }
-
-	  /// <summary>
-	  /// Creates a new <seealso cref="HyphenationCompoundWordTokenFilter"/> instance.
-	  /// </summary>
-	  /// <param name="matchVersion">
-	  ///          Lucene version to enable correct Unicode 4.0 behavior in the
-	  ///          dictionaries if Version > 3.0. See <a
-	  ///          href="CompoundWordTokenFilterBase.html#version"
-	  ///          >CompoundWordTokenFilterBase</a> for details. </param>
-	  /// <param name="input">
-	  ///          the <seealso cref="TokenStream"/> to process </param>
-	  /// <param name="hyphenator">
-	  ///          the hyphenation pattern tree to use for hyphenation </param>
-	  /// <param name="dictionary">
-	  ///          the word dictionary to match against. </param>
-	  /// <param name="minWordSize">
-	  ///          only words longer than this get processed </param>
-	  /// <param name="minSubwordSize">
-	  ///          only subwords longer than this get to the output stream </param>
-	  /// <param name="maxSubwordSize">
-	  ///          only subwords shorter than this get to the output stream </param>
-	  /// <param name="onlyLongestMatch">
-	  ///          Add only the longest matching subword to the stream </param>
-	  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, CharArraySet dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, bool onlyLongestMatch) : base(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch)
-	  {
-
-		this.hyphenator = hyphenator;
-	  }
-
-	  /// <summary>
-	  /// Create a HyphenationCompoundWordTokenFilter with no dictionary.
-	  /// <para>
-	  /// Calls {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, CharArraySet, int, int, int, boolean)
-	  /// HyphenationCompoundWordTokenFilter(matchVersion, input, hyphenator,
-	  /// null, minWordSize, minSubwordSize, maxSubwordSize }
-	  /// </para>
-	  /// </summary>
-	  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, int minWordSize, int minSubwordSize, int maxSubwordSize) : this(matchVersion, input, hyphenator, null, minWordSize, minSubwordSize, maxSubwordSize, false)
-	  {
-	  }
-
-	  /// <summary>
-	  /// Create a HyphenationCompoundWordTokenFilter with no dictionary.
-	  /// <para>
-	  /// Calls {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, int, int, int) 
-	  /// HyphenationCompoundWordTokenFilter(matchVersion, input, hyphenator, 
-	  /// DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE }
-	  /// </para>
-	  /// </summary>
-	  public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator) : this(matchVersion, input, hyphenator, DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE)
-	  {
-	  }
-
-	  /// <summary>
-	  /// Create a hyphenator tree
-	  /// </summary>
-	  /// <param name="hyphenationFilename"> the filename of the XML grammar to load </param>
-	  /// <returns> An object representing the hyphenation patterns </returns>
-	  /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public static org.apache.lucene.analysis.compound.hyphenation.HyphenationTree getHyphenationTree(String hyphenationFilename) throws java.io.IOException
-	  public static HyphenationTree getHyphenationTree(string hyphenationFilename)
-	  {
-		return getHyphenationTree(new InputSource(hyphenationFilename));
-	  }
-
-	  /// <summary>
-	  /// Create a hyphenator tree
-	  /// </summary>
-	  /// <param name="hyphenationFile"> the file of the XML grammar to load </param>
-	  /// <returns> An object representing the hyphenation patterns </returns>
-	  /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public static org.apache.lucene.analysis.compound.hyphenation.HyphenationTree getHyphenationTree(java.io.File hyphenationFile) throws java.io.IOException
-	  public static HyphenationTree getHyphenationTree(File hyphenationFile)
-	  {
-		return getHyphenationTree(new InputSource(hyphenationFile.toURI().toASCIIString()));
-	  }
-
-	  /// <summary>
-	  /// Create a hyphenator tree
-	  /// </summary>
-	  /// <param name="hyphenationSource"> the InputSource pointing to the XML grammar </param>
-	  /// <returns> An object representing the hyphenation patterns </returns>
-	  /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: public static org.apache.lucene.analysis.compound.hyphenation.HyphenationTree getHyphenationTree(org.xml.sax.InputSource hyphenationSource) throws java.io.IOException
-	  public static HyphenationTree getHyphenationTree(InputSource hyphenationSource)
-	  {
-		HyphenationTree tree = new HyphenationTree();
-		tree.loadPatterns(hyphenationSource);
-		return tree;
-	  }
-
-	  protected internal override void decompose()
-	  {
-		// get the hyphenation points
-		Hyphenation hyphens = hyphenator.hyphenate(termAtt.buffer(), 0, termAtt.length(), 1, 1);
-		// No hyphen points found -> exit
-		if (hyphens == null)
-		{
-		  return;
-		}
-
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final int[] hyp = hyphens.getHyphenationPoints();
-		int[] hyp = hyphens.HyphenationPoints;
-
-		for (int i = 0; i < hyp.Length; ++i)
-		{
-		  int remaining = hyp.Length - i;
-		  int start = hyp[i];
-		  CompoundToken longestMatchToken = null;
-		  for (int j = 1; j < remaining; j++)
-		  {
-			int partLength = hyp[i + j] - start;
-
-			// if the part is longer than maxSubwordSize we
-			// are done with this round
-			if (partLength > this.maxSubwordSize)
-			{
-			  break;
-			}
-
-			// we only put subwords to the token stream
-			// that are longer than minPartSize
-			if (partLength < this.minSubwordSize)
-			{
-			  // BOGUS/BROKEN/FUNKY/WACKO: somehow we have negative 'parts' according to the 
-			  // calculation above, and we rely upon minSubwordSize being >=0 to filter them out...
-			  continue;
-			}
-
-			// check the dictionary
-			if (dictionary == null || dictionary.contains(termAtt.buffer(), start, partLength))
-			{
-			  if (this.onlyLongestMatch)
-			  {
-				if (longestMatchToken != null)
-				{
-				  if (longestMatchToken.txt.length() < partLength)
-				  {
-					longestMatchToken = new CompoundToken(this, start, partLength);
-				  }
-				}
-				else
-				{
-				  longestMatchToken = new CompoundToken(this, start, partLength);
-				}
-			  }
-			  else
-			  {
-				tokens.AddLast(new CompoundToken(this, start, partLength));
-			  }
-			}
-			else if (dictionary.contains(termAtt.buffer(), start, partLength - 1))
-			{
-			  // check the dictionary again with a word that is one character
-			  // shorter
-			  // to avoid problems with genitive 's characters and other binding
-			  // characters
-			  if (this.onlyLongestMatch)
-			  {
-				if (longestMatchToken != null)
-				{
-				  if (longestMatchToken.txt.length() < partLength - 1)
-				  {
-					longestMatchToken = new CompoundToken(this, start, partLength - 1);
-				  }
-				}
-				else
-				{
-				  longestMatchToken = new CompoundToken(this, start, partLength - 1);
-				}
-			  }
-			  else
-			  {
-				tokens.AddLast(new CompoundToken(this, start, partLength - 1));
-			  }
-			}
-		  }
-		  if (this.onlyLongestMatch && longestMatchToken != null)
-		  {
-			tokens.AddLast(longestMatchToken);
-		  }
-		}
-	  }
-	}
+namespace Lucene.Net.Analysis.Compound
+{
 
+    /*
+     * 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.
+     */
+    /// <summary>
+    /// A <seealso cref="TokenFilter"/> that decomposes compound words found in many Germanic languages.
+    /// <para>
+    /// "Donaudampfschiff" becomes Donau, dampf, schiff so that you can find
+    /// "Donaudampfschiff" even when you only enter "schiff". It uses a hyphenation
+    /// grammar and a word dictionary to achieve this.
+    /// </para>
+    /// <para>
+    /// You must specify the required <seealso cref="Version"/> compatibility when creating
+    /// CompoundWordTokenFilterBase:
+    /// <ul>
+    /// <li>As of 3.1, CompoundWordTokenFilterBase correctly handles Unicode 4.0
+    /// supplementary characters in strings and char arrays provided as compound word
+    /// dictionaries.
+    /// </ul>
+    /// </para>
+    /// </summary>
+    public class HyphenationCompoundWordTokenFilter : CompoundWordTokenFilterBase
+    {
+        private readonly HyphenationTree hyphenator;
+
+        /// <summary>
+        /// Creates a new <seealso cref="HyphenationCompoundWordTokenFilter"/> instance. 
+        /// </summary>
+        /// <param name="matchVersion">
+        ///          Lucene version to enable correct Unicode 4.0 behavior in the
+        ///          dictionaries if Version > 3.0. See <a
+        ///          href="CompoundWordTokenFilterBase.html#version"
+        ///          >CompoundWordTokenFilterBase</a> for details. </param>
+        /// <param name="input">
+        ///          the <seealso cref="TokenStream"/> to process </param>
+        /// <param name="hyphenator">
+        ///          the hyphenation pattern tree to use for hyphenation </param>
+        /// <param name="dictionary">
+        ///          the word dictionary to match against. </param>
+        public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, CharArraySet dictionary)
+            : this(matchVersion, input, hyphenator, dictionary, DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE, false)
+        {
+        }
+
+        /// <summary>
+        /// Creates a new <seealso cref="HyphenationCompoundWordTokenFilter"/> instance.
+        /// </summary>
+        /// <param name="matchVersion">
+        ///          Lucene version to enable correct Unicode 4.0 behavior in the
+        ///          dictionaries if Version > 3.0. See <a
+        ///          href="CompoundWordTokenFilterBase.html#version"
+        ///          >CompoundWordTokenFilterBase</a> for details. </param>
+        /// <param name="input">
+        ///          the <seealso cref="TokenStream"/> to process </param>
+        /// <param name="hyphenator">
+        ///          the hyphenation pattern tree to use for hyphenation </param>
+        /// <param name="dictionary">
+        ///          the word dictionary to match against. </param>
+        /// <param name="minWordSize">
+        ///          only words longer than this get processed </param>
+        /// <param name="minSubwordSize">
+        ///          only subwords longer than this get to the output stream </param>
+        /// <param name="maxSubwordSize">
+        ///          only subwords shorter than this get to the output stream </param>
+        /// <param name="onlyLongestMatch">
+        ///          Add only the longest matching subword to the stream </param>
+        public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, CharArraySet dictionary, int minWordSize, int minSubwordSize, int maxSubwordSize, bool onlyLongestMatch)
+            : base(matchVersion, input, dictionary, minWordSize, minSubwordSize, maxSubwordSize, onlyLongestMatch)
+        {
+
+            this.hyphenator = hyphenator;
+        }
+
+        /// <summary>
+        /// Create a HyphenationCompoundWordTokenFilter with no dictionary.
+        /// <para>
+        /// Calls {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, CharArraySet, int, int, int, boolean)
+        /// HyphenationCompoundWordTokenFilter(matchVersion, input, hyphenator,
+        /// null, minWordSize, minSubwordSize, maxSubwordSize }
+        /// </para>
+        /// </summary>
+        public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator, int minWordSize, int minSubwordSize, int maxSubwordSize)
+            : this(matchVersion, input, hyphenator, null, minWordSize, minSubwordSize, maxSubwordSize, false)
+        {
+        }
+
+        /// <summary>
+        /// Create a HyphenationCompoundWordTokenFilter with no dictionary.
+        /// <para>
+        /// Calls {@link #HyphenationCompoundWordTokenFilter(Version, TokenStream, HyphenationTree, int, int, int) 
+        /// HyphenationCompoundWordTokenFilter(matchVersion, input, hyphenator, 
+        /// DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE }
+        /// </para>
+        /// </summary>
+        public HyphenationCompoundWordTokenFilter(Version matchVersion, TokenStream input, HyphenationTree hyphenator)
+            : this(matchVersion, input, hyphenator, DEFAULT_MIN_WORD_SIZE, DEFAULT_MIN_SUBWORD_SIZE, DEFAULT_MAX_SUBWORD_SIZE)
+        {
+        }
+
+        /// <summary>
+        /// Create a hyphenator tree
+        /// </summary>
+        /// <param name="hyphenationFilename"> the filename of the XML grammar to load </param>
+        /// <returns> An object representing the hyphenation patterns </returns>
+        /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
+        public static HyphenationTree GetHyphenationTree(string hyphenationFilename)
+        {
+            return getHyphenationTree(new InputSource(hyphenationFilename));
+        }
+
+        /// <summary>
+        /// Create a hyphenator tree
+        /// </summary>
+        /// <param name="hyphenationFile"> the file of the XML grammar to load </param>
+        /// <returns> An object representing the hyphenation patterns </returns>
+        /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
+        public static HyphenationTree GetHyphenationTree(File hyphenationFile)
+        {
+            return getHyphenationTree(new InputSource(hyphenationFile.ToURI().toASCIIString()));
+        }
+
+        /// <summary>
+        /// Create a hyphenator tree
+        /// </summary>
+        /// <param name="hyphenationSource"> the InputSource pointing to the XML grammar </param>
+        /// <returns> An object representing the hyphenation patterns </returns>
+        /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
+        public static HyphenationTree getHyphenationTree(InputSource hyphenationSource)
+        {
+            var tree = new HyphenationTree();
+            tree.loadPatterns(hyphenationSource);
+            return tree;
+        }
+
+        protected internal override void decompose()
+        {
+            // get the hyphenation points
+            Hyphenation hyphens = hyphenator.hyphenate(termAtt.Buffer(), 0, termAtt.Length(), 1, 1);
+            // No hyphen points found -> exit
+            if (hyphens == null)
+            {
+                return;
+            }
+
+            int[] hyp = hyphens.HyphenationPoints;
+
+            for (int i = 0; i < hyp.Length; ++i)
+            {
+                int remaining = hyp.Length - i;
+                int start = hyp[i];
+                CompoundToken longestMatchToken = null;
+                for (int j = 1; j < remaining; j++)
+                {
+                    int partLength = hyp[i + j] - start;
+
+                    // if the part is longer than maxSubwordSize we
+                    // are done with this round
+                    if (partLength > this.maxSubwordSize)
+                    {
+                        break;
+                    }
+
+                    // we only put subwords to the token stream
+                    // that are longer than minPartSize
+                    if (partLength < this.minSubwordSize)
+                    {
+                        // BOGUS/BROKEN/FUNKY/WACKO: somehow we have negative 'parts' according to the 
+                        // calculation above, and we rely upon minSubwordSize being >=0 to filter them out...
+                        continue;
+                    }
+
+                    // check the dictionary
+                    if (dictionary == null || dictionary.Contains(termAtt.Buffer(), start, partLength))
+                    {
+                        if (this.onlyLongestMatch)
+                        {
+                            if (longestMatchToken != null)
+                            {
+                                if (longestMatchToken.txt.Length() < partLength)
+                                {
+                                    longestMatchToken = new CompoundToken(this, start, partLength);
+                                }
+                            }
+                            else
+                            {
+                                longestMatchToken = new CompoundToken(this, start, partLength);
+                            }
+                        }
+                        else
+                        {
+                            tokens.AddLast(new CompoundToken(this, start, partLength));
+                        }
+                    }
+                    else if (dictionary.contains(termAtt.buffer(), start, partLength - 1))
+                    {
+                        // check the dictionary again with a word that is one character
+                        // shorter
+                        // to avoid problems with genitive 's characters and other binding
+                        // characters
+                        if (this.onlyLongestMatch)
+                        {
+                            if (longestMatchToken != null)
+                            {
+                                if (longestMatchToken.txt.Length() < partLength - 1)
+                                {
+                                    longestMatchToken = new CompoundToken(this, start, partLength - 1);
+                                }
+                            }
+                            else
+                            {
+                                longestMatchToken = new CompoundToken(this, start, partLength - 1);
+                            }
+                        }
+                        else
+                        {
+                            tokens.AddLast(new CompoundToken(this, start, partLength - 1));
+                        }
+                    }
+                }
+                if (this.onlyLongestMatch && longestMatchToken != null)
+                {
+                    tokens.AddLast(longestMatchToken);
+                }
+            }
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilterFactory.cs
index 4a51f7b..ba6e2f7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Compound/HyphenationCompoundWordTokenFilterFactory.cs
@@ -1,7 +1,10 @@
 using System.Collections.Generic;
-using TokenFilterFactory = Lucene.Net.Analysis.Util.TokenFilterFactory;
+using Lucene.Net.Analysis.Util;
+using org.apache.lucene.analysis.compound;
+using org.apache.lucene.analysis.compound.hyphenation;
+using org.apache.lucene.analysis.util;
 
-namespace org.apache.lucene.analysis.compound
+namespace Lucene.Net.Analysis.Compound
 {
 
 	/*
@@ -20,17 +23,7 @@ namespace org.apache.lucene.analysis.compound
 	 * See the License for the specific language governing permissions and
 	 * limitations under the License.
 	 */
-
-	using HyphenationTree = org.apache.lucene.analysis.compound.hyphenation.HyphenationTree;
-	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
-	using ResourceLoader = org.apache.lucene.analysis.util.ResourceLoader;
-	using ResourceLoaderAware = org.apache.lucene.analysis.util.ResourceLoaderAware;
-	using TokenFilterFactory = TokenFilterFactory;
-	using IOUtils = org.apache.lucene.util.IOUtils;
-
-	using InputSource = org.xml.sax.InputSource;
-
-	/// <summary>
+    /// <summary>
 	/// Factory for <seealso cref="HyphenationCompoundWordTokenFilter"/>.
 	/// <para>
 	/// This factory accepts the following parameters:
@@ -89,9 +82,7 @@ namespace org.apache.lucene.analysis.compound
 		}
 	  }
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void inform(org.apache.lucene.analysis.util.ResourceLoader loader) throws java.io.IOException
-	  public virtual void inform(ResourceLoader loader)
+	  public virtual void Inform(ResourceLoader loader)
 	  {
 		InputStream stream = null;
 		try
@@ -103,8 +94,6 @@ namespace org.apache.lucene.analysis.compound
 		  // TODO: Broken, because we cannot resolve real system id
 		  // ResourceLoader should also supply method like ClassLoader to get resource URL
 		  stream = loader.openResource(hypFile);
-//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
-//ORIGINAL LINE: final org.xml.sax.InputSource is = new org.xml.sax.InputSource(stream);
 		  InputSource @is = new InputSource(stream);
 		  @is.Encoding = encoding; // if it's null let xml parser decide
 		  @is.SystemId = hypFile;

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Core/LowerCaseFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Core/LowerCaseFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Core/LowerCaseFilter.cs
index 097bc4b..b3c0c58 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Core/LowerCaseFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Core/LowerCaseFilter.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Analysis.Tokenattributes;
+using Lucene.Net.Analysis.Util;
 using Lucene.Net.Util;
 using org.apache.lucene.analysis.util;
 

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Core/StopAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Core/StopAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Core/StopAnalyzer.cs
index cc5a39e..2857938 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Core/StopAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Core/StopAnalyzer.cs
@@ -1,5 +1,6 @@
 using System.Collections.Generic;
 using System.IO;
+using Lucene.Net.Analysis.Util;
 using Lucene.Net.Support;
 using Lucene.Net.Util;
 using org.apache.lucene.analysis.util;
@@ -90,12 +91,12 @@ namespace Lucene.Net.Analysis.Core
 	  /// <summary>
 	  /// Creates
 	  /// <seealso cref="Analyzer.TokenStreamComponents"/>
-	  /// used to tokenize all the text in the provided <seealso cref="Reader"/>.
+	  /// used to tokenize all the text in the provided <seealso cref="TextReader"/>.
 	  /// </summary>
 	  /// <returns> <seealso cref="Analyzer.TokenStreamComponents"/>
 	  ///         built from a <seealso cref="LowerCaseTokenizer"/> filtered with
 	  ///         <seealso cref="StopFilter"/> </returns>
-	  protected internal override Analyzer.TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
+	  public override Analyzer.TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
 	  {
 		Tokenizer source = new LowerCaseTokenizer(matchVersion, reader);
 		return new Analyzer.TokenStreamComponents(source, new StopFilter(matchVersion, source, stopwords));

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Core/StopFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Core/StopFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Core/StopFilterFactory.cs
index c74874d..4f89bae 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Core/StopFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Core/StopFilterFactory.cs
@@ -1,162 +1,154 @@
 using System;
 using System.Collections.Generic;
-using Lucene.Net.Analysis.Core;
-using TokenFilterFactory = Lucene.Net.Analysis.Util.TokenFilterFactory;
+using Lucene.Net.Analysis.Util;
 
-namespace org.apache.lucene.analysis.core
+namespace Lucene.Net.Analysis.Core
 {
 
-	/*
-	 * 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.
-	 */
+    /*
+     * 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.
+     */
+    // jdocs
 
-	using CharArraySet = org.apache.lucene.analysis.util.CharArraySet;
-	using ResourceLoader = org.apache.lucene.analysis.util.ResourceLoader;
-	using ResourceLoaderAware = org.apache.lucene.analysis.util.ResourceLoaderAware;
-	using TokenFilterFactory = TokenFilterFactory;
-	using WordlistLoader = org.apache.lucene.analysis.util.WordlistLoader; // jdocs
 
+    /// <summary>
+    /// Factory for <seealso cref="StopFilter"/>.
+    /// 
+    /// <pre class="prettyprint">
+    /// &lt;fieldType name="text_stop" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"&gt;
+    ///   &lt;analyzer&gt;
+    ///     &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
+    ///     &lt;filter class="solr.StopFilterFactory" ignoreCase="true"
+    ///             words="stopwords.txt" format="wordset" /&gt;
+    ///   &lt;/analyzer&gt;
+    /// &lt;/fieldType&gt;</pre>
+    /// 
+    /// <para>
+    /// All attributes are optional:
+    /// </para>
+    /// <ul>
+    ///  <li><code>ignoreCase</code> defaults to <code>false</code></li>
+    ///  <li><code>words</code> should be the name of a stopwords file to parse, if not 
+    ///      specified the factory will use <seealso cref="StopAnalyzer#ENGLISH_STOP_WORDS_SET"/>
+    ///  </li>
+    ///  <li><code>format</code> defines how the <code>words</code> file will be parsed, 
+    ///      and defaults to <code>wordset</code>.  If <code>words</code> is not specified, 
+    ///      then <code>format</code> must not be specified.
+    ///  </li>
+    /// </ul>
+    /// <para>
+    /// The valid values for the <code>format</code> option are:
+    /// </para>
+    /// <ul>
+    ///  <li><code>wordset</code> - This is the default format, which supports one word per 
+    ///      line (including any intra-word whitespace) and allows whole line comments 
+    ///      begining with the "#" character.  Blank lines are ignored.  See 
+    ///      <seealso cref="WordlistLoader#getLines WordlistLoader.getLines"/> for details.
+    ///  </li>
+    ///  <li><code>snowball</code> - This format allows for multiple words specified on each 
+    ///      line, and trailing comments may be specified using the vertical line ("&#124;"). 
+    ///      Blank lines are ignored.  See 
+    ///      <seealso cref="WordlistLoader#getSnowballWordSet WordlistLoader.getSnowballWordSet"/> 
+    ///      for details.
+    ///  </li>
+    /// </ul>
+    /// </summary>
+    public class StopFilterFactory : TokenFilterFactory, ResourceLoaderAware
+    {
+        public const string FORMAT_WORDSET = "wordset";
+        public const string FORMAT_SNOWBALL = "snowball";
 
-	/// <summary>
-	/// Factory for <seealso cref="StopFilter"/>.
-	/// 
-	/// <pre class="prettyprint">
-	/// &lt;fieldType name="text_stop" class="solr.TextField" positionIncrementGap="100" autoGeneratePhraseQueries="true"&gt;
-	///   &lt;analyzer&gt;
-	///     &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
-	///     &lt;filter class="solr.StopFilterFactory" ignoreCase="true"
-	///             words="stopwords.txt" format="wordset" /&gt;
-	///   &lt;/analyzer&gt;
-	/// &lt;/fieldType&gt;</pre>
-	/// 
-	/// <para>
-	/// All attributes are optional:
-	/// </para>
-	/// <ul>
-	///  <li><code>ignoreCase</code> defaults to <code>false</code></li>
-	///  <li><code>words</code> should be the name of a stopwords file to parse, if not 
-	///      specified the factory will use <seealso cref="StopAnalyzer#ENGLISH_STOP_WORDS_SET"/>
-	///  </li>
-	///  <li><code>format</code> defines how the <code>words</code> file will be parsed, 
-	///      and defaults to <code>wordset</code>.  If <code>words</code> is not specified, 
-	///      then <code>format</code> must not be specified.
-	///  </li>
-	/// </ul>
-	/// <para>
-	/// The valid values for the <code>format</code> option are:
-	/// </para>
-	/// <ul>
-	///  <li><code>wordset</code> - This is the default format, which supports one word per 
-	///      line (including any intra-word whitespace) and allows whole line comments 
-	///      begining with the "#" character.  Blank lines are ignored.  See 
-	///      <seealso cref="WordlistLoader#getLines WordlistLoader.getLines"/> for details.
-	///  </li>
-	///  <li><code>snowball</code> - This format allows for multiple words specified on each 
-	///      line, and trailing comments may be specified using the vertical line ("&#124;"). 
-	///      Blank lines are ignored.  See 
-	///      <seealso cref="WordlistLoader#getSnowballWordSet WordlistLoader.getSnowballWordSet"/> 
-	///      for details.
-	///  </li>
-	/// </ul>
-	/// </summary>
-	public class StopFilterFactory : TokenFilterFactory, ResourceLoaderAware
-	{
-	  public const string FORMAT_WORDSET = "wordset";
-	  public const string FORMAT_SNOWBALL = "snowball";
+        private CharArraySet stopWords;
+        private readonly string stopWordFiles;
+        private readonly string format;
+        private readonly bool ignoreCase;
+        private readonly bool enablePositionIncrements;
 
-	  private CharArraySet stopWords;
-	  private readonly string stopWordFiles;
-	  private readonly string format;
-	  private readonly bool ignoreCase;
-	  private readonly bool enablePositionIncrements;
+        /// <summary>
+        /// Creates a new StopFilterFactory </summary>
+        public StopFilterFactory(IDictionary<string, string> args)
+            : base(args)
+        {
+            assureMatchVersion();
+            stopWordFiles = get(args, "words");
+            format = get(args, "format", (null == stopWordFiles ? null : FORMAT_WORDSET));
+            ignoreCase = getBoolean(args, "ignoreCase", false);
+            enablePositionIncrements = getBoolean(args, "enablePositionIncrements", true);
+            if (args.Count > 0)
+            {
+                throw new System.ArgumentException("Unknown parameters: " + args);
+            }
+        }
 
-	  /// <summary>
-	  /// Creates a new StopFilterFactory </summary>
-	  public StopFilterFactory(IDictionary<string, string> args) : base(args)
-	  {
-		assureMatchVersion();
-		stopWordFiles = get(args, "words");
-		format = get(args, "format", (null == stopWordFiles ? null : FORMAT_WORDSET));
-		ignoreCase = getBoolean(args, "ignoreCase", false);
-		enablePositionIncrements = getBoolean(args, "enablePositionIncrements", true);
-		if (args.Count > 0)
-		{
-		  throw new System.ArgumentException("Unknown parameters: " + args);
-		}
-	  }
+        public virtual void Inform(ResourceLoader loader)
+        {
+            if (stopWordFiles != null)
+            {
+                if (FORMAT_WORDSET.Equals(format, StringComparison.CurrentCultureIgnoreCase))
+                {
+                    stopWords = GetWordSet(loader, stopWordFiles, ignoreCase);
+                }
+                else if (FORMAT_SNOWBALL.Equals(format, StringComparison.CurrentCultureIgnoreCase))
+                {
+                    stopWords = getSnowballWordSet(loader, stopWordFiles, ignoreCase);
+                }
+                else
+                {
+                    throw new System.ArgumentException("Unknown 'format' specified for 'words' file: " + format);
+                }
+            }
+            else
+            {
+                if (null != format)
+                {
+                    throw new System.ArgumentException("'format' can not be specified w/o an explicit 'words' file: " + format);
+                }
+                stopWords = new CharArraySet(luceneMatchVersion, StopAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase);
+            }
+        }
 
-//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in .NET:
-//ORIGINAL LINE: @Override public void inform(org.apache.lucene.analysis.util.ResourceLoader loader) throws java.io.IOException
-	  public virtual void inform(ResourceLoader loader)
-	  {
-		if (stopWordFiles != null)
-		{
-		  if (FORMAT_WORDSET.Equals(format, StringComparison.CurrentCultureIgnoreCase))
-		  {
-			stopWords = getWordSet(loader, stopWordFiles, ignoreCase);
-		  }
-		  else if (FORMAT_SNOWBALL.Equals(format, StringComparison.CurrentCultureIgnoreCase))
-		  {
-			stopWords = getSnowballWordSet(loader, stopWordFiles, ignoreCase);
-		  }
-		  else
-		  {
-			throw new System.ArgumentException("Unknown 'format' specified for 'words' file: " + format);
-		  }
-		}
-		else
-		{
-		  if (null != format)
-		  {
-			throw new System.ArgumentException("'format' can not be specified w/o an explicit 'words' file: " + format);
-		  }
-		  stopWords = new CharArraySet(luceneMatchVersion, StopAnalyzer.ENGLISH_STOP_WORDS_SET, ignoreCase);
-		}
-	  }
+        public virtual bool EnablePositionIncrements
+        {
+            get
+            {
+                return enablePositionIncrements;
+            }
+        }
 
-	  public virtual bool EnablePositionIncrements
-	  {
-		  get
-		  {
-			return enablePositionIncrements;
-		  }
-	  }
+        public virtual bool IgnoreCase
+        {
+            get
+            {
+                return ignoreCase;
+            }
+        }
 
-	  public virtual bool IgnoreCase
-	  {
-		  get
-		  {
-			return ignoreCase;
-		  }
-	  }
-
-	  public virtual CharArraySet StopWords
-	  {
-		  get
-		  {
-			return stopWords;
-		  }
-	  }
-
-	  public override TokenStream create(TokenStream input)
-	  {
-		StopFilter stopFilter = new StopFilter(luceneMatchVersion,input,stopWords);
-		stopFilter.EnablePositionIncrements = enablePositionIncrements;
-		return stopFilter;
-	  }
-	}
+        public virtual CharArraySet StopWords
+        {
+            get
+            {
+                return stopWords;
+            }
+        }
 
+        public override TokenStream Create(TokenStream input)
+        {
+            StopFilter stopFilter = new StopFilter(luceneMatchVersion, input, stopWords);
+            stopFilter.EnablePositionIncrements = enablePositionIncrements;
+            return stopFilter;
+        }
+    }
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilter.cs
index d5b7f10..286da3a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilter.cs
@@ -1,4 +1,5 @@
 using Lucene.Net.Analysis.Core;
+using Lucene.Net.Analysis.Util;
 
 namespace org.apache.lucene.analysis.core
 {
@@ -21,7 +22,7 @@ namespace org.apache.lucene.analysis.core
 	 */
 
 	using CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
-	using CharacterUtils = org.apache.lucene.analysis.util.CharacterUtils;
+	using CharacterUtils = CharacterUtils;
 	using Version = org.apache.lucene.util.Version;
 
 	/// <summary>

http://git-wip-us.apache.org/repos/asf/lucenenet/blob/cd3ee136/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilterFactory.cs
index df3580f..e6b78b2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Core/UpperCaseFilterFactory.cs
@@ -1,74 +1,68 @@
 using System.Collections.Generic;
-using Lucene.Net.Analysis.Core;
 using Lucene.Net.Analysis.Util;
-using TokenFilterFactory = Lucene.Net.Analysis.Util.TokenFilterFactory;
+using org.apache.lucene.analysis.core;
 
-namespace org.apache.lucene.analysis.core
+namespace Lucene.Net.Analysis.Core
 {
 
-	/*
-	 * 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.
-	 */
+    /*
+     * 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.
+     */
+    /// <summary>
+    /// Factory for <seealso cref="UpperCaseFilter"/>. 
+    /// <pre class="prettyprint">
+    /// &lt;fieldType name="text_uppercase" class="solr.TextField" positionIncrementGap="100"&gt;
+    ///   &lt;analyzer&gt;
+    ///     &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
+    ///     &lt;filter class="solr.UpperCaseFilterFactory"/&gt;
+    ///   &lt;/analyzer&gt;
+    /// &lt;/fieldType&gt;</pre>
+    /// 
+    /// <para><b>NOTE:</b> In Unicode, this transformation may lose information when the
+    /// upper case character represents more than one lower case character. Use this filter
+    /// when you require uppercase tokens.  Use the <seealso cref="LowerCaseFilterFactory"/> for 
+    /// general search matching
+    /// </para>
+    /// </summary>
+    public class UpperCaseFilterFactory : TokenFilterFactory, MultiTermAwareComponent
+    {
 
-	using AbstractAnalysisFactory = AbstractAnalysisFactory;
-	using MultiTermAwareComponent = org.apache.lucene.analysis.util.MultiTermAwareComponent;
-	using TokenFilterFactory = TokenFilterFactory;
+        /// <summary>
+        /// Creates a new UpperCaseFilterFactory </summary>
+        public UpperCaseFilterFactory(IDictionary<string, string> args)
+            : base(args)
+        {
+            assureMatchVersion();
+            if (args.Count > 0)
+            {
+                throw new System.ArgumentException("Unknown parameters: " + args);
+            }
+        }
 
-	/// <summary>
-	/// Factory for <seealso cref="UpperCaseFilter"/>. 
-	/// <pre class="prettyprint">
-	/// &lt;fieldType name="text_uppercase" class="solr.TextField" positionIncrementGap="100"&gt;
-	///   &lt;analyzer&gt;
-	///     &lt;tokenizer class="solr.WhitespaceTokenizerFactory"/&gt;
-	///     &lt;filter class="solr.UpperCaseFilterFactory"/&gt;
-	///   &lt;/analyzer&gt;
-	/// &lt;/fieldType&gt;</pre>
-	/// 
-	/// <para><b>NOTE:</b> In Unicode, this transformation may lose information when the
-	/// upper case character represents more than one lower case character. Use this filter
-	/// when you require uppercase tokens.  Use the <seealso cref="LowerCaseFilterFactory"/> for 
-	/// general search matching
-	/// </para>
-	/// </summary>
-	public class UpperCaseFilterFactory : TokenFilterFactory, MultiTermAwareComponent
-	{
-
-	  /// <summary>
-	  /// Creates a new UpperCaseFilterFactory </summary>
-	  public UpperCaseFilterFactory(IDictionary<string, string> args) : base(args)
-	  {
-		assureMatchVersion();
-		if (args.Count > 0)
-		{
-		  throw new System.ArgumentException("Unknown parameters: " + args);
-		}
-	  }
-
-	  public override UpperCaseFilter create(TokenStream input)
-	  {
-		return new UpperCaseFilter(luceneMatchVersion,input);
-	  }
-
-	  public virtual AbstractAnalysisFactory MultiTermComponent
-	  {
-		  get
-		  {
-			return this;
-		  }
-	  }
-	}
+        public override TokenStream Create(TokenStream input)
+        {
+            return new UpperCaseFilter(luceneMatchVersion, input);
+        }
 
+        public virtual AbstractAnalysisFactory MultiTermComponent
+        {
+            get
+            {
+                return this;
+            }
+        }
+    }
 }
\ No newline at end of file


Mime
View raw message