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 <[email protected]> Authored: Fri Feb 3 14:43:01 2017 +0700 Committer: Shad Storhaug <[email protected]> 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; }
