You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucenenet.apache.org by ni...@apache.org on 2017/02/03 09:33:12 UTC
[1/9] lucenenet git commit: Lucene.Net.Analysis.En refactor: member
accessibility and documentation comments
Repository: lucenenet
Updated Branches:
refs/heads/api-work 973147f83 -> a4828b1ad
Lucene.Net.Analysis.En refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/f3eafacf
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/f3eafacf
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/f3eafacf
Branch: refs/heads/api-work
Commit: f3eafacfc005045ae02214ad81597791005ed3df
Parents: 973147f
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 14:43:01 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 14:43:01 2017 +0700
----------------------------------------------------------------------
.../Analysis/En/EnglishAnalyzer.cs | 102 ++++----
.../Analysis/En/EnglishMinimalStemFilter.cs | 6 +-
.../En/EnglishMinimalStemFilterFactory.cs | 3 +-
.../Analysis/En/EnglishMinimalStemmer.cs | 2 +-
.../Analysis/En/EnglishPossessiveFilter.cs | 17 +-
.../En/EnglishPossessiveFilterFactory.cs | 3 +-
.../Analysis/En/KStemData1.cs | 3 +-
.../Analysis/En/KStemData2.cs | 4 +-
.../Analysis/En/KStemData3.cs | 3 +-
.../Analysis/En/KStemData4.cs | 3 +-
.../Analysis/En/KStemData5.cs | 4 +-
.../Analysis/En/KStemData6.cs | 3 +-
.../Analysis/En/KStemData7.cs | 3 +-
.../Analysis/En/KStemData8.cs | 3 +-
.../Analysis/En/KStemFilter.cs | 15 +-
.../Analysis/En/KStemFilterFactory.cs | 5 +-
.../Analysis/En/KStemmer.cs | 231 ++++++++-----------
.../Analysis/En/PorterStemFilter.cs | 16 +-
.../Analysis/En/PorterStemFilterFactory.cs | 5 +-
.../Analysis/En/PorterStemmer.cs | 44 ++--
.../Analysis/Util/OpenStringBuilder.cs | 4 +-
21 files changed, 210 insertions(+), 269 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
index 629744b..8848b24 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
@@ -29,72 +29,72 @@ namespace Lucene.Net.Analysis.En
/// <see cref="Analyzer"/> for English.
/// </summary>
public sealed class EnglishAnalyzer : StopwordAnalyzerBase
- {
- private readonly CharArraySet stemExclusionSet;
+ {
+ private readonly CharArraySet stemExclusionSet;
- /// <summary>
- /// Returns an unmodifiable instance of the default stop words set. </summary>
- /// <returns> default stop words set. </returns>
- public static CharArraySet DefaultStopSet
- {
- get
- {
- return DefaultSetHolder.DEFAULT_STOP_SET;
- }
- }
+ /// <summary>
+ /// Returns an unmodifiable instance of the default stop words set. </summary>
+ /// <returns> default stop words set. </returns>
+ public static CharArraySet DefaultStopSet
+ {
+ get
+ {
+ return DefaultSetHolder.DEFAULT_STOP_SET;
+ }
+ }
- /// <summary>
- /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
- /// accesses the static final set the first time.;
- /// </summary>
- private class DefaultSetHolder
- {
- internal static readonly CharArraySet DEFAULT_STOP_SET = StandardAnalyzer.STOP_WORDS_SET;
- }
+ /// <summary>
+ /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class
+ /// accesses the static final set the first time.;
+ /// </summary>
+ private class DefaultSetHolder
+ {
+ internal static readonly CharArraySet DEFAULT_STOP_SET = StandardAnalyzer.STOP_WORDS_SET;
+ }
- /// <summary>
- /// Builds an analyzer with the default stop words: <see cref="#getDefaultStopSet"/>.
- /// </summary>
- public EnglishAnalyzer(LuceneVersion matchVersion)
- : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
- {
- }
+ /// <summary>
+ /// Builds an analyzer with the default stop words: <see cref="DefaultStopSet"/>.
+ /// </summary>
+ public EnglishAnalyzer(LuceneVersion matchVersion)
+ : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
+ {
+ }
- /// <summary>
- /// Builds an analyzer with the given stop words.
- /// </summary>
- /// <param name="matchVersion"> lucene compatibility version </param>
- /// <param name="stopwords"> a stopword set </param>
- public EnglishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
- : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
- {
- }
+ /// <summary>
+ /// Builds an analyzer with the given stop words.
+ /// </summary>
+ /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="stopwords"> a stopword set </param>
+ public EnglishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
+ : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
+ {
+ }
- /// <summary>
- /// Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
- /// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
- /// stemming.
- /// </summary>
- /// <param name="matchVersion"> lucene compatibility version </param>
- /// <param name="stopwords"> a stopword set </param>
- /// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
- public EnglishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
+ /// <summary>
+ /// Builds an analyzer with the given stop words. If a non-empty stem exclusion set is
+ /// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
+ /// stemming.
+ /// </summary>
+ /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="stopwords"> a stopword set </param>
+ /// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
+ public EnglishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
: base(matchVersion, stopwords)
- {
- this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
- }
+ {
+ this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
+ }
/// <summary>
/// Creates a
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// which tokenizes all the text in the provided <see cref="Reader"/>.
+ /// which tokenizes all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> A
/// <see cref="Analyzer.TokenStreamComponents"/>
/// built from an <see cref="StandardTokenizer"/> filtered with
/// <see cref="StandardFilter"/>, <see cref="EnglishPossessiveFilter"/>,
- /// <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>
- /// , <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
+ /// <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>,
+ /// <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
/// provided and <see cref="PorterStemFilter"/>. </returns>
protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
index 5c95a9c..f551c0a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilter.cs
@@ -19,16 +19,12 @@ namespace Lucene.Net.Analysis.En
* limitations under the License.
*/
- //using SetKeywordMarkerFilter = org.apache.lucene.analysis.miscellaneous.SetKeywordMarkerFilter;
- //using CharTermAttribute = org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
- //using KeywordAttribute = org.apache.lucene.analysis.tokenattributes.KeywordAttribute;
-
/// <summary>
/// A <see cref="TokenFilter"/> that applies <see cref="EnglishMinimalStemmer"/> to stem
/// English words.
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para>
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilterFactory.cs
index 48fec3c..c3b1f1f 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.En
/// </summary>
public class EnglishMinimalStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new EnglishMinimalStemFilterFactory </summary>
+ /// Creates a new <see cref="EnglishMinimalStemFilterFactory"/> </summary>
public EnglishMinimalStemFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemmer.cs
index 5648b89..42b0d71 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishMinimalStemmer.cs
@@ -21,7 +21,7 @@
/// Minimal plural stemmer for English.
/// <para>
/// This stemmer implements the "S-Stemmer" from
- /// <i>How Effective Is Suffixing?</i>
+ /// <c>How Effective Is Suffixing?</c>
/// Donna Harman.
/// </para>
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilter.cs
index c6ca5ab..9e22c3d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilter.cs
@@ -23,14 +23,13 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// TokenFilter that removes possessives (trailing 's) from words.
- /// <a name="version"/>
/// <para>You must specify the required <see cref="LuceneVersion"/>
- /// compatibility when creating EnglishPossessiveFilter:
- /// <ul>
- /// <li> As of 3.6, U+2019 RIGHT SINGLE QUOTATION MARK and
+ /// compatibility when creating <see cref="EnglishPossessiveFilter"/>:
+ /// <list type="bullet">
+ /// <item> As of 3.6, U+2019 RIGHT SINGLE QUOTATION MARK and
/// U+FF07 FULLWIDTH APOSTROPHE are also treated as
- /// quotation marks.
- /// </ul>
+ /// quotation marks.</item>
+ /// </list>
/// </para>
/// </summary>
public sealed class EnglishPossessiveFilter : TokenFilter
@@ -40,11 +39,13 @@ namespace Lucene.Net.Analysis.En
/// @deprecated Use <see cref="#EnglishPossessiveFilter(Version, TokenStream)"/> instead.
[Obsolete(@"Use <see cref=""#EnglishPossessiveFilter(org.apache.lucene.util.Version, org.apache.lucene.analysis.TokenStream)""/> instead.")]
- public EnglishPossessiveFilter(TokenStream input) : this(LuceneVersion.LUCENE_35, input)
+ public EnglishPossessiveFilter(TokenStream input)
+ : this(LuceneVersion.LUCENE_35, input)
{
}
- public EnglishPossessiveFilter(LuceneVersion version, TokenStream input) : base(input)
+ public EnglishPossessiveFilter(LuceneVersion version, TokenStream input)
+ : base(input)
{
this.matchVersion = version;
this.termAtt = AddAttribute<ICharTermAttribute>();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilterFactory.cs
index 5718f8c..f05f1e3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishPossessiveFilterFactory.cs
@@ -35,9 +35,8 @@ namespace Lucene.Net.Analysis.En
/// </summary>
public class EnglishPossessiveFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new EnglishPossessiveFilterFactory </summary>
+ /// Creates a new <see cref="EnglishPossessiveFilterFactory"/> </summary>
public EnglishPossessiveFilterFactory(IDictionary<string, string> args) : base(args)
{
AssureMatchVersion();
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData1.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData1.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData1.cs
index 8995d7a..ee22dc7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData1.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData1.cs
@@ -32,14 +32,13 @@ OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData2.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData2.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData2.cs
index c546e9c..98b94cd 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData2.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData2.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
@@ -749,6 +748,5 @@ namespace Lucene.Net.Analysis.En
"dissolve","dissonance","dissonant","dissuade","distaff",
"distal","distance","distant","distantly","distaste",
};
-
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData3.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData3.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData3.cs
index 73cb175..9a2d0ee 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData3.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData3.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData4.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData4.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData4.cs
index 1b5f9b2..e6eeee4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData4.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData4.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData5.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData5.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData5.cs
index 4162a7c..0c99140 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData5.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData5.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
@@ -749,6 +748,5 @@ namespace Lucene.Net.Analysis.En
"pectin","pectoral","peculate","peculiar","peculiarity",
"peculiarly","pecuniary","pedagogue","pedagogy","pedal",
};
-
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData6.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData6.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData6.cs
index b4a10dd..35d7d8c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData6.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData6.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData7.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData7.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData7.cs
index db4b91f..c3e6740 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData7.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData7.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData8.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData8.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData8.cs
index db28e93..96317e7 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData8.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemData8.cs
@@ -31,14 +31,13 @@ LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
SUCH DAMAGE.
*/
-/* This is a java version of Bob Krovetz' KStem.
+/* This is a .NET version of Bob Krovetz' KStem.
*
* Java version by Sergio Guzman-Lara.
* CIIR-UMass Amherst http://ciir.cs.umass.edu
*/
namespace Lucene.Net.Analysis.En
{
-
/// <summary>
/// A list of words used by Kstem
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
index 4de595b..b13c5e3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilter.cs
@@ -21,25 +21,23 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// A high-performance kstem filter for english.
- /// <p/>
+ /// <para/>
/// See <a href="http://ciir.cs.umass.edu/pubfiles/ir-35.pdf">
/// "Viewing Morphology as an Inference Process"</a>
/// (Krovetz, R., Proceedings of the Sixteenth Annual International ACM SIGIR
/// Conference on Research and Development in Information Retrieval, 191-203, 1993).
- /// <p/>
+ /// <para/>
/// All terms must already be lowercased for this filter to work correctly.
///
/// <para>
/// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To prevent
/// certain terms from being passed to the stemmer
- /// <see cref="KeywordAttribute#isKeyword()"/> should be set to <code>true</code>
+ /// <see cref="KeywordAttribute.IsKeyword"/> should be set to <code>true</code>
/// in a previous <see cref="TokenStream"/>.
///
/// Note: For including the original term as well as the stemmed version, see
- /// <see cref="org.apache.lucene.analysis.miscellaneous.KeywordRepeatFilterFactory"/>
+ /// <see cref="Miscellaneous.KeywordRepeatFilterFactory"/>
/// </para>
- ///
- ///
/// </summary>
public sealed class KStemFilter : TokenFilter
{
@@ -47,7 +45,8 @@ namespace Lucene.Net.Analysis.En
private readonly ICharTermAttribute termAttribute;
private readonly IKeywordAttribute keywordAtt;
- public KStemFilter(TokenStream @in) : base(@in)
+ public KStemFilter(TokenStream @in)
+ : base(@in)
{
termAttribute = AddAttribute<ICharTermAttribute>();
keywordAtt = AddAttribute<IKeywordAttribute>();
@@ -56,7 +55,7 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// Returns the next, stemmed, input Token. </summary>
/// <returns> The stemmed form of a token. </returns>
- /// <exception cref="IOException"> If there is a low-level I/O error. </exception>
+ /// <exception cref="System.IO.IOException"> If there is a low-level I/O error. </exception>
public override bool IncrementToken()
{
if (!m_input.IncrementToken())
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilterFactory.cs
index 17374f0..a416179 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemFilterFactory.cs
@@ -21,8 +21,6 @@ namespace Lucene.Net.Analysis.En
* limitations under the License.
*/
- //using TokenFilterFactory = org.apache.lucene.analysis.util.TokenFilterFactory;
-
/// <summary>
/// Factory for <see cref="KStemFilter"/>.
/// <code>
@@ -36,9 +34,8 @@ namespace Lucene.Net.Analysis.En
/// </summary>
public class KStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new KStemFilterFactory </summary>
+ /// Creates a new <see cref="KStemFilterFactory"/> </summary>
public KStemFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/KStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemmer.cs
index 4bda6f8..1808ced 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/KStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/KStemmer.cs
@@ -61,20 +61,15 @@ the original shown below)
*/
namespace Lucene.Net.Analysis.En
{
-
- //using org.apache.lucene.analysis.util;
- //using OpenStringBuilder = org.apache.lucene.analysis.util.OpenStringBuilder;
/// <summary>
+ /// This class implements the Kstem algorithm
+ /// </summary>
+ /// <remarks>
/// <para>Title: Kstemmer</para>
/// <para>Description: This is a java version of Bob Krovetz' kstem stemmer</para>
/// <para>Copyright: Copyright 2008, Luicid Imagination, Inc. </para>
/// <para>Copyright: Copyright 2003, CIIR University of Massachusetts Amherst (http://ciir.cs.umass.edu) </para>
- /// </summary>
- //using Version = org.apache.lucene.util.Version;
-
- /// <summary>
- /// This class implements the Kstem algorithm
- /// </summary>
+ /// </remarks>
public class KStemmer
{
private const int MaxWordLen = 50;
@@ -345,37 +340,32 @@ namespace Lucene.Net.Analysis.En
private static readonly CharArrayMap<DictEntry> dict_ht = InitializeDictHash();
- /// <summary>
- ///*
- /// caching off private int maxCacheSize; private CharArrayMap<String> cache =
- /// null; private static final String SAME = "SAME"; // use if stemmed form is
- /// the same
- /// **
- /// </summary>
+ // caching off
+ //
+ // private int maxCacheSize; private CharArrayMap{String} cache =
+ // null; private static final String SAME = "SAME"; // use if stemmed form is
+ // the same
private readonly OpenStringBuilder word = new OpenStringBuilder();
private int j; // index of final letter in stem (within word)
- private int k; /*
- * INDEX of final letter in word. You must add 1 to k to get
- * the current length of word. When you want the length of
- * word, use the method wordLength, which returns (k+1).
- */
-
/// <summary>
- ///*
- /// private void initializeStemHash() { if (maxCacheSize > 0) cache = new
- /// CharArrayMap<String>(maxCacheSize,false); }
- /// **
+ /// INDEX of final letter in word. You must add 1 to k to get
+ /// the current length of word. When you want the length of
+ /// word, use the method wordLength, which returns (k+1).
/// </summary>
+ private int k;
+
+ // private void initializeStemHash() { if (maxCacheSize > 0) cache = new
+ // CharArrayMap<String>(maxCacheSize,false); }
private char FinalChar
{
- get { return word.CharAt(k); }
+ get { return word[k]; }
}
private char PenultChar
{
- get { return word.CharAt(k - 1); }
+ get { return word[k - 1]; }
}
private bool IsVowel(int index)
@@ -589,7 +579,7 @@ namespace Lucene.Net.Analysis.En
return ch >= 'a' && ch <= 'z'; // terms must be lowercased already
}
- /* length of stem within word */
+ /// <summary>length of stem within word</summary>
private int StemLength
{
get { return j + 1; }
@@ -660,14 +650,11 @@ namespace Lucene.Net.Analysis.En
private DictEntry WordInDict()
{
- /// <summary>
- ///*
- /// if (matchedEntry != null) { if (dict_ht.get(word.getArray(), 0,
- /// word.size()) != matchedEntry) {
- /// System.out.println("Uh oh... cached entry doesn't match"); } return
- /// matchedEntry; }
- /// **
- /// </summary>
+ // if (matchedEntry != null) { if (dict_ht.get(word.getArray(), 0,
+ // word.size()) != matchedEntry) {
+ // System.out.println("Uh oh... cached entry doesn't match"); } return
+ // matchedEntry; }
+
if (matchedEntry != null)
{
return matchedEntry;
@@ -681,7 +668,7 @@ namespace Lucene.Net.Analysis.En
return e;
}
- /* Convert plurals to singular form, and '-ies' to 'y' */
+ /// <summary>Convert plurals to singular form, and '-ies' to 'y'</summary>
private void Plural()
{
if (word.CharAt(k) == 's')
@@ -764,7 +751,7 @@ namespace Lucene.Net.Analysis.En
SetSuff(s, s.Length);
}
- /* replace old suffix with s */
+ /// <summary>replace old suffix with s</summary>
private void SetSuff(string s, int len)
{
word.Length = j + 1;
@@ -783,17 +770,13 @@ namespace Lucene.Net.Analysis.En
private bool Lookup()
{
- /// <summary>
- ///****
- /// debugging code String thisLookup = word.toString(); boolean added =
- /// lookups.add(thisLookup); if (!added) {
- /// System.out.println("######extra lookup:" + thisLookup); // occaasional
- /// extra lookups aren't necessarily errors... could happen by diff
- /// manipulations // throw new RuntimeException("######extra lookup:" +
- /// thisLookup); } else { // System.out.println("new lookup:" + thisLookup);
- /// }
- /// *****
- /// </summary>
+ // debugging code String thisLookup = word.toString(); boolean added =
+ // lookups.add(thisLookup); if (!added) {
+ // System.out.println("######extra lookup:" + thisLookup); // occaasional
+ // extra lookups aren't necessarily errors... could happen by diff
+ // manipulations // throw new RuntimeException("######extra lookup:" +
+ // thisLookup); } else { // System.out.println("new lookup:" + thisLookup);
+ // }
matchedEntry = dict_ht.Get(word.Array, 0, word.Count);
return matchedEntry != null;
@@ -801,7 +784,7 @@ namespace Lucene.Net.Analysis.En
// Set<String> lookups = new HashSet<>();
- /* convert past tense (-ed) to present, and `-ied' to `y' */
+ /// <summary>convert past tense (-ed) to present, and `-ied' to `y'</summary>
private void PastTense()
{
/*
@@ -901,7 +884,7 @@ namespace Lucene.Net.Analysis.En
}
}
- /* return TRUE if word ends with a double consonant */
+ /// <summary>return TRUE if word ends with a double consonant</summary>
private bool DoubleC(int i)
{
if (i < 1)
@@ -928,7 +911,7 @@ namespace Lucene.Net.Analysis.En
return false;
}
- /* handle `-ing' endings */
+ /// <summary>handle `-ing' endings</summary>
private void Aspect()
{
/*
@@ -1019,12 +1002,12 @@ namespace Lucene.Net.Analysis.En
}
}
- /*
- * this routine deals with -ity endings. It accepts -ability, -ibility, and
- * -ality, even without checking the dictionary because they are so
- * productive. The first two are mapped to -ble, and the -ity is remove for
- * the latter
- */
+ /// <summary>
+ /// this routine deals with -ity endings. It accepts -ability, -ibility, and
+ /// -ality, even without checking the dictionary because they are so
+ /// productive. The first two are mapped to -ble, and the -ity is remove for
+ /// the latter
+ /// </summary>
private void ItyEndings()
{
int old_k = k;
@@ -1097,7 +1080,7 @@ namespace Lucene.Net.Analysis.En
}
}
- /* handle -ence and -ance */
+ /// <summary>handle -ence and -ance</summary>
private void NceEndings()
{
int old_k = k;
@@ -1134,7 +1117,7 @@ namespace Lucene.Net.Analysis.En
return;
}
- /* handle -ness */
+ /// <summary>handle -ness</summary>
private void NessEndings()
{
if (EndsIn('n', 'e', 's', 's'))
@@ -1154,7 +1137,7 @@ namespace Lucene.Net.Analysis.En
return;
}
- /* handle -ism */
+ /// <summary>handle -ism</summary>
private void IsmEndings()
{
if (EndsIn('i', 's', 'm'))
@@ -1170,7 +1153,7 @@ namespace Lucene.Net.Analysis.En
return;
}
- /* this routine deals with -ment endings. */
+ /// <summary>this routine deals with -ment endings.</summary>
private void MentEndings()
{
int old_k = k;
@@ -1190,7 +1173,7 @@ namespace Lucene.Net.Analysis.En
return;
}
- /* this routine deals with -ize endings. */
+ /// <summary>this routine deals with -ize endings.</summary>
private void IzeEndings()
{
int old_k = k;
@@ -1231,7 +1214,7 @@ namespace Lucene.Net.Analysis.En
return;
}
- /* handle -ency and -ancy */
+ /// <summary>handle -ency and -ancy</summary>
private void NcyEndings()
{
if (EndsIn('n', 'c', 'y'))
@@ -1257,7 +1240,7 @@ namespace Lucene.Net.Analysis.En
return;
}
- /* handle -able and -ible */
+ /// <summary>handle -able and -ible</summary>
private void BleEndings()
{
int old_k = k;
@@ -1311,11 +1294,11 @@ namespace Lucene.Net.Analysis.En
return;
}
- /*
- * handle -ic endings. This is fairly straightforward, but this is also the
- * only place we try *expanding* an ending, -ic -> -ical. This is to handle
- * cases like `canonic' -> `canonical'
- */
+ /// <summary>
+ /// handle -ic endings. This is fairly straightforward, but this is also the
+ /// only place we try *expanding* an ending, -ic -> -ical. This is to handle
+ /// cases like `canonic' -> `canonical'
+ /// </summary>
private void IcEndings()
{
if (EndsIn('i', 'c'))
@@ -1361,10 +1344,11 @@ namespace Lucene.Net.Analysis.En
private static char[] ication = "ication".ToCharArray();
/* handle some derivational endings */
- /*
- * this routine deals with -ion, -ition, -ation, -ization, and -ication. The
- * -ization ending is always converted to -ize
- */
+
+ /// <summary>
+ /// this routine deals with -ion, -ition, -ation, -ization, and -ication. The
+ /// -ization ending is always converted to -ize
+ /// </summary>
private void IonEndings()
{
int old_k = k;
@@ -1500,10 +1484,10 @@ namespace Lucene.Net.Analysis.En
return;
}
- /*
- * this routine deals with -er, -or, -ier, and -eer. The -izer ending is
- * always converted to -ize
- */
+ /// <summary>
+ /// this routine deals with -er, -or, -ier, and -eer. The -izer ending is
+ /// always converted to -ize
+ /// </summary>
private void ErAndOrEndings()
{
int old_k = k;
@@ -1592,13 +1576,13 @@ namespace Lucene.Net.Analysis.En
}
- /*
- * this routine deals with -ly endings. The -ally ending is always converted
- * to -al Sometimes this will temporarily leave us with a non-word (e.g.,
- * heuristically maps to heuristical), but then the -al is removed in the next
- * step.
- */
- private void lyEndings()
+ /// <summary>
+ /// this routine deals with -ly endings. The -ally ending is always converted
+ /// to -al Sometimes this will temporarily leave us with a non-word (e.g.,
+ /// heuristically maps to heuristical), but then the -al is removed in the next
+ /// step.
+ /// </summary>
+ private void LyEndings()
{
int old_k = k;
@@ -1674,10 +1658,10 @@ namespace Lucene.Net.Analysis.En
return;
}
- /*
- * this routine deals with -al endings. Some of the endings from the previous
- * routine are finished up here.
- */
+ /// <summary>
+ /// this routine deals with -al endings. Some of the endings from the previous
+ /// routine are finished up here.
+ /// </summary>
private void AlEndings()
{
int old_k = k;
@@ -1771,10 +1755,10 @@ namespace Lucene.Net.Analysis.En
return;
}
- /*
- * this routine deals with -ive endings. It normalizes some of the -ative
- * endings directly, and also maps some -ive endings to -ion.
- */
+ /// <summary>
+ /// this routine deals with -ive endings. It normalizes some of the -ative
+ /// endings directly, and also maps some -ive endings to -ion.
+ /// </summary>
private void IveEndings()
{
int old_k = k;
@@ -1842,14 +1826,13 @@ namespace Lucene.Net.Analysis.En
{
return term;
}
- return ToString();
+ return AsString();
}
/// <summary>
- /// Returns the result of the stem (assuming the word was changed) as a String.
+ /// Returns the result of the stem (assuming the word was changed) as a <see cref="string"/>.
/// </summary>
- // LUCENENET: This was AsString() in the original. That is bound to cause confusion.
- public override string ToString()
+ internal virtual string AsString()
{
string s = String;
if (s != null)
@@ -1859,20 +1842,6 @@ namespace Lucene.Net.Analysis.En
return word.ToString();
}
-
- ///// <summary>
- ///// Returns the result of the stem (assuming the word was changed) as a String.
- ///// </summary>
- //internal virtual string AsString()
- //{
- // string s = String;
- // if (s != null)
- // {
- // return s;
- // }
- // return word.ToString();
- //}
-
internal virtual ICharSequence AsCharSequence()
{
return result != null ? (ICharSequence)new CharsRef(result) : word;
@@ -1904,7 +1873,7 @@ namespace Lucene.Net.Analysis.En
internal string result;
- private bool Matched
+ private bool IsMatched
{
get
{
@@ -1989,88 +1958,88 @@ namespace Lucene.Net.Analysis.En
// YCS: extra lookup()s were inserted so we don't need to
// do an extra wordInDict() here.
Plural();
- if (Matched)
+ if (IsMatched)
{
break;
}
PastTense();
- if (Matched)
+ if (IsMatched)
{
break;
}
Aspect();
- if (Matched)
+ if (IsMatched)
{
break;
}
ItyEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
NessEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
IonEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
ErAndOrEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
- lyEndings();
- if (Matched)
+ LyEndings();
+ if (IsMatched)
{
break;
}
AlEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
entry = WordInDict();
IveEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
IzeEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
MentEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
BleEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
IsmEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
IcEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
NcyEndings();
- if (Matched)
+ if (IsMatched)
{
break;
}
NceEndings();
- bool foo = Matched;
+ bool foo = IsMatched;
break;
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
index af42187..0a15153 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilter.cs
@@ -21,19 +21,19 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// Transforms the token stream as per the Porter stemming algorithm.
+ /// <para/>
/// Note: the input to the stemming filter must already be in lower case,
/// so you will need to use LowerCaseFilter or LowerCaseTokenizer farther
/// down the Tokenizer chain in order for this to work properly!
- /// <P>
+ /// <para/>
/// To use this filter with other analyzers, you'll want to write an
/// Analyzer class that sets up the TokenStream chain as you want it.
/// To use this with LowerCaseTokenizer, for example, you'd write an
/// analyzer like this:
- /// <P>
+ /// <para/>
/// <code>
- /// class MyAnalyzer extends Analyzer {
- /// {@literal @Override}
- /// protected virtual TokenStreamComponents CreateComponents(string fieldName, TextReader reader) {
+ /// class MyAnalyzer : Analyzer {
+ /// protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader) {
/// Tokenizer source = new LowerCaseTokenizer(version, reader);
/// return new TokenStreamComponents(source, new PorterStemFilter(source));
/// }
@@ -42,12 +42,12 @@ namespace Lucene.Net.Analysis.En
/// <para>
/// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To prevent
/// certain terms from being passed to the stemmer
- /// <see cref="KeywordAttribute#isKeyword()"/> should be set to <code>true</code>
+ /// <see cref="KeywordAttribute.IsKeyword"/> should be set to <code>true</code>
/// in a previous <see cref="TokenStream"/>.
///
/// Note: For including the original term as well as the stemmed version, see
- /// <see cref="org.apache.lucene.analysis.miscellaneous.KeywordRepeatFilterFactory"/>
- /// </para>
+ /// <see cref="Miscellaneous.KeywordRepeatFilterFactory"/>
+ /// </para>
/// </summary>
public sealed class PorterStemFilter : TokenFilter
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilterFactory.cs
index 2cc4831..f74a72a 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemFilterFactory.cs
@@ -20,8 +20,6 @@ namespace Lucene.Net.Analysis.En
* limitations under the License.
*/
- //using TokenFilterFactory = org.apache.lucene.analysis.util.TokenFilterFactory;
-
/// <summary>
/// Factory for <see cref="PorterStemFilter"/>.
/// <code>
@@ -35,9 +33,8 @@ namespace Lucene.Net.Analysis.En
/// </summary>
public class PorterStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new PorterStemFilterFactory </summary>
+ /// Creates a new <see cref="PorterStemFilterFactory"/> </summary>
public PorterStemFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
index 9c6fedd..2c2c3e9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/PorterStemmer.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.En
/*
- Porter stemmer in Java. The original paper is in
+ Porter stemmer in .NET. The original paper is in
Porter, 1980, An algorithm for suffix stripping, Program, Vol. 14,
no. 3, pp 130-137,
@@ -48,19 +48,13 @@ namespace Lucene.Net.Analysis.En
*/
-
-
- //JAVA TO C# CONVERTER TODO TASK: This Java 'import static' statement cannot be converted to C#:
- // import static org.apache.lucene.util.RamUsageEstimator.NUM_BYTES_CHAR;
- //using ArrayUtil = org.apache.lucene.util.ArrayUtil;
-
///
/// <summary>
/// Stemmer, implementing the Porter Stemming Algorithm
///
/// The Stemmer class transforms a word into its root form. The input
- /// word can be provided a character at time (by calling add()), or at once
- /// by calling one of the various stem(something) methods.
+ /// word can be provided a character at time (by calling <see cref="Add"/>), or at once
+ /// by calling one of the various <see cref="Stem"/> methods.
/// </summary>
internal class PorterStemmer
{
@@ -76,8 +70,8 @@ namespace Lucene.Net.Analysis.En
}
/// <summary>
- /// reset() resets the stemmer so it can stem another word. If you invoke
- /// the stemmer by calling add(char) and then stem(), you must call reset()
+ /// <see cref="Reset"/> resets the stemmer so it can stem another word. If you invoke
+ /// the stemmer by calling <see cref="Add(char)"/> and then <see cref="Stem"/>, you must call <see cref="Reset"/>
/// before starting another word.
/// </summary>
public virtual void Reset()
@@ -88,7 +82,7 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// Add a character to the word being stemmed. When you are finished
- /// adding characters, you can call stem(void) to process the word.
+ /// adding characters, you can call <see cref="Stem()"/> to process the word.
/// </summary>
public virtual void Add(char ch)
{
@@ -100,9 +94,9 @@ namespace Lucene.Net.Analysis.En
}
/// <summary>
- /// After a word has been stemmed, it can be retrieved by toString(),
- /// or a reference to the internal buffer can be retrieved by getResultBuffer
- /// and getResultLength (which is generally more efficient.)
+ /// After a word has been stemmed, it can be retrieved by <see cref="ToString"/>,
+ /// or a reference to the internal buffer can be retrieved by <see cref="ResultBuffer"/>
+ /// and <see cref="ResultLength"/> (which is generally more efficient.)
/// </summary>
public override string ToString()
{
@@ -122,7 +116,7 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// Returns a reference to a character buffer containing the results of
- /// the stemming process. You also need to consult getResultLength()
+ /// the stemming process. You also need to consult <see cref="ResultLength"/>
/// to determine the length of the result.
/// </summary>
[WritableArray]
@@ -732,7 +726,7 @@ namespace Lucene.Net.Analysis.En
/// <summary>
- /// Stem a word provided as a String. Returns the result as a String.
+ /// Stem a word provided as a <see cref="string"/>. Returns the result as a <see cref="string"/>.
/// </summary>
public virtual string Stem(string s)
{
@@ -747,9 +741,9 @@ namespace Lucene.Net.Analysis.En
}
/// <summary>
- /// Stem a word contained in a char[]. Returns true if the stemming process
+ /// Stem a word contained in a <see cref="char[]"/>. Returns true if the stemming process
/// resulted in a word different from the input. You can retrieve the
- /// result with getResultLength()/getResultBuffer() or toString().
+ /// result with <see cref="ResultLength"/>/<see cref="ResultBuffer"/> or <see cref="ToString"/>.
/// </summary>
public virtual bool Stem(char[] word)
{
@@ -757,10 +751,10 @@ namespace Lucene.Net.Analysis.En
}
/// <summary>
- /// Stem a word contained in a portion of a char[] array. Returns
+ /// Stem a word contained in a portion of a <see cref="char[]"/> array. Returns
/// true if the stemming process resulted in a word different from
/// the input. You can retrieve the result with
- /// getResultLength()/getResultBuffer() or toString().
+ /// <see cref="ResultLength"/>/<see cref="ResultBuffer"/> or <see cref="ToString"/>.
/// </summary>
public virtual bool Stem(char[] wordBuffer, int offset, int wordLen)
{
@@ -775,10 +769,10 @@ namespace Lucene.Net.Analysis.En
}
/// <summary>
- /// Stem a word contained in a leading portion of a char[] array.
+ /// Stem a word contained in a leading portion of a <see cref="char[]"/> array.
/// Returns true if the stemming process resulted in a word different
/// from the input. You can retrieve the result with
- /// getResultLength()/getResultBuffer() or toString().
+ /// <see cref="ResultLength"/>/<see cref="ResultBuffer"/> or <see cref="ToString"/>.
/// </summary>
public virtual bool Stem(char[] word, int wordLen)
{
@@ -786,10 +780,10 @@ namespace Lucene.Net.Analysis.En
}
/// <summary>
- /// Stem the word placed into the Stemmer buffer through calls to add().
+ /// Stem the word placed into the Stemmer buffer through calls to <see cref="Add"/>.
/// Returns true if the stemming process resulted in a word different
/// from the input. You can retrieve the result with
- /// getResultLength()/getResultBuffer() or toString().
+ /// <see cref="ResultLength"/>/<see cref="ResultBuffer"/> or <see cref="ToString"/>.
/// </summary>
public virtual bool Stem()
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/f3eafacf/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs b/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
index c22b78d..c97d9f0 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Util/OpenStringBuilder.cs
@@ -99,12 +99,12 @@ namespace Lucene.Net.Analysis.Util
return this;
}
- public virtual char CharAt(int index)
+ public virtual char CharAt(int index) // LUCENENET TODO: Remove (replaced with this[])
{
return m_buf[index];
}
- public virtual void SetCharAt(int index, char ch)
+ public virtual void SetCharAt(int index, char ch) // LUCENENET TODO: Remove (replaced with this[])
{
m_buf[index] = ch;
}
[7/9] lucenenet git commit: Lucene.Net.Analysis.Hu refactor: member
accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Hu refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/50853b47
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/50853b47
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/50853b47
Branch: refs/heads/api-work
Commit: 50853b4711f65da5485e347ce551f51110206002
Parents: ce43351
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 15:41:43 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 15:41:43 2017 +0700
----------------------------------------------------------------------
.../Analysis/Hu/HungarianAnalyzer.cs | 10 ++---
.../Analysis/Hu/HungarianLightStemFilter.cs | 4 +-
.../Hu/HungarianLightStemFilterFactory.cs | 5 +--
.../Analysis/Hu/HungarianLightStemmer.cs | 42 ++++++++++----------
4 files changed, 30 insertions(+), 31 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/50853b47/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
index 46fc2ec..9d9cdd5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianAnalyzer.cs
@@ -51,7 +51,7 @@ namespace Lucene.Net.Analysis.Hu
}
/// <summary>
- /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
+ /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class
/// accesses the static final set the first time.;
/// </summary>
private class DefaultSetHolder
@@ -79,7 +79,7 @@ namespace Lucene.Net.Analysis.Hu
}
/// <summary>
- /// Builds an analyzer with the default stop words: <see cref="#DEFAULT_STOPWORD_FILE"/>.
+ /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>.
/// </summary>
public HungarianAnalyzer(LuceneVersion matchVersion)
: this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
@@ -113,13 +113,13 @@ namespace Lucene.Net.Analysis.Hu
/// <summary>
/// Creates a
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// which tokenizes all the text in the provided <see cref="Reader"/>.
+ /// which tokenizes all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> A
/// <see cref="Analyzer.TokenStreamComponents"/>
/// built from an <see cref="StandardTokenizer"/> filtered with
- /// <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>
- /// , <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
+ /// <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>,
+ /// <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
/// provided and <see cref="SnowballFilter"/>. </returns>
protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/50853b47/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
index 43f33a1..eb95edb 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilter.cs
@@ -25,7 +25,7 @@ namespace Lucene.Net.Analysis.Hu
/// Hungarian words.
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para>
/// </summary>
@@ -48,7 +48,7 @@ namespace Lucene.Net.Analysis.Hu
{
if (!keywordAttr.IsKeyword)
{
- int newlen = stemmer.stem(termAtt.Buffer, termAtt.Length);
+ int newlen = stemmer.Stem(termAtt.Buffer, termAtt.Length);
termAtt.Length = newlen;
}
return true;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/50853b47/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilterFactory.cs
index 2664d63..89f6bfe 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemFilterFactory.cs
@@ -34,11 +34,10 @@ namespace Lucene.Net.Analysis.Hu
/// </summary>
public class HungarianLightStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new HungarianLightStemFilterFactory </summary>
+ /// Creates a new <see cref="HungarianLightStemFilterFactory"/> </summary>
public HungarianLightStemFilterFactory(IDictionary<string, string> args)
- : base(args)
+ : base(args)
{
if (args.Count > 0)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/50853b47/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemmer.cs
index 6a590ae..bd9636f 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hu/HungarianLightStemmer.cs
@@ -59,13 +59,13 @@ namespace Lucene.Net.Analysis.Hu
/// Light Stemmer for Hungarian.
/// <para>
/// This stemmer implements the "UniNE" algorithm in:
- /// <i>Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages</i>
+ /// <c>Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages</c>
/// Jacques Savoy
/// </para>
/// </summary>
public class HungarianLightStemmer
{
- public virtual int stem(char[] s, int len)
+ public virtual int Stem(char[] s, int len)
{
for (int i = 0; i < len; i++)
{
@@ -97,13 +97,13 @@ namespace Lucene.Net.Analysis.Hu
}
}
- len = removeCase(s, len);
- len = removePossessive(s, len);
- len = removePlural(s, len);
- return normalize(s, len);
+ len = RemoveCase(s, len);
+ len = RemovePossessive(s, len);
+ len = RemovePlural(s, len);
+ return Normalize(s, len);
}
- private int removeCase(char[] s, int len)
+ private int RemoveCase(char[] s, int len)
{
if (len > 6 && StemmerUtil.EndsWith(s, len, "kent"))
{
@@ -119,7 +119,7 @@ namespace Lucene.Net.Analysis.Hu
if (StemmerUtil.EndsWith(s, len, "al") || StemmerUtil.EndsWith(s, len, "el"))
{
- if (!isVowel(s[len - 3]) && s[len - 3] == s[len - 4])
+ if (!IsVowel(s[len - 3]) && s[len - 3] == s[len - 4])
{
return len - 3;
}
@@ -133,7 +133,7 @@ namespace Lucene.Net.Analysis.Hu
return len - 2;
}
- if ((StemmerUtil.EndsWith(s, len, "on") || StemmerUtil.EndsWith(s, len, "en")) && !isVowel(s[len - 3]))
+ if ((StemmerUtil.EndsWith(s, len, "on") || StemmerUtil.EndsWith(s, len, "en")) && !IsVowel(s[len - 3]))
{
return len - 2;
}
@@ -145,7 +145,7 @@ namespace Lucene.Net.Analysis.Hu
return len - 1;
case 'a':
case 'e':
- if (s[len - 2] == s[len - 3] && !isVowel(s[len - 2]))
+ if (s[len - 2] == s[len - 3] && !IsVowel(s[len - 2]))
{
return len - 2;
}
@@ -156,11 +156,11 @@ namespace Lucene.Net.Analysis.Hu
return len;
}
- private int removePossessive(char[] s, int len)
+ private int RemovePossessive(char[] s, int len)
{
if (len > 6)
{
- if (!isVowel(s[len - 5]) && (StemmerUtil.EndsWith(s, len, "atok") || StemmerUtil.EndsWith(s, len, "otok") || StemmerUtil.EndsWith(s, len, "etek")))
+ if (!IsVowel(s[len - 5]) && (StemmerUtil.EndsWith(s, len, "atok") || StemmerUtil.EndsWith(s, len, "otok") || StemmerUtil.EndsWith(s, len, "etek")))
{
return len - 4;
}
@@ -173,12 +173,12 @@ namespace Lucene.Net.Analysis.Hu
if (len > 5)
{
- if (!isVowel(s[len - 4]) && (StemmerUtil.EndsWith(s, len, "unk") || StemmerUtil.EndsWith(s, len, "tok") || StemmerUtil.EndsWith(s, len, "tek")))
+ if (!IsVowel(s[len - 4]) && (StemmerUtil.EndsWith(s, len, "unk") || StemmerUtil.EndsWith(s, len, "tok") || StemmerUtil.EndsWith(s, len, "tek")))
{
return len - 3;
}
- if (isVowel(s[len - 4]) && StemmerUtil.EndsWith(s, len, "juk"))
+ if (IsVowel(s[len - 4]) && StemmerUtil.EndsWith(s, len, "juk"))
{
return len - 3;
}
@@ -191,12 +191,12 @@ namespace Lucene.Net.Analysis.Hu
if (len > 4)
{
- if (!isVowel(s[len - 3]) && (StemmerUtil.EndsWith(s, len, "am") || StemmerUtil.EndsWith(s, len, "em") || StemmerUtil.EndsWith(s, len, "om") || StemmerUtil.EndsWith(s, len, "ad") || StemmerUtil.EndsWith(s, len, "ed") || StemmerUtil.EndsWith(s, len, "od") || StemmerUtil.EndsWith(s, len, "uk")))
+ if (!IsVowel(s[len - 3]) && (StemmerUtil.EndsWith(s, len, "am") || StemmerUtil.EndsWith(s, len, "em") || StemmerUtil.EndsWith(s, len, "om") || StemmerUtil.EndsWith(s, len, "ad") || StemmerUtil.EndsWith(s, len, "ed") || StemmerUtil.EndsWith(s, len, "od") || StemmerUtil.EndsWith(s, len, "uk")))
{
return len - 2;
}
- if (isVowel(s[len - 3]) && (StemmerUtil.EndsWith(s, len, "nk") || StemmerUtil.EndsWith(s, len, "ja") || StemmerUtil.EndsWith(s, len, "je")))
+ if (IsVowel(s[len - 3]) && (StemmerUtil.EndsWith(s, len, "nk") || StemmerUtil.EndsWith(s, len, "ja") || StemmerUtil.EndsWith(s, len, "je")))
{
return len - 2;
}
@@ -213,14 +213,14 @@ namespace Lucene.Net.Analysis.Hu
{
case 'a':
case 'e':
- if (!isVowel(s[len - 2]))
+ if (!IsVowel(s[len - 2]))
{
return len - 1;
}
break;
case 'm':
case 'd':
- if (isVowel(s[len - 2]))
+ if (IsVowel(s[len - 2]))
{
return len - 1;
}
@@ -233,7 +233,7 @@ namespace Lucene.Net.Analysis.Hu
return len;
}
- private int removePlural(char[] s, int len)
+ private int RemovePlural(char[] s, int len)
{
if (len > 3 && s[len - 1] == 'k')
{
@@ -254,7 +254,7 @@ namespace Lucene.Net.Analysis.Hu
return len;
}
- private int normalize(char[] s, int len)
+ private int Normalize(char[] s, int len)
{
if (len > 3)
{
@@ -270,7 +270,7 @@ namespace Lucene.Net.Analysis.Hu
return len;
}
- private bool isVowel(char ch)
+ private bool IsVowel(char ch)
{
switch (ch)
{
[8/9] lucenenet git commit: Lucene.Net.Analysis.Hunspell refactor:
member accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Hunspell refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/da08b94a
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/da08b94a
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/da08b94a
Branch: refs/heads/api-work
Commit: da08b94a1c8cecb77d5fecfa43448987a5592a67
Parents: 50853b4
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 16:26:10 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 16:26:10 2017 +0700
----------------------------------------------------------------------
.../Analysis/Hunspell/Dictionary.cs | 92 ++++++++++----------
.../Analysis/Hunspell/HunspellStemFilter.cs | 28 +++---
.../Hunspell/HunspellStemFilterFactory.cs | 7 +-
.../Analysis/Hunspell/Stemmer.cs | 21 +++--
4 files changed, 73 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/da08b94a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
index 8795529..780fe1c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Dictionary.cs
@@ -36,7 +36,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// </summary>
public class Dictionary
{
- internal static readonly char[] NOFLAGS = new char[0];
+ private static readonly char[] NOFLAGS = new char[0];
private const string ALIAS_KEY = "AF";
private const string PREFIX_KEY = "PFX";
@@ -105,28 +105,28 @@ namespace Lucene.Net.Analysis.Hunspell
private static Regex whitespacePattern = new Regex("\\s+", RegexOptions.Compiled);
/// <summary>
- /// Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix
+ /// Creates a new <see cref="Dictionary"/> containing the information read from the provided <see cref="Stream"/>s to hunspell affix
/// and dictionary files.
- /// You have to close the provided InputStreams yourself.
+ /// You have to dispose the provided <see cref="Stream"/>s yourself.
/// </summary>
- /// <param name="affix"> InputStream for reading the hunspell affix file (won't be closed). </param>
- /// <param name="dictionary"> InputStream for reading the hunspell dictionary file (won't be closed). </param>
- /// <exception cref="IOException"> Can be thrown while reading from the InputStreams </exception>
- /// <exception cref="ParseException"> Can be thrown if the content of the files does not meet expected formats </exception>
+ /// <param name="affix"> <see cref="Stream"/> for reading the hunspell affix file (won't be disposed). </param>
+ /// <param name="dictionary"> <see cref="Stream"/> for reading the hunspell dictionary file (won't be disposed). </param>
+ /// <exception cref="IOException"> Can be thrown while reading from the <see cref="Stream"/>s </exception>
+ /// <exception cref="Exception"> Can be thrown if the content of the files does not meet expected formats </exception>
public Dictionary(Stream affix, Stream dictionary)
: this(affix, new List<Stream>() { dictionary }, false)
{
}
/// <summary>
- /// Creates a new Dictionary containing the information read from the provided InputStreams to hunspell affix
+ /// Creates a new <see cref="Dictionary"/> containing the information read from the provided <see cref="Stream"/>s to hunspell affix
/// and dictionary files.
- /// You have to close the provided InputStreams yourself.
+ /// You have to dispose the provided <see cref="Stream"/>s yourself.
/// </summary>
- /// <param name="affix"> InputStream for reading the hunspell affix file (won't be closed). </param>
- /// <param name="dictionaries"> InputStream for reading the hunspell dictionary files (won't be closed). </param>
- /// <exception cref="IOException"> Can be thrown while reading from the InputStreams </exception>
- /// <exception cref="ParseException"> Can be thrown if the content of the files does not meet expected formats </exception>
+ /// <param name="affix"> <see cref="Stream"/> for reading the hunspell affix file (won't be disposed). </param>
+ /// <param name="dictionaries"> <see cref="Stream"/> for reading the hunspell dictionary files (won't be disposed). </param>
+ /// <exception cref="IOException"> Can be thrown while reading from the <see cref="Stream"/>s </exception>
+ /// <exception cref="Exception"> Can be thrown if the content of the files does not meet expected formats </exception>
public Dictionary(Stream affix, IList<Stream> dictionaries, bool ignoreCase)
{
this.ignoreCase = ignoreCase;
@@ -181,24 +181,24 @@ namespace Lucene.Net.Analysis.Hunspell
}
/// <summary>
- /// Looks up HunspellAffix prefixes that have an append that matches the String created from the given char array, offset and length
+ /// Looks up HunspellAffix prefixes that have an append that matches the <see cref="string"/> created from the given <see cref="char"/> array, offset and length
/// </summary>
- /// <param name="word"> Char array to generate the String from </param>
- /// <param name="offset"> Offset in the char array that the String starts at </param>
- /// <param name="length"> Length from the offset that the String is </param>
- /// <returns> List of HunspellAffix prefixes with an append that matches the String, or {@code null} if none are found </returns>
+ /// <param name="word"> <see cref="char"/> array to generate the <see cref="string"/> from </param>
+ /// <param name="offset"> Offset in the <see cref="char"/> array that the <see cref="string"/> starts at </param>
+ /// <param name="length"> Length from the offset that the <see cref="string"/> is </param>
+ /// <returns> List of HunspellAffix prefixes with an append that matches the <see cref="string"/>, or <c>null</c> if none are found </returns>
internal virtual IntsRef LookupPrefix(char[] word, int offset, int length)
{
return Lookup(prefixes, word, offset, length);
}
/// <summary>
- /// Looks up HunspellAffix suffixes that have an append that matches the String created from the given char array, offset and length
+ /// Looks up HunspellAffix suffixes that have an append that matches the <see cref="string"/> created from the given <see cref="char"/> array, offset and length
/// </summary>
- /// <param name="word"> Char array to generate the String from </param>
- /// <param name="offset"> Offset in the char array that the String starts at </param>
- /// <param name="length"> Length from the offset that the String is </param>
- /// <returns> List of HunspellAffix suffixes with an append that matches the String, or {@code null} if none are found </returns>
+ /// <param name="word"> <see cref="char"/> array to generate the <see cref="string"/> from </param>
+ /// <param name="offset"> Offset in the char array that the <see cref="string"/> starts at </param>
+ /// <param name="length"> Length from the offset that the <see cref="string"/> is </param>
+ /// <returns> List of HunspellAffix suffixes with an append that matches the <see cref="string"/>, or <c>null</c> if none are found </returns>
internal virtual IntsRef LookupSuffix(char[] word, int offset, int length)
{
return Lookup(suffixes, word, offset, length);
@@ -253,10 +253,10 @@ namespace Lucene.Net.Analysis.Hunspell
}
/// <summary>
- /// Reads the affix file through the provided InputStream, building up the prefix and suffix maps
+ /// Reads the affix file through the provided <see cref="Stream"/>, building up the prefix and suffix maps
/// </summary>
- /// <param name="affixStream"> InputStream to read the content of the affix file from </param>
- /// <param name="decoder"> CharsetDecoder to decode the content of the file </param>
+ /// <param name="affixStream"> <see cref="Stream"/> to read the content of the affix file from </param>
+ /// <param name="decoder"> <see cref="Encoding"/> to decode the content of the file </param>
/// <exception cref="IOException"> Can be thrown while reading from the InputStream </exception>
private void ReadAffixFile(Stream affixStream, Encoding decoder)
{
@@ -393,16 +393,15 @@ namespace Lucene.Net.Analysis.Hunspell
/// <summary>
/// Parses a specific affix rule putting the result into the provided affix map
/// </summary>
- /// <param name="affixes"> Map where the result of the parsing will be put </param>
+ /// <param name="affixes"> <see cref="SortedDictionary{string, IList{char?}}"/> where the result of the parsing will be put </param>
/// <param name="header"> Header line of the affix rule </param>
- /// <param name="reader"> BufferedReader to read the content of the rule from </param>
- /// <param name="conditionPattern"> <see cref="String#format(String, Object...)"/> pattern to be used to generate the condition regex
+ /// <param name="reader"> <see cref="TextReader"/> to read the content of the rule from </param>
+ /// <param name="conditionPattern"> <see cref="string.Format(string, object[])"/> pattern to be used to generate the condition regex
/// pattern </param>
/// <param name="seenPatterns"> map from condition -> index of patterns, for deduplication. </param>
/// <exception cref="IOException"> Can be thrown while reading the rule </exception>
private void ParseAffix(SortedDictionary<string, IList<char?>> affixes, string header, TextReader reader, string conditionPattern, IDictionary<string, int?> seenPatterns, IDictionary<string, int?> seenStrips)
{
-
BytesRef scratch = new BytesRef();
StringBuilder sb = new StringBuilder();
string[] args = whitespacePattern.Split(header);
@@ -580,12 +579,12 @@ namespace Lucene.Net.Analysis.Hunspell
internal static readonly Regex ENCODING_PATTERN = new Regex("^(\u00EF\u00BB\u00BF)?SET\\s+", RegexOptions.Compiled);
/// <summary>
- /// Parses the encoding specified in the affix file readable through the provided InputStream
+ /// Parses the encoding specified in the affix file readable through the provided <see cref="Stream"/>
/// </summary>
- /// <param name="affix"> InputStream for reading the affix file </param>
+ /// <param name="affix"> <see cref="Stream"/> for reading the affix file </param>
/// <returns> Encoding specified in the affix file </returns>
- /// <exception cref="IOException"> Can be thrown while reading from the InputStream </exception>
- /// <exception cref="ParseException"> Thrown if the first non-empty non-comment line read from the file does not adhere to the format {@code SET <encoding>} </exception>
+ /// <exception cref="IOException"> Can be thrown while reading from the <see cref="Stream"/> </exception>
+ /// <exception cref="Exception"> Thrown if the first non-empty non-comment line read from the file does not adhere to the format <c>SET <encoding></c></exception>
internal static string GetDictionaryEncoding(Stream affix)
{
StringBuilder encoding = new StringBuilder();
@@ -632,11 +631,11 @@ namespace Lucene.Net.Analysis.Hunspell
}
/// <summary>
- /// Retrieves the CharsetDecoder for the given encoding. Note, This isn't perfect as I think ISCII-DEVANAGARI and
+ /// Retrieves the <see cref="Encoding"/> for the given encoding. Note, This isn't perfect as I think ISCII-DEVANAGARI and
/// MICROSOFT-CP1251 etc are allowed...
/// </summary>
- /// <param name="encoding"> Encoding to retrieve the CharsetDecoder for </param>
- /// <returns> CharSetDecoder for the given encoding </returns>
+ /// <param name="encoding"> Encoding to retrieve the <see cref="Encoding"/> instance for </param>
+ /// <returns> <see cref="Encoding"/> for the given encoding <see cref="string"/> </returns>
// LUCENENET NOTE: This was getJavaEncoding in the original
private Encoding GetSystemEncoding(string encoding)
{
@@ -678,7 +677,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// Determines the appropriate <see cref="FlagParsingStrategy"/> based on the FLAG definition line taken from the affix file
/// </summary>
/// <param name="flagLine"> Line containing the flag information </param>
- /// <returns> FlagParsingStrategy that handles parsing flags in the way specified in the FLAG definition </returns>
+ /// <returns> <see cref="FlagParsingStrategy"/> that handles parsing flags in the way specified in the FLAG definition </returns>
internal static FlagParsingStrategy GetFlagParsingStrategy(string flagLine)
{
string[] parts = whitespacePattern.Split(flagLine);
@@ -730,10 +729,10 @@ namespace Lucene.Net.Analysis.Hunspell
}
/// <summary>
- /// Reads the dictionary file through the provided InputStreams, building up the words map
+ /// Reads the dictionary file through the provided <see cref="Stream"/>s, building up the words map
/// </summary>
- /// <param name="dictionaries"> InputStreams to read the dictionary file through </param>
- /// <param name="decoder"> CharsetDecoder used to decode the contents of the file </param>
+ /// <param name="dictionaries"> <see cref="Stream"/>s to read the dictionary file through </param>
+ /// <param name="decoder"> <see cref="Encoding"/> used to decode the contents of the file </param>
/// <exception cref="IOException"> Can be thrown while reading from the file </exception>
private void ReadDictionaryFiles(IList<Stream> dictionaries, Encoding decoder, Builder<IntsRef> words)
{
@@ -1011,11 +1010,10 @@ namespace Lucene.Net.Analysis.Hunspell
/// </summary>
internal abstract class FlagParsingStrategy
{
-
/// <summary>
- /// Parses the given String into a single flag
+ /// Parses the given <see cref="string"/> into a single flag
/// </summary>
- /// <param name="rawFlag"> String to parse into a flag </param>
+ /// <param name="rawFlag"> <see cref="string"/> to parse into a flag </param>
/// <returns> Parsed flag </returns>
internal virtual char ParseFlag(string rawFlag)
{
@@ -1028,15 +1026,15 @@ namespace Lucene.Net.Analysis.Hunspell
}
/// <summary>
- /// Parses the given String into multiple flags
+ /// Parses the given <see cref="string"/> into multiple flags
/// </summary>
- /// <param name="rawFlags"> String to parse into flags </param>
+ /// <param name="rawFlags"> <see cref="string"/> to parse into flags </param>
/// <returns> Parsed flags </returns>
internal abstract char[] ParseFlags(string rawFlags);
}
/// <summary>
- /// Simple implementation of <see cref="FlagParsingStrategy"/> that treats the chars in each String as a individual flags.
+ /// Simple implementation of <see cref="FlagParsingStrategy"/> that treats the chars in each <see cref="string"/> as a individual flags.
/// Can be used with both the ASCII and UTF-8 flag types.
/// </summary>
private class SimpleFlagParsingStrategy : FlagParsingStrategy
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/da08b94a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
index da38ef8..0135fad 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilter.cs
@@ -22,24 +22,24 @@ namespace Lucene.Net.Analysis.Hunspell
*/
/// <summary>
- /// TokenFilter that uses hunspell affix rules and words to stem tokens. Since hunspell supports a word having multiple
- /// stems, this filter can emit multiple tokens for each consumed token
+ /// <see cref="TokenFilter"/> that uses hunspell affix rules and words to stem tokens.
+ /// Since hunspell supports a word having multiple stems, this filter can emit
+ /// multiple tokens for each consumed token
///
/// <para>
/// Note: This filter is aware of the <see cref="KeywordAttribute"/>. To prevent
/// certain terms from being passed to the stemmer
- /// <see cref="KeywordAttribute#isKeyword()"/> should be set to <code>true</code>
+ /// <see cref="KeywordAttribute.IsKeyword"/> should be set to <c>true</c>
/// in a previous <see cref="TokenStream"/>.
///
/// Note: For including the original term as well as the stemmed version, see
- /// <see cref="org.apache.lucene.analysis.miscellaneous.KeywordRepeatFilterFactory"/>
+ /// <see cref="Miscellaneous.KeywordRepeatFilterFactory"/>
/// </para>
///
/// @lucene.experimental
/// </summary>
public sealed class HunspellStemFilter : TokenFilter
{
-
private readonly ICharTermAttribute termAtt;
private readonly IPositionIncrementAttribute posIncAtt;
private readonly IKeywordAttribute keywordAtt;
@@ -53,29 +53,29 @@ namespace Lucene.Net.Analysis.Hunspell
/// <summary>
/// Create a <see cref="HunspellStemFilter"/> outputting all possible stems. </summary>
- /// <seealso cref= #HunspellStemFilter(TokenStream, Dictionary, boolean) </seealso>
+ /// <seealso cref="HunspellStemFilter(TokenStream, Dictionary, bool)"/>
public HunspellStemFilter(TokenStream input, Dictionary dictionary)
- : this(input, dictionary, true)
+ : this(input, dictionary, true)
{
}
/// <summary>
/// Create a <see cref="HunspellStemFilter"/> outputting all possible stems. </summary>
- /// <seealso cref= #HunspellStemFilter(TokenStream, Dictionary, boolean, boolean) </seealso>
+ /// <seealso cref="HunspellStemFilter(TokenStream, Dictionary, bool, bool)"/>
public HunspellStemFilter(TokenStream input, Dictionary dictionary, bool dedup)
- : this(input, dictionary, dedup, false)
+ : this(input, dictionary, dedup, false)
{
}
/// <summary>
- /// Creates a new HunspellStemFilter that will stem tokens from the given TokenStream using affix rules in the provided
+ /// Creates a new HunspellStemFilter that will stem tokens from the given <see cref="TokenStream"/> using affix rules in the provided
/// Dictionary
/// </summary>
- /// <param name="input"> TokenStream whose tokens will be stemmed </param>
- /// <param name="dictionary"> HunspellDictionary containing the affix rules and words that will be used to stem the tokens </param>
+ /// <param name="input"> <see cref="TokenStream"/> whose tokens will be stemmed </param>
+ /// <param name="dictionary"> Hunspell <see cref="Dictionary"/> containing the affix rules and words that will be used to stem the tokens </param>
/// <param name="longestOnly"> true if only the longest term should be output. </param>
- public HunspellStemFilter(TokenStream input, Dictionary dictionary, bool dedup, bool longestOnly) :
- base(input)
+ public HunspellStemFilter(TokenStream input, Dictionary dictionary, bool dedup, bool longestOnly)
+ : base(input)
{
this.dedup = dedup && longestOnly == false; // don't waste time deduping if longestOnly is set
this.stemmer = new Stemmer(dictionary);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/da08b94a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilterFactory.cs
index 4615260..7546740 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/HunspellStemFilterFactory.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Hunspell
*/
/// <summary>
- /// TokenFilterFactory that creates instances of <see cref="HunspellStemFilter"/>.
+ /// <see cref="TokenFilterFactory"/> that creates instances of <see cref="HunspellStemFilter"/>.
/// Example config for British English:
/// <code>
/// <filter class="solr.HunspellStemFilterFactory"
@@ -53,8 +53,9 @@ namespace Lucene.Net.Analysis.Hunspell
private Dictionary dictionary;
/// <summary>
- /// Creates a new HunspellStemFilterFactory </summary>
- public HunspellStemFilterFactory(IDictionary<string, string> args) : base(args)
+ /// Creates a new <see cref="HunspellStemFilterFactory"/> </summary>
+ public HunspellStemFilterFactory(IDictionary<string, string> args)
+ : base(args)
{
dictionaryFiles = Require(args, PARAM_DICTIONARY);
affixFile = Get(args, PARAM_AFFIX);
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/da08b94a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
index 30c052d..60be661 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hunspell/Stemmer.cs
@@ -1,6 +1,5 @@
\ufeffusing Lucene.Net.Analysis.Util;
using Lucene.Net.Store;
-using Lucene.Net.Support;
using Lucene.Net.Util;
using Lucene.Net.Util.Automaton;
using System;
@@ -29,7 +28,7 @@ namespace Lucene.Net.Analysis.Hunspell
*/
/// <summary>
- /// Stemmer uses the affix rules declared in the Dictionary to generate one or more stems for a word. It
+ /// Stemmer uses the affix rules declared in the <see cref="Dictionary"/> to generate one or more stems for a word. It
/// conforms to the algorithm in the original hunspell algorithm, including recursive suffix stripping.
/// </summary>
internal sealed class Stemmer
@@ -44,9 +43,9 @@ namespace Lucene.Net.Analysis.Hunspell
private char[] scratchBuffer = new char[32];
/// <summary>
- /// Constructs a new Stemmer which will use the provided Dictionary to create its stems.
+ /// Constructs a new Stemmer which will use the provided <see cref="Dictionary"/> to create its stems.
/// </summary>
- /// <param name="dictionary"> Dictionary that will be used to create the stems </param>
+ /// <param name="dictionary"> <see cref="Dictionary"/> that will be used to create the stems </param>
public Stemmer(Dictionary dictionary)
{
this.dictionary = dictionary;
@@ -57,7 +56,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// Find the stem(s) of the provided word.
/// </summary>
/// <param name="word"> Word to find the stems for </param>
- /// <returns> List of stems for the word </returns>
+ /// <returns> <see cref="IList{CharsRef}"/> of stems for the word </returns>
public IList<CharsRef> Stem(string word)
{
return Stem(word.ToCharArray(), word.Length);
@@ -67,7 +66,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// Find the stem(s) of the provided word
/// </summary>
/// <param name="word"> Word to find the stems for </param>
- /// <returns> List of stems for the word </returns>
+ /// <returns> <see cref="IList{CharsRef}"/> of stems for the word </returns>
public IList<CharsRef> Stem(char[] word, int length)
{
@@ -101,7 +100,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// Find the unique stem(s) of the provided word
/// </summary>
/// <param name="word"> Word to find the stems for </param>
- /// <returns> List of stems for the word </returns>
+ /// <returns> <see cref="IList{CharsRef}"/> of stems for the word </returns>
public IList<CharsRef> UniqueStems(char[] word, int length)
{
IList<CharsRef> stems = Stem(word, length);
@@ -166,7 +165,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// but two prefixes (COMPLEXPREFIXES) or two suffixes must have continuation requirements to recurse. </param>
/// <param name="circumfix"> true if the previous prefix removal was signed as a circumfix
/// this means inner most suffix must also contain circumfix flag. </param>
- /// <returns> List of stems, or empty list if no stems are found </returns>
+ /// <returns> <see cref="IList{CharsRef}"/> of stems, or empty list if no stems are found </returns>
private IList<CharsRef> Stem(char[] word, int length, int previous, int prevFlag, int prefixFlag, int recursionDepth, bool doPrefix, bool doSuffix, bool previousWasPrefix, bool circumfix)
{
@@ -355,7 +354,7 @@ namespace Lucene.Net.Analysis.Hunspell
/// so we must check dictionary form against both to add it as a stem! </param>
/// <param name="recursionDepth"> current recursion depth </param>
/// <param name="prefix"> true if we are removing a prefix (false if its a suffix) </param>
- /// <returns> List of stems for the word, or an empty list if none are found </returns>
+ /// <returns> <see cref="IList{CharsRef}"/> of stems for the word, or an empty list if none are found </returns>
internal IList<CharsRef> ApplyAffix(char[] strippedWord, int length, int affix, int prefixFlag, int recursionDepth, bool prefix, bool circumfix)
{
// TODO: just pass this in from before, no need to decode it twice
@@ -458,8 +457,8 @@ namespace Lucene.Net.Analysis.Hunspell
/// Checks if the given flag cross checks with the given array of flags
/// </summary>
/// <param name="flag"> Flag to cross check with the array of flags </param>
- /// <param name="flags"> Array of flags to cross check against. Can be {@code null} </param>
- /// <returns> {@code true} if the flag is found in the array or the array is {@code null}, {@code false} otherwise </returns>
+ /// <param name="flags"> Array of flags to cross check against. Can be <c>null</c> </param>
+ /// <returns> <c>true</c> if the flag is found in the array or the array is <c>null</c>, <c>false</c> otherwise </returns>
private bool HasCrossCheckedFlag(char flag, char[] flags, bool matchEmpty)
{
return (flags.Length == 0 && matchEmpty) || Array.BinarySearch(flags, flag) >= 0;
[6/9] lucenenet git commit: Lucene.Net.Analysis.Hi refactor: member
accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Hi refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/ce43351e
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/ce43351e
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/ce43351e
Branch: refs/heads/api-work
Commit: ce43351eb840f3bc48db8b4fb1cc97ad0692de3e
Parents: ed446d2
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 15:36:07 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 15:36:07 2017 +0700
----------------------------------------------------------------------
.../Analysis/Hi/HindiAnalyzer.cs | 23 +++++++++-----------
.../Analysis/Hi/HindiNormalizationFilter.cs | 9 ++++----
.../Hi/HindiNormalizationFilterFactory.cs | 4 +---
.../Analysis/Hi/HindiNormalizer.cs | 14 +++++-------
.../Analysis/Hi/HindiStemFilter.cs | 1 -
.../Analysis/Hi/HindiStemFilterFactory.cs | 3 +--
.../Analysis/Hi/HindiStemmer.cs | 2 +-
7 files changed, 23 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
index 49a1d01..2025cac 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiAnalyzer.cs
@@ -28,14 +28,11 @@ namespace Lucene.Net.Analysis.Hi
/// <summary>
/// Analyzer for Hindi.
- /// <para>
- /// <a name="version"/>
- /// </para>
/// <para>You must specify the required <see cref="LuceneVersion"/>
/// compatibility when creating HindiAnalyzer:
- /// <ul>
- /// <li> As of 3.6, StandardTokenizer is used for tokenization
- /// </ul>
+ /// <list type="bullet">
+ /// <item> As of 3.6, StandardTokenizer is used for tokenization</item>
+ /// </list>
/// </para>
/// </summary>
public sealed class HindiAnalyzer : StopwordAnalyzerBase
@@ -44,7 +41,7 @@ namespace Lucene.Net.Analysis.Hi
/// <summary>
/// File containing default Hindi stopwords.
- ///
+ /// <para/>
/// Default stopword list is from http://members.unine.ch/jacques.savoy/clef/index.html
/// The stopword list is BSD-Licensed.
/// </summary>
@@ -63,7 +60,7 @@ namespace Lucene.Net.Analysis.Hi
}
/// <summary>
- /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
+ /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class
/// accesses the static final set the first time.;
/// </summary>
private class DefaultSetHolder
@@ -93,7 +90,7 @@ namespace Lucene.Net.Analysis.Hi
/// <param name="stopwords"> a stopword set </param>
/// <param name="stemExclusionSet"> a stemming exclusion set </param>
public HindiAnalyzer(LuceneVersion version, CharArraySet stopwords, CharArraySet stemExclusionSet)
- : base(version, stopwords)
+ : base(version, stopwords)
{
this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(m_matchVersion, stemExclusionSet));
}
@@ -104,23 +101,23 @@ namespace Lucene.Net.Analysis.Hi
/// <param name="version"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
public HindiAnalyzer(LuceneVersion version, CharArraySet stopwords)
- : this(version, stopwords, CharArraySet.EMPTY_SET)
+ : this(version, stopwords, CharArraySet.EMPTY_SET)
{
}
/// <summary>
/// Builds an analyzer with the default stop words:
- /// <see cref="#DEFAULT_STOPWORD_FILE"/>.
+ /// <see cref="DEFAULT_STOPWORD_FILE"/>.
/// </summary>
public HindiAnalyzer(LuceneVersion version)
- : this(version, DefaultSetHolder.DEFAULT_STOP_SET)
+ : this(version, DefaultSetHolder.DEFAULT_STOP_SET)
{
}
/// <summary>
/// Creates
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// used to tokenize all the text in the provided <see cref="Reader"/>.
+ /// used to tokenize all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> <see cref="Analyzer.TokenStreamComponents"/>
/// built from a <see cref="StandardTokenizer"/> filtered with
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
index 8600e0d..25fc39c 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilter.cs
@@ -1,5 +1,4 @@
\ufeffusing Lucene.Net.Analysis.TokenAttributes;
-using System.IO;
namespace Lucene.Net.Analysis.Hi
{
@@ -26,13 +25,13 @@ namespace Lucene.Net.Analysis.Hi
/// <para>
/// In some cases the normalization may cause unrelated terms to conflate, so
/// to prevent terms from being normalized use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
- /// </para> </summary>
- /// <seealso cref= HindiNormalizer </seealso>
+ /// </para>
+ /// </summary>
+ /// <seealso cref="HindiNormalizer"/>
public sealed class HindiNormalizationFilter : TokenFilter
{
-
private readonly HindiNormalizer normalizer = new HindiNormalizer();
private readonly ICharTermAttribute termAtt;
private readonly IKeywordAttribute keywordAtt;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilterFactory.cs
index 70f7175..4cad89e 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizationFilterFactory.cs
@@ -1,6 +1,5 @@
\ufeffusing Lucene.Net.Analysis.Util;
using System.Collections.Generic;
-using System.IO;
namespace Lucene.Net.Analysis.Hi
{
@@ -33,9 +32,8 @@ namespace Lucene.Net.Analysis.Hi
/// </summary>
public class HindiNormalizationFilterFactory : TokenFilterFactory, IMultiTermAwareComponent
{
-
/// <summary>
- /// Creates a new HindiNormalizationFilterFactory </summary>
+ /// Creates a new <see cref="HindiNormalizationFilterFactory"/> </summary>
public HindiNormalizationFilterFactory(IDictionary<string, string> args)
: base(args)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizer.cs
index b1a1271..45144a6 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiNormalizer.cs
@@ -27,19 +27,18 @@ namespace Lucene.Net.Analysis.Hi
/// </para>
/// <para>
/// Implements the Hindi-language specific algorithm specified in:
- /// <i>Word normalization in Indian languages</i>
+ /// <c>Word normalization in Indian languages</c>
/// Prasad Pingali and Vasudeva Varma.
/// http://web2py.iiit.ac.in/publications/default/download/inproceedings.pdf.3fe5b38c-02ee-41ce-9a8f-3e745670be32.pdf
/// </para>
/// <para>
- /// with the following additions from <i>Hindi CLIR in Thirty Days</i>
+ /// with the following additions from <c>Hindi CLIR in Thirty Days</c>
/// Leah S. Larkey, Margaret E. Connell, and Nasreen AbdulJaleel.
/// http://maroo.cs.umass.edu/pub/web/getpdf.php?id=454:
- /// <ul>
- /// <li>Internal Zero-width joiner and Zero-width non-joiners are removed
- /// <li>In addition to chandrabindu, NA+halant is normalized to anusvara
- /// </ul>
- ///
+ /// <list type="bullet">
+ /// <item>Internal Zero-width joiner and Zero-width non-joiners are removed</item>
+ /// <item>In addition to chandrabindu, NA+halant is normalized to anusvara</item>
+ /// </list>
/// </para>
/// </summary>
public class HindiNormalizer
@@ -52,7 +51,6 @@ namespace Lucene.Net.Analysis.Hi
/// <returns> length of input buffer after normalization </returns>
public virtual int Normalize(char[] s, int len)
{
-
for (int i = 0; i < len; i++)
{
switch (s[i])
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilter.cs
index ac11063..dced8e8 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilter.cs
@@ -1,5 +1,4 @@
\ufeffusing Lucene.Net.Analysis.TokenAttributes;
-using System.IO;
namespace Lucene.Net.Analysis.Hi
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilterFactory.cs
index cdd897e..2427506 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.Hi
/// </summary>
public class HindiStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new HindiStemFilterFactory </summary>
+ /// Creates a new <see cref="HindiStemFilterFactory"/> </summary>
public HindiStemFilterFactory(IDictionary<string, string> args)
: base(args)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ce43351e/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemmer.cs
index c356553..35dfd91 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hi/HindiStemmer.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Hi
/// Light Stemmer for Hindi.
/// <para>
/// Implements the algorithm specified in:
- /// <i>A Lightweight Stemmer for Hindi</i>
+ /// <c>A Lightweight Stemmer for Hindi</c>
/// Ananthakrishnan Ramanathan and Durgesh D Rao.
/// http://computing.open.ac.uk/Sites/EACLSouthAsia/Papers/p6-Ramanathan.pdf
/// </para>
[9/9] lucenenet git commit: Lucene.Net.Analysis.Hy refactor: member
accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Hy refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/a4828b1a
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/a4828b1a
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/a4828b1a
Branch: refs/heads/api-work
Commit: a4828b1ad1814da6c75daf8335df4ee103d8941b
Parents: da08b94
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 16:29:09 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 16:29:09 2017 +0700
----------------------------------------------------------------------
.../Analysis/Hy/ArmenianAnalyzer.cs | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/a4828b1a/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
index bec70b7..f6a5cdc 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Hy/ArmenianAnalyzer.cs
@@ -50,7 +50,7 @@ namespace Lucene.Net.Analysis.Hy
}
/// <summary>
- /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
+ /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class
/// accesses the static final set the first time.;
/// </summary>
private class DefaultSetHolder
@@ -74,10 +74,11 @@ namespace Lucene.Net.Analysis.Hy
}
/// <summary>
- /// Builds an analyzer with the default stop words: <see cref="#DEFAULT_STOPWORD_FILE"/>.
+ /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>.
/// </summary>
+ /// <param name="matchVersion"> lucene compatibility version </param>
public ArmenianAnalyzer(LuceneVersion matchVersion)
- : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
+ : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
{
}
@@ -87,7 +88,7 @@ namespace Lucene.Net.Analysis.Hy
/// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
public ArmenianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
- : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
+ : this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
{
}
@@ -100,7 +101,7 @@ namespace Lucene.Net.Analysis.Hy
/// <param name="stopwords"> a stopword set </param>
/// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
public ArmenianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
- : base(matchVersion, stopwords)
+ : base(matchVersion, stopwords)
{
this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet));
}
@@ -108,13 +109,13 @@ namespace Lucene.Net.Analysis.Hy
/// <summary>
/// Creates a
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// which tokenizes all the text in the provided <see cref="Reader"/>.
+ /// which tokenizes all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> A
/// <see cref="Analyzer.TokenStreamComponents"/>
/// built from an <see cref="StandardTokenizer"/> filtered with
- /// <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>
- /// , <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
+ /// <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>,
+ /// <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
/// provided and <see cref="SnowballFilter"/>. </returns>
protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
{
[5/9] lucenenet git commit: Lucene.Net.Analysis.Gl refactor: member
accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Gl refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/ed446d23
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/ed446d23
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/ed446d23
Branch: refs/heads/api-work
Commit: ed446d239b9577e25e865bf73ccc105652f37745
Parents: 4c9c2bc
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 15:27:59 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 15:27:59 2017 +0700
----------------------------------------------------------------------
.../Analysis/Gl/GalicianAnalyzer.cs | 10 +++++-----
.../Analysis/Gl/GalicianMinimalStemFilter.cs | 6 +++---
.../Analysis/Gl/GalicianMinimalStemFilterFactory.cs | 3 +--
.../Analysis/Gl/GalicianMinimalStemmer.cs | 7 ++-----
.../Analysis/Gl/GalicianStemFilter.cs | 2 +-
.../Analysis/Gl/GalicianStemFilterFactory.cs | 3 +--
.../Analysis/Gl/GalicianStemmer.cs | 4 ++--
7 files changed, 15 insertions(+), 20 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
index 9b471bc..0e38cfa 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianAnalyzer.cs
@@ -49,7 +49,7 @@ namespace Lucene.Net.Analysis.Gl
}
/// <summary>
- /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
+ /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class
/// accesses the static final set the first time.;
/// </summary>
private class DefaultSetHolder
@@ -77,7 +77,7 @@ namespace Lucene.Net.Analysis.Gl
}
/// <summary>
- /// Builds an analyzer with the default stop words: <see cref="#DEFAULT_STOPWORD_FILE"/>.
+ /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>.
/// </summary>
public GalicianAnalyzer(LuceneVersion matchVersion)
: this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
@@ -111,13 +111,13 @@ namespace Lucene.Net.Analysis.Gl
/// <summary>
/// Creates a
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// which tokenizes all the text in the provided <see cref="Reader"/>.
+ /// which tokenizes all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> A
/// <see cref="Analyzer.TokenStreamComponents"/>
/// built from an <see cref="StandardTokenizer"/> filtered with
- /// <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>
- /// , <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
+ /// <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>,
+ /// <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
/// provided and <see cref="GalicianStemFilter"/>. </returns>
protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
index 2b67926..bf21fb1 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilter.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Gl
/// Galician words.
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para>
/// </summary>
@@ -35,7 +35,7 @@ namespace Lucene.Net.Analysis.Gl
private readonly IKeywordAttribute keywordAttr;
public GalicianMinimalStemFilter(TokenStream input)
- : base(input)
+ : base(input)
{
termAtt = AddAttribute<ICharTermAttribute>();
keywordAttr = AddAttribute<IKeywordAttribute>();
@@ -47,7 +47,7 @@ namespace Lucene.Net.Analysis.Gl
{
if (!keywordAttr.IsKeyword)
{
- int newlen = stemmer.stem(termAtt.Buffer, termAtt.Length);
+ int newlen = stemmer.Stem(termAtt.Buffer, termAtt.Length);
termAtt.Length = newlen;
}
return true;
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilterFactory.cs
index 3fb2221..484f582 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.Gl
/// </summary>
public class GalicianMinimalStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new GalicianMinimalStemFilterFactory </summary>
+ /// Creates a new <see cref="GalicianMinimalStemFilterFactory"/> </summary>
public GalicianMinimalStemFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemmer.cs
index 9a965c9..fa8a3e4 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianMinimalStemmer.cs
@@ -19,8 +19,6 @@ namespace Lucene.Net.Analysis.Gl
* limitations under the License.
*/
- //using RSLPStemmerBase = org.apache.lucene.analysis.pt.RSLPStemmerBase;
-
/// <summary>
/// Minimal Stemmer for Galician
/// <para>
@@ -29,13 +27,12 @@ namespace Lucene.Net.Analysis.Gl
/// "Regras do lematizador para o galego"
/// </para>
/// </summary>
- /// <seealso cref= RSLPStemmerBase </seealso>
+ /// <seealso cref="RSLPStemmerBase"/>
public class GalicianMinimalStemmer : RSLPStemmerBase
{
-
private static readonly Step pluralStep = Parse(typeof(GalicianMinimalStemmer), "galician.rslp")["Plural"];
- public virtual int stem(char[] s, int len)
+ public virtual int Stem(char[] s, int len)
{
return pluralStep.Apply(s, len);
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
index 3db897e..d6c84d2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilter.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Gl
/// Galician words.
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para>
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilterFactory.cs
index 2c47784..f939ca2 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.Gl
/// </summary>
public class GalicianStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new GalicianStemFilterFactory </summary>
+ /// Creates a new <see cref="GalicianStemFilterFactory"/> </summary>
public GalicianStemFilterFactory(IDictionary<string, string> args)
: base(args)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/ed446d23/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemmer.cs
index 9e7af33..f8e9550 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Gl/GalicianStemmer.cs
@@ -24,8 +24,8 @@ namespace Lucene.Net.Analysis.Gl
/// <summary>
/// Galician stemmer implementing "Regras do lematizador para o galego".
/// </summary>
- /// <seealso cref= RSLPStemmerBase </seealso>
- /// <seealso cref= <a href="http://bvg.udc.es/recursos_lingua/stemming.jsp">Description of rules</a> </seealso>
+ /// <seealso cref="RSLPStemmerBase"/>
+ /// <a href="http://bvg.udc.es/recursos_lingua/stemming.jsp">Description of rules</a>
public class GalicianStemmer : RSLPStemmerBase
{
private static readonly Step plural, unification, adverb, augmentative, noun, verb, vowel;
[3/9] lucenenet git commit: Lucene.Net.Analysis.Ga refactor: member
accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Ga refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/af4700e7
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/af4700e7
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/af4700e7
Branch: refs/heads/api-work
Commit: af4700e7baabf8f71c390af5f4a3eefd2df94e49
Parents: 3dfc567
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 15:16:38 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 15:16:38 2017 +0700
----------------------------------------------------------------------
.../Analysis/Ga/IrishAnalyzer.cs | 10 +++++-----
.../Analysis/Ga/IrishLowerCaseFilter.cs | 4 ++--
.../Analysis/Ga/IrishLowerCaseFilterFactory.cs | 3 +--
3 files changed, 8 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/af4700e7/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
index e1e7e6e..04bfcae 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishAnalyzer.cs
@@ -68,7 +68,7 @@ namespace Lucene.Net.Analysis.Ga
}
/// <summary>
- /// Atomically loads the DEFAULT_STOP_SET in a lazy fashion once the outer class
+ /// Atomically loads the <see cref="DEFAULT_STOP_SET"/> in a lazy fashion once the outer class
/// accesses the static final set the first time.;
/// </summary>
private class DefaultSetHolder
@@ -92,7 +92,7 @@ namespace Lucene.Net.Analysis.Ga
}
/// <summary>
- /// Builds an analyzer with the default stop words: <see cref="#DEFAULT_STOPWORD_FILE"/>.
+ /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>.
/// </summary>
public IrishAnalyzer(LuceneVersion matchVersion)
: this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET)
@@ -126,13 +126,13 @@ namespace Lucene.Net.Analysis.Ga
/// <summary>
/// Creates a
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// which tokenizes all the text in the provided <see cref="Reader"/>.
+ /// which tokenizes all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> A
/// <see cref="Analyzer.TokenStreamComponents"/>
/// built from an <see cref="StandardTokenizer"/> filtered with
- /// <see cref="StandardFilter"/>, <see cref="IrishLowerCaseFilter"/>, <see cref="StopFilter"/>
- /// , <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
+ /// <see cref="StandardFilter"/>, <see cref="IrishLowerCaseFilter"/>, <see cref="StopFilter"/>,
+ /// <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is
/// provided and <see cref="SnowballFilter"/>. </returns>
protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader)
{
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/af4700e7/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilter.cs
index 2a876f5..3fbfdd5 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilter.cs
@@ -29,10 +29,10 @@ namespace Lucene.Net.Analysis.Ga
private readonly ICharTermAttribute termAtt;
/// <summary>
- /// Create an IrishLowerCaseFilter that normalises Irish token text.
+ /// Create an <see cref="IrishLowerCaseFilter"/> that normalises Irish token text.
/// </summary>
public IrishLowerCaseFilter(TokenStream @in)
- : base(@in)
+ : base(@in)
{
termAtt = AddAttribute<ICharTermAttribute>();
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/af4700e7/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilterFactory.cs
index c292cd5..c2e8d47 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Ga/IrishLowerCaseFilterFactory.cs
@@ -32,9 +32,8 @@ namespace Lucene.Net.Analysis.Ga
/// </summary>
public class IrishLowerCaseFilterFactory : TokenFilterFactory, IMultiTermAwareComponent
{
-
/// <summary>
- /// Creates a new IrishLowerCaseFilterFactory </summary>
+ /// Creates a new <see cref="IrishLowerCaseFilterFactory"/> </summary>
public IrishLowerCaseFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
[4/9] lucenenet git commit: Lucene.Net.Analysis.Common: SWEEP:
reverted link to from matchVersion parameter
Posted by ni...@apache.org.
Lucene.Net.Analysis.Common: SWEEP: reverted link to <see cref="LuceneVersion"> from matchVersion parameter
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/4c9c2bc6
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/4c9c2bc6
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/4c9c2bc6
Branch: refs/heads/api-work
Commit: 4c9c2bc6bc5e116e000673ac90995fa87eab59f7
Parents: af4700e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 15:17:44 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 15:17:44 2017 +0700
----------------------------------------------------------------------
src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs | 4 ++--
src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs | 4 ++--
src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs | 4 ++--
src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs | 4 ++--
src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs | 4 ++--
src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs | 2 +-
src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs | 4 ++--
7 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
index 221979b..308e4f9 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Da/DanishAnalyzer.cs
@@ -89,7 +89,7 @@ namespace Lucene.Net.Analysis.Da
/// <summary>
/// Builds an analyzer with the given stop words.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
public DanishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
: this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
@@ -101,7 +101,7 @@ namespace Lucene.Net.Analysis.Da
/// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
/// stemming.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
/// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
public DanishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
index 7eefe2e..1d8dc9d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/De/GermanAnalyzer.cs
@@ -141,7 +141,7 @@ namespace Lucene.Net.Analysis.De
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
public GermanAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
@@ -153,7 +153,7 @@ namespace Lucene.Net.Analysis.De
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
/// <param name="stemExclusionSet">
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
index 8848b24..eec5878 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/En/EnglishAnalyzer.cs
@@ -63,7 +63,7 @@ namespace Lucene.Net.Analysis.En
/// <summary>
/// Builds an analyzer with the given stop words.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
public EnglishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
: this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
@@ -75,7 +75,7 @@ namespace Lucene.Net.Analysis.En
/// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
/// stemming.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
/// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
public EnglishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
index d6f6707..4e0062b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Es/SpanishAnalyzer.cs
@@ -97,7 +97,7 @@ namespace Lucene.Net.Analysis.Es
/// <summary>
/// Builds an analyzer with the given stop words.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
public SpanishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
: this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
@@ -109,7 +109,7 @@ namespace Lucene.Net.Analysis.Es
/// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
/// stemming.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
/// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
public SpanishAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
index 029f798..d0fa82d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Eu/BasqueAnalyzer.cs
@@ -84,7 +84,7 @@ namespace Lucene.Net.Analysis.Eu
/// <summary>
/// Builds an analyzer with the given stop words.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
public BasqueAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
: this(matchVersion, stopwords, CharArraySet.EMPTY_SET)
@@ -96,7 +96,7 @@ namespace Lucene.Net.Analysis.Eu
/// provided this analyzer will add a <see cref="SetKeywordMarkerFilter"/> before
/// stemming.
/// </summary>
- /// <param name="matchVersion"> <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// <param name="matchVersion"> lucene compatibility version </param>
/// <param name="stopwords"> a stopword set </param>
/// <param name="stemExclusionSet"> a set of terms not to be stemmed </param>
public BasqueAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
index 440c48c..0e837ca 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fa/PersianAnalyzer.cs
@@ -99,7 +99,7 @@ namespace Lucene.Net.Analysis.Fa
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
public PersianAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/4c9c2bc6/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
index 5a910fe..7ec11c3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
@@ -152,7 +152,7 @@ namespace Lucene.Net.Analysis.Fr
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
public FrenchAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
@@ -164,7 +164,7 @@ namespace Lucene.Net.Analysis.Fr
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// <see cref="LuceneVersion"/> lucene compatibility version </param>
+ /// lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
/// <param name="stemExclutionSet">
[2/9] lucenenet git commit: Lucene.Net.Analysis.Fr refactor: member
accessibility and documentation comments
Posted by ni...@apache.org.
Lucene.Net.Analysis.Fr refactor: member accessibility and documentation comments
Project: http://git-wip-us.apache.org/repos/asf/lucenenet/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucenenet/commit/3dfc567f
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/3dfc567f
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/3dfc567f
Branch: refs/heads/api-work
Commit: 3dfc567fe20a43fdbbdc7eccd8043b986e5a9c3b
Parents: f3eafac
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Fri Feb 3 15:07:47 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Fri Feb 3 15:07:47 2017 +0700
----------------------------------------------------------------------
.../Analysis/Fr/FrenchAnalyzer.cs | 54 ++++++---
.../Analysis/Fr/FrenchLightStemFilter.cs | 2 +-
.../Analysis/Fr/FrenchLightStemFilterFactory.cs | 3 +-
.../Analysis/Fr/FrenchLightStemmer.cs | 3 +-
.../Analysis/Fr/FrenchMinimalStemFilter.cs | 2 +-
.../Fr/FrenchMinimalStemFilterFactory.cs | 3 +-
.../Analysis/Fr/FrenchMinimalStemmer.cs | 2 +-
.../Analysis/Fr/FrenchStemFilter.cs | 9 +-
.../Analysis/Fr/FrenchStemmer.cs | 118 +++++++++----------
9 files changed, 105 insertions(+), 91 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
index b9c01d2..5a910fe 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchAnalyzer.cs
@@ -37,18 +37,16 @@ namespace Lucene.Net.Analysis.Fr
/// A default set of stopwords is used unless an alternative list is specified, but the
/// exclusion list is empty by default.
/// </para>
- ///
- /// <a name="version"/>
/// <para>You must specify the required <see cref="LuceneVersion"/>
/// compatibility when creating FrenchAnalyzer:
- /// <ul>
- /// <li> As of 3.6, FrenchLightStemFilter is used for less aggressive stemming.
- /// <li> As of 3.1, Snowball stemming is done with SnowballFilter,
- /// LowerCaseFilter is used prior to StopFilter, and ElisionFilter and
- /// Snowball stopwords are used by default.
- /// <li> As of 2.9, StopFilter preserves position
- /// increments
- /// </ul>
+ /// <list type="bullet">
+ /// <item> As of 3.6, <see cref="FrenchLightStemFilter"/> is used for less aggressive stemming.</item>
+ /// <item> As of 3.1, Snowball stemming is done with <see cref="SnowballFilter"/>,
+ /// <see cref="LowerCaseFilter"/> is used prior to <see cref="StopFilter"/>, and <see cref="ElisionFilter"/> and
+ /// Snowball stopwords are used by default.</item>
+ /// <item> As of 2.9, <see cref="StopFilter"/> preserves position
+ /// increments</item>
+ /// </list>
///
/// </para>
/// <para><b>NOTE</b>: This class uses the same <see cref="LuceneVersion"/>
@@ -56,19 +54,41 @@ namespace Lucene.Net.Analysis.Fr
/// </summary>
public sealed class FrenchAnalyzer : StopwordAnalyzerBase
{
-
/// <summary>
/// Extended list of typical French stopwords. </summary>
/// @deprecated (3.1) remove in Lucene 5.0 (index bw compat)
[Obsolete("(3.1) remove in Lucene 5.0 (index bw compat)")]
- private static readonly string[] FRENCH_STOP_WORDS = new string[] { "a", "afin", "ai", "ainsi", "apr�s", "attendu", "au", "aujourd", "auquel", "aussi", "autre", "autres", "aux", "auxquelles", "auxquels", "avait", "avant", "avec", "avoir", "c", "car", "ce", "ceci", "cela", "celle", "celles", "celui", "cependant", "certain", "certaine", "certaines", "certains", "ces", "cet", "cette", "ceux", "chez", "ci", "combien", "comme", "comment", "concernant", "contre", "d", "dans", "de", "debout", "dedans", "dehors", "del�", "depuis", "derri�re", "des", "d�sormais", "desquelles", "desquels", "dessous", "dessus", "devant", "devers", "devra", "divers", "diverse", "diverses", "doit", "donc", "dont", "du", "duquel", "durant", "d�s", "elle", "elles", "en", "entre", "environ", "est", "et", "etc", "etre", "eu", "eux", "except�", "hormis", "hors", "h�las", "hui", "il", "ils", "j", "je", "jusqu", "jusque", "l", "la", "laquelle", "le", "lequel", "les", "lesquelles", "lesquels", "leur", "le
urs", "lorsque", "lui", "l�", "ma", "mais", "malgr�", "me", "merci", "mes", "mien", "mienne", "miennes", "miens", "moi", "moins", "mon", "moyennant", "m�me", "m�mes", "n", "ne", "ni", "non", "nos", "notre", "nous", "n�anmoins", "n�tre", "n�tres", "on", "ont", "ou", "outre", "o�", "par", "parmi", "partant", "pas", "pass�", "pendant", "plein", "plus", "plusieurs", "pour", "pourquoi", "proche", "pr�s", "puisque", "qu", "quand", "que", "quel", "quelle", "quelles", "quels", "qui", "quoi", "quoique", "revoici", "revoil�", "s", "sa", "sans", "sauf", "se", "selon", "seront", "ses", "si", "sien", "sienne", "siennes", "siens", "sinon", "soi", "soit", "son", "sont", "sous", "suivant", "sur", "ta", "te", "tes", "tien", "tienne", "tiennes", "tiens", "toi", "ton", "tous", "tout", "toute", "toutes", "tu", "un", "une", "va", "vers", "voici", "voil�", "vos", "votre", "vous", "vu", "v�tre", "v�tres", "y", "�", "�a", "�s", "�t�", "�tre", "�" };
+ private static readonly string[] FRENCH_STOP_WORDS = new string[] {
+ "a", "afin", "ai", "ainsi", "apr�s", "attendu", "au", "aujourd", "auquel", "aussi",
+ "autre", "autres", "aux", "auxquelles", "auxquels", "avait", "avant", "avec", "avoir",
+ "c", "car", "ce", "ceci", "cela", "celle", "celles", "celui", "cependant", "certain",
+ "certaine", "certaines", "certains", "ces", "cet", "cette", "ceux", "chez", "ci",
+ "combien", "comme", "comment", "concernant", "contre", "d", "dans", "de", "debout",
+ "dedans", "dehors", "del�", "depuis", "derri�re", "des", "d�sormais", "desquelles",
+ "desquels", "dessous", "dessus", "devant", "devers", "devra", "divers", "diverse",
+ "diverses", "doit", "donc", "dont", "du", "duquel", "durant", "d�s", "elle", "elles",
+ "en", "entre", "environ", "est", "et", "etc", "etre", "eu", "eux", "except�", "hormis",
+ "hors", "h�las", "hui", "il", "ils", "j", "je", "jusqu", "jusque", "l", "la", "laquelle",
+ "le", "lequel", "les", "lesquelles", "lesquels", "leur", "leurs", "lorsque", "lui", "l�",
+ "ma", "mais", "malgr�", "me", "merci", "mes", "mien", "mienne", "miennes", "miens", "moi",
+ "moins", "mon", "moyennant", "m�me", "m�mes", "n", "ne", "ni", "non", "nos", "notre",
+ "nous", "n�anmoins", "n�tre", "n�tres", "on", "ont", "ou", "outre", "o�", "par", "parmi",
+ "partant", "pas", "pass�", "pendant", "plein", "plus", "plusieurs", "pour", "pourquoi",
+ "proche", "pr�s", "puisque", "qu", "quand", "que", "quel", "quelle", "quelles", "quels",
+ "qui", "quoi", "quoique", "revoici", "revoil�", "s", "sa", "sans", "sauf", "se", "selon",
+ "seront", "ses", "si", "sien", "sienne", "siennes", "siens", "sinon", "soi", "soit",
+ "son", "sont", "sous", "suivant", "sur", "ta", "te", "tes", "tien", "tienne", "tiennes",
+ "tiens", "toi", "ton", "tous", "tout", "toute", "toutes", "tu", "un", "une", "va", "vers",
+ "voici", "voil�", "vos", "votre", "vous", "vu", "v�tre", "v�tres", "y", "�", "�a", "�s",
+ "�t�", "�tre", "�"
+ };
/// <summary>
/// File containing default French stopwords. </summary>
public const string DEFAULT_STOPWORD_FILE = "french_stop.txt";
/// <summary>
- /// Default set of articles for ElisionFilter </summary>
+ /// Default set of articles for <see cref="ElisionFilter"/> </summary>
public static readonly CharArraySet DEFAULT_ARTICLES = CharArraySet.UnmodifiableSet(new CharArraySet(
#pragma warning disable 612, 618
LuceneVersion.LUCENE_CURRENT,
@@ -118,7 +138,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Builds an analyzer with the default stop words (<see cref="#getDefaultStopSet"/>).
+ /// Builds an analyzer with the default stop words (<see cref="DefaultStopSet"/>).
/// </summary>
public FrenchAnalyzer(LuceneVersion matchVersion)
#pragma warning disable 612, 618
@@ -132,7 +152,7 @@ namespace Lucene.Net.Analysis.Fr
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// lucene compatibility version </param>
+ /// <see cref="LuceneVersion"/> lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
public FrenchAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords)
@@ -144,7 +164,7 @@ namespace Lucene.Net.Analysis.Fr
/// Builds an analyzer with the given stop words
/// </summary>
/// <param name="matchVersion">
- /// lucene compatibility version </param>
+ /// <see cref="LuceneVersion"/> lucene compatibility version </param>
/// <param name="stopwords">
/// a stopword set </param>
/// <param name="stemExclutionSet">
@@ -158,7 +178,7 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// Creates
/// <see cref="Analyzer.TokenStreamComponents"/>
- /// used to tokenize all the text in the provided <see cref="Reader"/>.
+ /// used to tokenize all the text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> <see cref="Analyzer.TokenStreamComponents"/>
/// built from a <see cref="StandardTokenizer"/> filtered with
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
index cd97757..0d30f9d 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilter.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Fr
/// words.
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para>
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilterFactory.cs
index 548489b..c56aeec 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemFilterFactory.cs
@@ -34,9 +34,8 @@ namespace Lucene.Net.Analysis.Fr
/// </summary>
public class FrenchLightStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new FrenchLightStemFilterFactory </summary>
+ /// Creates a new <see cref="FrenchLightStemFilterFactory"/> </summary>
public FrenchLightStemFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemmer.cs
index 865ac8d..e7e1b79 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchLightStemmer.cs
@@ -58,13 +58,12 @@ namespace Lucene.Net.Analysis.Fr
/// Light Stemmer for French.
/// <para>
/// This stemmer implements the "UniNE" algorithm in:
- /// <i>Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages</i>
+ /// <c>Light Stemming Approaches for the French, Portuguese, German and Hungarian Languages</c>
/// Jacques Savoy
/// </para>
/// </summary>
public class FrenchLightStemmer
{
-
public virtual int Stem(char[] s, int len)
{
if (len > 5 && s[len - 1] == 'x')
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
index 2cdf579..b71cfc1 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilter.cs
@@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Fr
/// words.
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.SetKeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para>
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilterFactory.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilterFactory.cs
index ef587d9..95694da 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilterFactory.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemFilterFactory.cs
@@ -33,9 +33,8 @@ namespace Lucene.Net.Analysis.Fr
/// </summary>
public class FrenchMinimalStemFilterFactory : TokenFilterFactory
{
-
/// <summary>
- /// Creates a new FrenchMinimalStemFilterFactory </summary>
+ /// Creates a new <see cref="FrenchMinimalStemFilterFactory"/> </summary>
public FrenchMinimalStemFilterFactory(IDictionary<string, string> args) : base(args)
{
if (args.Count > 0)
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemmer.cs
index 973d3c5..39701d3 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchMinimalStemmer.cs
@@ -56,7 +56,7 @@
/// Light Stemmer for French.
/// <para>
/// This stemmer implements the following algorithm:
- /// <i>A Stemming procedure and stopword list for general French corpora.</i>
+ /// <c>A Stemming procedure and stopword list for general French corpora.</c>
/// Jacques Savoy.
/// </para>
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
index f74b10a..b14365b 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemFilter.cs
@@ -28,17 +28,16 @@ namespace Lucene.Net.Analysis.Fr
/// </para>
/// <para>
/// To prevent terms from being stemmed use an instance of
- /// <see cref="KeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
+ /// <see cref="Miscellaneous.KeywordMarkerFilter"/> or a custom <see cref="TokenFilter"/> that sets
/// the <see cref="KeywordAttribute"/> before this <see cref="TokenStream"/>.
/// </para> </summary>
- /// <seealso cref= KeywordMarkerFilter </seealso>
- /// @deprecated (3.1) Use <see cref="SnowballFilter"/> with
- /// <see cref="org.tartarus.snowball.ext.FrenchStemmer"/> instead, which has the
+ /// <seealso cref="Miscellaneous.KeywordMarkerFilter"/>
+ /// @deprecated (3.1) Use <see cref="Snowball.SnowballFilter"/> with
+ /// <see cref="Tartarus.Snowball.Ext.FrenchStemmer"/> instead, which has the
/// same functionality. This filter will be removed in Lucene 5.0
[Obsolete("(3.1) Use SnowballFilter with FrenchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0")]
public sealed class FrenchStemFilter : TokenFilter
{
-
/// <summary>
/// The actual token in the input stream.
/// </summary>
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/3dfc567f/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemmer.cs
index ce3cc41..e67a7fb 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Fr/FrenchStemmer.cs
@@ -23,20 +23,19 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// A stemmer for French words.
- /// <para>
+ /// <para/>
/// The algorithm is based on the work of
- /// Dr Martin Porter on his snowball project<br>
- /// refer to http://snowball.sourceforge.net/french/stemmer.html<br>
+ /// Dr Martin Porter on his snowball project<para/>
+ /// refer to http://snowball.sourceforge.net/french/stemmer.html
/// (French stemming algorithm) for details
- /// </para> </summary>
- /// @deprecated Use <see cref="org.tartarus.snowball.ext.FrenchStemmer"/> instead,
- /// which has the same functionality. This filter will be removed in Lucene 4.0
+ /// </summary>
+ /// @deprecated Use <see cref="Tartarus.Snowball.Ext.FrenchStemmer"/> instead,
+ /// which has the same functionality. This filter will be removed in Lucene 4.0
[Obsolete("Use FrenchStemmer instead, which has the same functionality.")]
public class FrenchStemmer
{
private static readonly CultureInfo locale = new CultureInfo("fr-FR");
-
/// <summary>
/// Buffer for the terms while stemming them.
/// </summary>
@@ -87,10 +86,10 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
- /// Stems the given term to a unique <tt>discriminator</tt>.
+ /// Stems the given term to a unique <c>discriminator</c>.
/// </summary>
- /// <param name="term"> java.langString The term that should be stemmed </param>
- /// <returns> java.lang.String Discriminator for <tt>term</tt> </returns>
+ /// <param name="term"> The term that should be stemmed </param>
+ /// <returns> Discriminator for <paramref name="term"/> </returns>
protected internal virtual string Stem(string term)
{
if (!IsStemmable(term))
@@ -144,7 +143,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Sets the search region Strings<br>
+ /// Sets the search region strings
/// it needs to be done each time the buffer was modified
/// </summary>
private void SetStrings()
@@ -166,7 +165,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// First step of the Porter Algorithm<br>
+ /// First step of the Porter Algorithm<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
private void Step1()
@@ -227,12 +226,12 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Second step (A) of the Porter Algorithm<br>
+ /// Second step (A) of the Porter Algorithm<para/>
/// Will be performed if nothing changed from the first step
- /// or changed were done in the amment, emment, ments or ment suffixes<br>
+ /// or changed were done in the amment, emment, ments or ment suffixes<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
- /// <returns> boolean - true if something changed in the StringBuilder </returns>
+ /// <returns> true if something changed in the <see cref="StringBuilder"/> </returns>
private bool Step2a()
{
string[] search = new string[] { "�mes", "�tes", "iraIent", "irait", "irais", "irai", "iras", "ira", "irent", "iriez", "irez", "irions", "irons", "iront", "issaIent", "issais", "issantes", "issante", "issants", "issant", "issait", "issais", "issions", "issons", "issiez", "issez", "issent", "isses", "isse", "ir", "is", "�t", "it", "ies", "ie", "i" };
@@ -240,8 +239,8 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Second step (B) of the Porter Algorithm<br>
- /// Will be performed if step 2 A was performed unsuccessfully<br>
+ /// Second step (B) of the Porter Algorithm<para/>
+ /// Will be performed if step 2 A was performed unsuccessfully<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
private void Step2b()
@@ -256,7 +255,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Third step of the Porter Algorithm<br>
+ /// Third step of the Porter Algorithm<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
private void Step3()
@@ -278,7 +277,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Fourth step of the Porter Algorithm<br>
+ /// Fourth step of the Porter Algorithm<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
private void Step4()
@@ -308,7 +307,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Fifth step of the Porter Algorithm<br>
+ /// Fifth step of the Porter Algorithm<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
private void Step5()
@@ -324,7 +323,7 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Sixth (and last!) step of the Porter Algorithm<br>
+ /// Sixth (and last!) step of the Porter Algorithm<para/>
/// refer to http://snowball.sourceforge.net/french/stemmer.html for an explanation
/// </summary>
private void Step6()
@@ -371,11 +370,11 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// Delete a suffix searched in zone "source" if zone "from" contains prefix + search string
/// </summary>
- /// <param name="source"> java.lang.String - the primary source zone for search </param>
- /// <param name="search"> java.lang.String[] - the strings to search for suppression </param>
- /// <param name="from"> java.lang.String - the secondary source zone for search </param>
- /// <param name="prefix"> java.lang.String - the prefix to add to the search string to test </param>
- /// <returns> boolean - true if modified </returns>
+ /// <param name="source"> the primary source zone for search </param>
+ /// <param name="search"> the strings to search for suppression </param>
+ /// <param name="from"> the secondary source zone for search </param>
+ /// <param name="prefix"> the prefix to add to the search string to test </param>
+ /// <returns> true if modified </returns>
private bool DeleteFromIfPrecededIn(string source, string[] search, string from, string prefix)
{
bool found = false;
@@ -401,11 +400,11 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// Delete a suffix searched in zone "source" if the preceding letter is (or isn't) a vowel
/// </summary>
- /// <param name="source"> java.lang.String - the primary source zone for search </param>
- /// <param name="search"> java.lang.String[] - the strings to search for suppression </param>
- /// <param name="vowel"> boolean - true if we need a vowel before the search string </param>
- /// <param name="from"> java.lang.String - the secondary source zone for search (where vowel could be) </param>
- /// <returns> boolean - true if modified </returns>
+ /// <param name="source"> the primary source zone for search </param>
+ /// <param name="search"> the strings to search for suppression </param>
+ /// <param name="vowel"> true if we need a vowel before the search string </param>
+ /// <param name="from"> the secondary source zone for search (where vowel could be) </param>
+ /// <returns> true if modified </returns>
private bool DeleteFromIfTestVowelBeforeIn(string source, string[] search, bool vowel, string from)
{
bool found = false;
@@ -436,10 +435,10 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// Delete a suffix searched in zone "source" if preceded by the prefix
/// </summary>
- /// <param name="source"> java.lang.String - the primary source zone for search </param>
- /// <param name="search"> java.lang.String[] - the strings to search for suppression </param>
- /// <param name="prefix"> java.lang.String - the prefix to add to the search string to test </param>
- /// <param name="without"> boolean - true if it will be deleted even without prefix found </param>
+ /// <param name="source"> the primary source zone for search </param>
+ /// <param name="search"> the strings to search for suppression </param>
+ /// <param name="prefix"> the prefix to add to the search string to test </param>
+ /// <param name="without"> true if it will be deleted even without prefix found </param>
private void DeleteButSuffixFrom(string source, string[] search, string prefix, bool without)
{
if (source != null)
@@ -465,14 +464,14 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Delete a suffix searched in zone "source" if preceded by prefix<br>
- /// or replace it with the replace string if preceded by the prefix in the zone "from"<br>
+ /// Delete a suffix searched in zone "source" if preceded by prefix<para/>
+ /// or replace it with the replace string if preceded by the prefix in the zone "from"<para/>
/// or delete the suffix if specified
/// </summary>
- /// <param name="source"> java.lang.String - the primary source zone for search </param>
- /// <param name="search"> java.lang.String[] - the strings to search for suppression </param>
- /// <param name="prefix"> java.lang.String - the prefix to add to the search string to test </param>
- /// <param name="without"> boolean - true if it will be deleted even without prefix found </param>
+ /// <param name="source"> the primary source zone for search </param>
+ /// <param name="search"> the strings to search for suppression </param>
+ /// <param name="prefix"> the prefix to add to the search string to test </param>
+ /// <param name="without"> true if it will be deleted even without prefix found </param>
private void DeleteButSuffixFromElseReplace(string source, string[] search, string prefix, bool without, string from, string replace)
{
if (source != null)
@@ -507,9 +506,9 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// Replace a search string with another within the source zone
/// </summary>
- /// <param name="source"> java.lang.String - the source zone for search </param>
- /// <param name="search"> java.lang.String[] - the strings to search for replacement </param>
- /// <param name="replace"> java.lang.String - the replacement string </param>
+ /// <param name="source"> the source zone for search </param>
+ /// <param name="search"> the strings to search for replacement </param>
+ /// <param name="replace"> the replacement string </param>
private bool ReplaceFrom(string source, string[] search, string replace)
{
bool found = false;
@@ -556,7 +555,7 @@ namespace Lucene.Net.Analysis.Fr
/// Test if a char is a french vowel, including accentuated ones
/// </summary>
/// <param name="ch"> the char to test </param>
- /// <returns> boolean - true if the char is a vowel </returns>
+ /// <returns> true if the char is a vowel </returns>
private bool IsVowel(char ch)
{
switch (ch)
@@ -586,11 +585,11 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Retrieve the "R zone" (1 or 2 depending on the buffer) and return the corresponding string<br>
+ /// Retrieve the "R zone" (1 or 2 depending on the buffer) and return the corresponding string<para/>
/// "R is the region after the first non-vowel following a vowel
- /// or is the null region at the end of the word if there is no such non-vowel"<br> </summary>
- /// <param name="buffer"> java.lang.StringBuilder - the in buffer </param>
- /// <returns> java.lang.String - the resulting string </returns>
+ /// or is the null region at the end of the word if there is no such non-vowel" </summary>
+ /// <param name="buffer"> the in buffer </param>
+ /// <returns> the resulting string </returns>
private string RetrieveR(StringBuilder buffer)
{
int len = buffer.Length;
@@ -631,12 +630,12 @@ namespace Lucene.Net.Analysis.Fr
}
/// <summary>
- /// Retrieve the "RV zone" from a buffer an return the corresponding string<br>
+ /// Retrieve the "RV zone" from a buffer an return the corresponding string<para/>
/// "If the word begins with two vowels, RV is the region after the third letter,
/// otherwise the region after the first vowel not at the beginning of the word,
- /// or the end of the word if these positions cannot be found."<br> </summary>
- /// <param name="buffer"> java.lang.StringBuilder - the in buffer </param>
- /// <returns> java.lang.String - the resulting string </returns>
+ /// or the end of the word if these positions cannot be found." </summary>
+ /// <param name="buffer"> the in buffer </param>
+ /// <returns> the resulting string </returns>
private string RetrieveRV(StringBuilder buffer)
{
int len = buffer.Length;
@@ -660,7 +659,6 @@ namespace Lucene.Net.Analysis.Fr
if (pos + 1 < len)
{
return buffer.ToString(pos + 1, len - (pos + 1));
- //return StringHelperClass.SubstringSpecial(buffer, pos + 1, len);
}
else
{
@@ -677,12 +675,12 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
- /// Turns u and i preceded AND followed by a vowel to UpperCase<br>
- /// Turns y preceded OR followed by a vowel to UpperCase<br>
- /// Turns u preceded by q to UpperCase<br>
+ /// Turns u and i preceded AND followed by a vowel to UpperCase<para/>
+ /// Turns y preceded OR followed by a vowel to UpperCase<para/>
+ /// Turns u preceded by q to UpperCase
/// </summary>
- /// <param name="buffer"> java.util.StringBuilder - the buffer to treat </param>
- /// <returns> java.util.StringBuilder - the treated buffer </returns>
+ /// <param name="buffer"> the buffer to treat </param>
+ /// <returns> the treated buffer </returns>
private StringBuilder TreatVowels(StringBuilder buffer)
{
for (int c = 0; c < buffer.Length; c++)
@@ -746,7 +744,7 @@ namespace Lucene.Net.Analysis.Fr
/// <summary>
/// Checks a term if it can be processed correctly.
/// </summary>
- /// <returns> boolean - true if, and only if, the given term consists in letters. </returns>
+ /// <returns> true if, and only if, the given term consists in letters. </returns>
private bool IsStemmable(string term)
{
bool upper = false;