Repository: lucenenet Updated Branches: refs/heads/api-work 917b4fdf5 -> 816f0c9b4
Lucene.Net.Analysis.Ckb 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/09865451 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/09865451 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/09865451 Branch: refs/heads/api-work Commit: 0986545155feac6675813f1bf4a1671dfa087115 Parents: 917b4fd Author: Shad Storhaug <[email protected]> Authored: Thu Feb 2 23:09:13 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Thu Feb 2 23:09:13 2017 +0700 ---------------------------------------------------------------------- .../Analysis/Ckb/SoraniAnalyzer.cs | 27 ++++++++++---------- .../Analysis/Ckb/SoraniNormalizationFilter.cs | 4 +-- .../Ckb/SoraniNormalizationFilterFactory.cs | 10 ++++---- .../Analysis/Ckb/SoraniNormalizer.cs | 22 ++++++++-------- .../Analysis/Ckb/SoraniStemFilter.cs | 13 +++++----- .../Analysis/Ckb/SoraniStemFilterFactory.cs | 12 ++++----- .../Analysis/Ckb/SoraniStemmer.cs | 1 - 7 files changed, 44 insertions(+), 45 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs index 800b6ad..7f7bfa8 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniAnalyzer.cs @@ -27,7 +27,7 @@ namespace Lucene.Net.Analysis.Ckb */ /// <summary> - /// <seealso cref="Analyzer"/> for Sorani Kurdish. + /// <see cref="Analyzer"/> for Sorani Kurdish. /// </summary> public sealed class SoraniAnalyzer : StopwordAnalyzerBase { @@ -49,7 +49,7 @@ namespace Lucene.Net.Analysis.Ckb } /// <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.Ckb } /// <summary> - /// Builds an analyzer with the default stop words: <seealso cref="#DEFAULT_STOPWORD_FILE"/>. + /// Builds an analyzer with the default stop words: <see cref="DEFAULT_STOPWORD_FILE"/>. /// </summary> public SoraniAnalyzer(LuceneVersion matchVersion) : this(matchVersion, DefaultSetHolder.DEFAULT_STOP_SET) @@ -96,29 +96,30 @@ namespace Lucene.Net.Analysis.Ckb /// <summary> /// Builds an analyzer with the given stop words. If a non-empty stem exclusion set is - /// provided this analyzer will add a <seealso cref="SetKeywordMarkerFilter"/> before + /// 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 SoraniAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet) : base(matchVersion, stopwords) + public SoraniAnalyzer(LuceneVersion matchVersion, CharArraySet stopwords, CharArraySet stemExclusionSet) + : base(matchVersion, stopwords) { this.stemExclusionSet = CharArraySet.UnmodifiableSet(CharArraySet.Copy(matchVersion, stemExclusionSet)); } /// <summary> /// Creates a - /// <seealso cref="org.apache.lucene.analysis.Analyzer.TokenStreamComponents"/> - /// which tokenizes all the text in the provided <seealso cref="Reader"/>. + /// <see cref="Analyzer.TokenStreamComponents"/> + /// which tokenizes all the text in the provided <see cref="TextReader"/>. /// </summary> /// <returns> A - /// <seealso cref="org.apache.lucene.analysis.Analyzer.TokenStreamComponents"/> - /// built from an <seealso cref="StandardTokenizer"/> filtered with - /// <seealso cref="StandardFilter"/>, <seealso cref="SoraniNormalizationFilter"/>, - /// <seealso cref="LowerCaseFilter"/>, <seealso cref="StopFilter"/> - /// , <seealso cref="SetKeywordMarkerFilter"/> if a stem exclusion set is - /// provided and <seealso cref="SoraniStemFilter"/>. </returns> + /// <see cref="Analyzer.TokenStreamComponents"/> + /// built from an <see cref="StandardTokenizer"/> filtered with + /// <see cref="StandardFilter"/>, <see cref="SoraniNormalizationFilter"/>, + /// <see cref="LowerCaseFilter"/>, <see cref="StopFilter"/>, + /// <see cref="SetKeywordMarkerFilter"/> if a stem exclusion set is + /// provided and <see cref="SoraniStemFilter"/>. </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/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilter.cs index dedf0e7..3a29c33 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilter.cs @@ -20,7 +20,7 @@ namespace Lucene.Net.Analysis.Ckb */ /// <summary> - /// A <seealso cref="TokenFilter"/> that applies <seealso cref="SoraniNormalizer"/> to normalize the + /// A <see cref="TokenFilter"/> that applies <see cref="SoraniNormalizer"/> to normalize the /// orthography. /// </summary> public sealed class SoraniNormalizationFilter : TokenFilter @@ -38,7 +38,7 @@ namespace Lucene.Net.Analysis.Ckb { if (m_input.IncrementToken()) { - int newlen = normalizer.normalize(termAtt.Buffer, termAtt.Length); + int newlen = normalizer.Normalize(termAtt.Buffer, termAtt.Length); termAtt.Length = newlen; return true; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilterFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilterFactory.cs index ed34761..e606069 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilterFactory.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizationFilterFactory.cs @@ -21,20 +21,20 @@ namespace Lucene.Net.Analysis.Ckb */ /// <summary> - /// Factory for <seealso cref="SoraniNormalizationFilter"/>. - /// <pre class="prettyprint"> + /// Factory for <see cref="SoraniNormalizationFilter"/>. + /// <code> /// <fieldType name="text_ckbnormal" class="solr.TextField" positionIncrementGap="100"> /// <analyzer> /// <tokenizer class="solr.StandardTokenizerFactory"/> /// <filter class="solr.SoraniNormalizationFilterFactory"/> /// </analyzer> - /// </fieldType></pre> + /// </fieldType> + /// </code> /// </summary> public class SoraniNormalizationFilterFactory : TokenFilterFactory, IMultiTermAwareComponent { - /// <summary> - /// Creates a new SoraniNormalizationFilterFactory </summary> + /// Creates a new <see cref="SoraniNormalizationFilterFactory"/> </summary> public SoraniNormalizationFilterFactory(IDictionary<string, string> args) : base(args) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizer.cs index 5a3d708..19135d9 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniNormalizer.cs @@ -23,21 +23,19 @@ namespace Lucene.Net.Analysis.Ckb /// <summary> /// Normalizes the Unicode representation of Sorani text. - /// <para> + /// <para/> /// Normalization consists of: - /// <ul> - /// <li>Alternate forms of 'y' (0064, 0649) are converted to 06CC (FARSI YEH) - /// <li>Alternate form of 'k' (0643) is converted to 06A9 (KEHEH) - /// <li>Alternate forms of vowel 'e' (0647+200C, word-final 0647, 0629) are converted to 06D5 (AE) - /// <li>Alternate (joining) form of 'h' (06BE) is converted to 0647 - /// <li>Alternate forms of 'rr' (0692, word-initial 0631) are converted to 0695 (REH WITH SMALL V BELOW) - /// <li>Harakat, tatweel, and formatting characters such as directional controls are removed. - /// </ul> - /// </para> + /// <list type="bullet"> + /// <item>Alternate forms of 'y' (0064, 0649) are converted to 06CC (FARSI YEH)</item> + /// <item>Alternate form of 'k' (0643) is converted to 06A9 (KEHEH)</item> + /// <item>Alternate forms of vowel 'e' (0647+200C, word-final 0647, 0629) are converted to 06D5 (AE)</item> + /// <item>Alternate (joining) form of 'h' (06BE) is converted to 0647</item> + /// <item>Alternate forms of 'rr' (0692, word-initial 0631) are converted to 0695 (REH WITH SMALL V BELOW)</item> + /// <item>Harakat, tatweel, and formatting characters such as directional controls are removed.</item> + /// </list> /// </summary> public class SoraniNormalizer { - internal const char YEH = '\u064A'; internal const char DOTLESS_YEH = '\u0649'; internal const char FARSI_YEH = '\u06CC'; @@ -71,7 +69,7 @@ namespace Lucene.Net.Analysis.Ckb /// <param name="s"> input buffer </param> /// <param name="len"> length of input buffer </param> /// <returns> length of input buffer after normalization </returns> - public virtual int normalize(char[] s, int len) + public virtual int Normalize(char[] s, int len) { for (int i = 0; i < len; i++) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs index 72c5841..13a26f2 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilter.cs @@ -20,13 +20,14 @@ namespace Lucene.Net.Analysis.Ckb */ /// <summary> - /// A <seealso cref="TokenFilter"/> that applies <seealso cref="SoraniStemmer"/> to stem Sorani words. + /// A <see cref="TokenFilter"/> that applies <see cref="SoraniStemmer"/> to stem Sorani words. /// <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 SoraniStemFilter : TokenFilter { private readonly SoraniStemmer stemmer = new SoraniStemmer(); @@ -34,7 +35,7 @@ namespace Lucene.Net.Analysis.Ckb private readonly IKeywordAttribute keywordAttr; public SoraniStemFilter(TokenStream input) - : base(input) + : base(input) { termAtt = AddAttribute<ICharTermAttribute>(); keywordAttr = AddAttribute<IKeywordAttribute>(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilterFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilterFactory.cs index 31329b8..6d9e002 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilterFactory.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemFilterFactory.cs @@ -21,23 +21,23 @@ namespace Lucene.Net.Analysis.Ckb */ /// <summary> - /// Factory for <seealso cref="SoraniStemFilter"/>. - /// <pre class="prettyprint"> + /// Factory for <see cref="SoraniStemFilter"/>. + /// <code> /// <fieldType name="text_ckbstem" class="solr.TextField" positionIncrementGap="100"> /// <analyzer> /// <tokenizer class="solr.StandardTokenizerFactory"/> /// <filter class="solr.SoraniNormalizationFilterFactory"/> /// <filter class="solr.SoraniStemFilterFactory"/> /// </analyzer> - /// </fieldType></pre> + /// </fieldType> + /// </code> /// </summary> public class SoraniStemFilterFactory : TokenFilterFactory { - /// <summary> - /// Creates a new SoraniStemFilterFactory </summary> + /// Creates a new <see cref="SoraniStemFilterFactory"/> </summary> public SoraniStemFilterFactory(IDictionary<string, string> args) - : base(args) + : base(args) { if (args.Count > 0) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/09865451/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemmer.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemmer.cs b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemmer.cs index b978be9..c375b24 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemmer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Ckb/SoraniStemmer.cs @@ -24,7 +24,6 @@ namespace Lucene.Net.Analysis.Ckb /// </summary> public class SoraniStemmer { - /// <summary> /// Stem an input buffer of Sorani text. /// </summary>
