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 17:51:15 UTC
[09/11] lucenenet git commit: Lucene.Net.Analysis.Nl refactor: member
accessibility and documentation comments
Lucene.Net.Analysis.Nl 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/31585cfd
Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/31585cfd
Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/31585cfd
Branch: refs/heads/api-work
Commit: 31585cfd562b1a270b2f5d1ea1e4bf7a4c3adb33
Parents: 269da1e
Author: Shad Storhaug <sh...@shadstorhaug.com>
Authored: Sat Feb 4 00:16:07 2017 +0700
Committer: Shad Storhaug <sh...@shadstorhaug.com>
Committed: Sat Feb 4 00:16:07 2017 +0700
----------------------------------------------------------------------
.../Analysis/Nl/DutchAnalyzer.cs | 29 +++++++++-----------
.../Analysis/Nl/DutchStemFilter.cs | 20 ++++++++------
.../Analysis/Nl/DutchStemmer.cs | 14 +++++-----
3 files changed, 31 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/31585cfd/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
index d38d922..153de62 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchAnalyzer.cs
@@ -38,19 +38,18 @@ namespace Lucene.Net.Analysis.Nl
/// exclusion list is empty by default.
/// </para>
///
- /// <a name="version"/>
/// <para>You must specify the required <see cref="LuceneVersion"/>
- /// compatibility when creating DutchAnalyzer:
- /// <ul>
- /// <li> As of 3.6, <see cref="#DutchAnalyzer(Version, CharArraySet)"/> and
- /// <see cref="#DutchAnalyzer(Version, CharArraySet, CharArraySet)"/> also populate
- /// the default entries for the stem override dictionary
- /// <li> As of 3.1, Snowball stemming is done with SnowballFilter,
+ /// compatibility when creating <see cref="DutchAnalyzer"/>:
+ /// <list type="bullet">
+ /// <item> As of 3.6, <see cref="DutchAnalyzer(LuceneVersion, CharArraySet)"/> and
+ /// <see cref="DutchAnalyzer(LuceneVersion, CharArraySet, CharArraySet)"/> also populate
+ /// the default entries for the stem override dictionary</item>
+ /// <item> As of 3.1, Snowball stemming is done with SnowballFilter,
/// LowerCaseFilter is used prior to StopFilter, and Snowball
- /// stopwords are used by default.
- /// <li> As of 2.9, StopFilter preserves position
- /// increments
- /// </ul>
+ /// stopwords are used by default.</item>
+ /// <item> As of 2.9, StopFilter preserves position
+ /// increments</item>
+ /// </list>
///
/// </para>
/// <para><b>NOTE</b>: This class uses the same <see cref="LuceneVersion"/>
@@ -58,7 +57,6 @@ namespace Lucene.Net.Analysis.Nl
/// </summary>
public sealed class DutchAnalyzer : Analyzer
{
-
/// <summary>
/// File containing default Dutch stopwords. </summary>
public const string DEFAULT_STOPWORD_FILE = "dutch_stop.txt";
@@ -107,7 +105,7 @@ namespace Lucene.Net.Analysis.Nl
/// <summary>
- /// Contains the stopwords used with the StopFilter.
+ /// Contains the stopwords used with the <see cref="StopFilter"/>.
/// </summary>
private readonly CharArraySet stoptable;
@@ -123,9 +121,8 @@ namespace Lucene.Net.Analysis.Nl
private readonly LuceneVersion matchVersion;
/// <summary>
- /// Builds an analyzer with the default stop words (<see cref="#getDefaultStopSet()"/>)
+ /// Builds an analyzer with the default stop words (<see cref="DefaultStopSet"/>)
/// and a few default entries for the stem exclusion table.
- ///
/// </summary>
public DutchAnalyzer(LuceneVersion matchVersion)
: this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET, CharArraySet.EMPTY_SET, DefaultSetHolder.DEFAULT_STEM_DICT)
@@ -193,7 +190,7 @@ namespace Lucene.Net.Analysis.Nl
/// <summary>
/// Returns a (possibly reused) <see cref="TokenStream"/> which tokenizes all the
- /// text in the provided <see cref="Reader"/>.
+ /// text in the provided <see cref="TextReader"/>.
/// </summary>
/// <returns> A <see cref="TokenStream"/> built from a <see cref="StandardTokenizer"/>
/// filtered with <see cref="StandardFilter"/>, <see cref="LowerCaseFilter"/>,
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/31585cfd/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
index ba3d181..9c280bf 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemFilter.cs
@@ -31,14 +31,15 @@ namespace Lucene.Net.Analysis.Nl
/// </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.DutchStemmer"/> instead, which has the
+ /// </para>
+ /// </summary>
+ /// <seealso cref="Miscellaneous.KeywordMarkerFilter"/>
+ /// @deprecated (3.1) Use <see cref="Snowball.SnowballFilter"/> with
+ /// <see cref="Tartarus.Snowball.Ext.DutchStemmer"/> instead, which has the
/// same functionality. This filter will be removed in Lucene 5.0
- [Obsolete("(3.1) Use SnowballFilter with DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0")]
+ [Obsolete("(3.1) Use Snowball.SnowballFilter with Tartarus.Snowball.Ext.DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0")]
public sealed class DutchStemFilter : TokenFilter
{
/// <summary>
@@ -49,15 +50,16 @@ namespace Lucene.Net.Analysis.Nl
private readonly ICharTermAttribute termAtt;
private readonly IKeywordAttribute keywordAttr;
- public DutchStemFilter(TokenStream _in)
- : base(_in)
+ public DutchStemFilter(TokenStream @in)
+ : base(@in)
{
termAtt = AddAttribute<ICharTermAttribute>();
keywordAttr = AddAttribute<IKeywordAttribute>();
}
/// <param name="stemdictionary"> Dictionary of word stem pairs, that overrule the algorithm </param>
- public DutchStemFilter(TokenStream _in, IDictionary<string, string> stemdictionary) : this(_in)
+ public DutchStemFilter(TokenStream @in, IDictionary<string, string> stemdictionary)
+ : this(@in)
{
stemmer.StemDictionary = stemdictionary;
}
http://git-wip-us.apache.org/repos/asf/lucenenet/blob/31585cfd/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemmer.cs
----------------------------------------------------------------------
diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemmer.cs
index 036b761..43ef3fc 100644
--- a/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemmer.cs
+++ b/src/Lucene.Net.Analysis.Common/Analysis/Nl/DutchStemmer.cs
@@ -29,7 +29,7 @@ namespace Lucene.Net.Analysis.Nl
/// the <a href="http://snowball.tartarus.org/algorithms/dutch/stemmer.html">dutch stemming</a>
/// algorithm in Martin Porter's snowball project.
/// </para> </summary>
- /// @deprecated (3.1) Use <see cref="org.tartarus.snowball.ext.DutchStemmer"/> instead,
+ /// @deprecated (3.1) Use <see cref="Tartarus.Snowball.Ext.DutchStemmer"/> instead,
/// which has the same functionality. This filter will be removed in Lucene 5.0
[Obsolete("(3.1) Use Tartarus.Snowball.Ext.DutchStemmer instead, which has the same functionality. This filter will be removed in Lucene 5.0")]
public class DutchStemmer
@@ -47,12 +47,12 @@ namespace Lucene.Net.Analysis.Nl
private int _R2;
//TODO convert to internal
- /*
- * Stems the given term to an unique <tt>discriminator</tt>.
- *
- * @param term The term that should be stemmed.
- * @return Discriminator for <tt>term</tt>
- */
+
+ /// <summary>
+ /// Stems the given term to an unique <c>discriminator</c>.
+ /// </summary>
+ /// <param name="term">The term that should be stemmed.</param>
+ /// <returns>Discriminator for <paramref name="term"/></returns>
public virtual string Stem(string term)
{
term = locale.TextInfo.ToLower(term);