Lucene.Net.Analysis.Br 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/83902e97 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/83902e97 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/83902e97 Branch: refs/heads/api-work Commit: 83902e979cec023948dcef9dba21b0c02924d171 Parents: 1b0bca6 Author: Shad Storhaug <[email protected]> Authored: Thu Feb 2 20:30:21 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Feb 2 20:30:21 2017 +0700 ---------------------------------------------------------------------- .../Analysis/Br/BrazilianAnalyzer.cs | 20 +++++++++---------- .../Analysis/Br/BrazilianStemFilter.cs | 18 ++++++++--------- .../Analysis/Br/BrazilianStemFilterFactory.cs | 9 +++++---- .../Analysis/Br/BrazilianStemmer.cs | 21 +++++++++----------- 4 files changed, 33 insertions(+), 35 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/83902e97/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs index 12109b6..b6bd791 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianAnalyzer.cs @@ -27,15 +27,15 @@ namespace Lucene.Net.Analysis.Br */ /// <summary> - /// <seealso cref="Analyzer"/> for Brazilian Portuguese language. + /// <see cref="Analyzer"/> for Brazilian Portuguese language. /// <para> /// Supports an external list of stopwords (words that /// will not be indexed at all) and an external list of exclusions (words that will /// not be stemmed, but indexed). /// </para> /// - /// <para><b>NOTE</b>: This class uses the same <seealso cref="Version"/> - /// dependent settings as <seealso cref="StandardAnalyzer"/>.</para> + /// <para><b>NOTE</b>: This class uses the same <see cref="LuceneVersion"/> + /// dependent settings as <see cref="StandardAnalyzer"/>.</para> /// </summary> public sealed class BrazilianAnalyzer : StopwordAnalyzerBase { @@ -86,7 +86,7 @@ namespace Lucene.Net.Analysis.Br private CharArraySet excltable = CharArraySet.EMPTY_SET; /// <summary> - /// Builds an analyzer with the default stop words (<seealso cref="#getDefaultStopSet()"/>). + /// Builds an analyzer with the default stop words (<see cref="DefaultStopSet"/>). /// </summary> public BrazilianAnalyzer(LuceneVersion matchVersion) : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET) @@ -120,13 +120,13 @@ namespace Lucene.Net.Analysis.Br /// <summary> /// Creates - /// <seealso cref="org.apache.lucene.analysis.Analyzer.TokenStreamComponents"/> - /// used to tokenize all the text in the provided <seealso cref="Reader"/>. + /// <see cref="Analyzer.TokenStreamComponents"/> + /// used to tokenize all the text in the provided <see cref="TextReader"/>. /// </summary> - /// <returns> <seealso cref="org.apache.lucene.analysis.Analyzer.TokenStreamComponents"/> - /// built from a <seealso cref="StandardTokenizer"/> filtered with - /// <seealso cref="LowerCaseFilter"/>, <seealso cref="StandardFilter"/>, <seealso cref="StopFilter"/> - /// , and <seealso cref="BrazilianStemFilter"/>. </returns> + /// <returns> <see cref="Analyzer.TokenStreamComponents"/> + /// built from a <see cref="StandardTokenizer"/> filtered with + /// <see cref="LowerCaseFilter"/>, <see cref="StandardFilter"/>, <see cref="StopFilter"/>, + /// and <see cref="BrazilianStemFilter"/>. </returns> protected override TokenStreamComponents CreateComponents(string fieldName, TextReader reader) { Tokenizer source = new StandardTokenizer(m_matchVersion, reader); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/83902e97/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs index 69580e4..0b94e4c 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilter.cs @@ -21,19 +21,19 @@ namespace Lucene.Net.Analysis.Br */ /// <summary> - /// A <seealso cref="TokenFilter"/> that applies <seealso cref="BrazilianStemmer"/>. + /// A <see cref="TokenFilter"/> that applies <see cref="BrazilianStemmer"/>. /// <para> /// To prevent terms from being stemmed use an instance of - /// <seealso cref="SetKeywordMarkerFilter"/> or a custom <seealso cref="TokenFilter"/> that sets - /// the <seealso cref="KeywordAttribute"/> before this <seealso cref="TokenStream"/>. - /// </para> </summary> - /// <seealso cref= SetKeywordMarkerFilter - /// </seealso> + /// <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="Miscellaneous.SetKeywordMarkerFilter"/> public sealed class BrazilianStemFilter : TokenFilter { /// <summary> - /// <seealso cref="BrazilianStemmer"/> in use by this filter. + /// <see cref="BrazilianStemmer"/> in use by this filter. /// </summary> private BrazilianStemmer stemmer = new BrazilianStemmer(); private HashSet<string> exclusions = null; // LUCENENET TODO: This is odd. No way to set it at all, so it cannot possibly have any values. @@ -41,9 +41,9 @@ namespace Lucene.Net.Analysis.Br private readonly IKeywordAttribute keywordAttr; /// <summary> - /// Creates a new BrazilianStemFilter + /// Creates a new <see cref="BrazilianStemFilter"/> /// </summary> - /// <param name="in"> the source <seealso cref="TokenStream"/> </param> + /// <param name="in"> the source <see cref="TokenStream"/> </param> public BrazilianStemFilter(TokenStream @in) : base(@in) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/83902e97/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilterFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilterFactory.cs index 332ea42..0be7f71 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilterFactory.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemFilterFactory.cs @@ -21,21 +21,22 @@ namespace Lucene.Net.Analysis.Br */ /// <summary> - /// Factory for <seealso cref="BrazilianStemFilter"/>. - /// <pre class="prettyprint"> + /// Factory for <see cref="BrazilianStemFilter"/>. + /// <code> /// <fieldType name="text_brstem" class="solr.TextField" positionIncrementGap="100"> /// <analyzer> /// <tokenizer class="solr.StandardTokenizerFactory"/> /// <filter class="solr.LowerCaseFilterFactory"/> /// <filter class="solr.BrazilianStemFilterFactory"/> /// </analyzer> - /// </fieldType></pre> + /// </fieldType> + /// </code> /// </summary> public class BrazilianStemFilterFactory : TokenFilterFactory { /// <summary> - /// Creates a new BrazilianStemFilterFactory </summary> + /// Creates a new <see cref="BrazilianStemFilterFactory"/> </summary> public BrazilianStemFilterFactory(IDictionary<string, string> args) : base(args) { if (args.Count > 0) http://git-wip-us.apache.org/repos/asf/lucenenet/blob/83902e97/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemmer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemmer.cs index b08f0dd..3d35ee5 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemmer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Br/BrazilianStemmer.cs @@ -41,10 +41,10 @@ namespace Lucene.Net.Analysis.Br } /// <summary> - /// Stems the given term to an unique <tt>discriminator</tt>. + /// Stems the given term to an unique <c>discriminator</c>. /// </summary> /// <param name="term"> The term that should be stemmed. </param> - /// <returns> Discriminator for <tt>term</tt> </returns> + /// <returns>Discriminator for <paramref name="term"/></returns> protected internal virtual string Stem(string term) { bool altered = false; // altered the term @@ -106,7 +106,7 @@ namespace Lucene.Net.Analysis.Br /// <summary> /// Checks a term if it can be processed indexed. /// </summary> - /// <returns> true if it can be indexed </returns> + /// <returns> true if it can be indexed </returns> private bool IsIndexable(string term) { return (term.Length < 30) && (term.Length > 2); @@ -335,9 +335,9 @@ namespace Lucene.Net.Analysis.Br } /// <summary> - /// Replace a string suffix by another + /// Replace a <see cref="string"/> suffix by another /// </summary> - /// <returns> the replaced String </returns> + /// <returns> the replaced <see cref="string"/> </returns> private string ReplaceSuffix(string value, string toReplace, string changeTo) { string vvalue; @@ -361,9 +361,9 @@ namespace Lucene.Net.Analysis.Br } /// <summary> - /// Remove a string suffix + /// Remove a <see cref="string"/> suffix /// </summary> - /// <returns> the String without the suffix </returns> + /// <returns> the <see cref="string"/> without the suffix </returns> private string RemoveSuffix(string value, string toRemove) { // be-safe !!! @@ -376,7 +376,7 @@ namespace Lucene.Net.Analysis.Br } /// <summary> - /// See if a suffix is preceded by a String + /// See if a suffix is preceded by a <see cref="string"/> /// </summary> /// <returns> true if the suffix is preceded </returns> private bool SuffixPreceded(string value, string suffix, string preceded) @@ -1292,7 +1292,6 @@ namespace Lucene.Net.Analysis.Br /// <summary> /// Delete suffix 'i' if in RV and preceded by 'c' - /// /// </summary> private void Step3() { @@ -1313,7 +1312,6 @@ namespace Lucene.Net.Analysis.Br /// /// If the word ends with one of the suffixes (os a i o á à ó) /// in RV, delete it - /// /// </summary> private void Step4() { @@ -1351,7 +1349,6 @@ namespace Lucene.Net.Analysis.Br /// delete the 'u' (or 'i') /// /// Or if the word ends ç remove the cedilha - /// /// </summary> private void Step5() { @@ -1384,7 +1381,7 @@ namespace Lucene.Net.Analysis.Br /// <summary> /// For log and debug purpose /// </summary> - /// <returns> TERM, CT, RV, R1 and R2 </returns> + /// <returns> TERM, CT, RV, R1 and R2 </returns> public virtual string Log() { return " (TERM = " + TERM + ")" + " (CT = " + CT + ")" + " (RV = " + RV + ")" + " (R1 = " + R1 + ")" + " (R2 = " + R2 + ")";
