Lucene.Net.Analysis.Synonym 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/0f3d7fb6 Tree: http://git-wip-us.apache.org/repos/asf/lucenenet/tree/0f3d7fb6 Diff: http://git-wip-us.apache.org/repos/asf/lucenenet/diff/0f3d7fb6 Branch: refs/heads/api-work Commit: 0f3d7fb6f320dae5dbd0021eed9406ab1129890c Parents: b158f91 Author: Shad Storhaug <[email protected]> Authored: Sat Feb 4 14:02:10 2017 +0700 Committer: Shad Storhaug <[email protected]> Committed: Sat Feb 4 14:02:10 2017 +0700 ---------------------------------------------------------------------- .../Analysis/Synonym/FSTSynonymFilterFactory.cs | 6 +-- .../Analysis/Synonym/SlowSynonymFilter.cs | 16 +++--- .../Synonym/SlowSynonymFilterFactory.cs | 34 ++++++------- .../Analysis/Synonym/SlowSynonymMap.cs | 24 ++++----- .../Analysis/Synonym/SolrSynonymParser.cs | 51 +++++++++++--------- .../Analysis/Synonym/SynonymFilter.cs | 26 +++++----- .../Analysis/Synonym/SynonymFilterFactory.cs | 34 ++++++------- .../Analysis/Synonym/SynonymMap.cs | 15 +++--- .../Analysis/Synonym/WordnetSynonymParser.cs | 7 +-- 9 files changed, 103 insertions(+), 110 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs index 2b09a51..167e17c 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/FSTSynonymFilterFactory.cs @@ -3,9 +3,7 @@ using Lucene.Net.Analysis.Util; using Lucene.Net.Util; using System; using System.Collections.Generic; -using System.Globalization; using System.IO; -using System.Reflection; using System.Text; using System.Text.RegularExpressions; @@ -29,7 +27,7 @@ namespace Lucene.Net.Analysis.Synonym */ internal sealed class FSTSynonymFilterFactory : TokenFilterFactory, IResourceLoaderAware { - internal readonly bool ignoreCase; + private readonly bool ignoreCase; private readonly string tokenizerFactory; private readonly string synonyms; private readonly string format; @@ -38,7 +36,7 @@ namespace Lucene.Net.Analysis.Synonym private SynonymMap map; - [Obsolete(@"(3.4) use <see cref=""SynonymFilterFactory"" instead. this is only a backwards compatibility")] + [Obsolete(@"(3.4) use SynonymFilterFactory instead. this is only a backwards compatibility")] public FSTSynonymFilterFactory(IDictionary<string, string> args) : base(args) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilter.cs index b9b7eb0..ebdf488 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilter.cs @@ -1,7 +1,7 @@ -using System; -using System.Collections.Generic; -using Lucene.Net.Analysis.TokenAttributes; +using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Util; +using System; +using System.Collections.Generic; namespace Lucene.Net.Analysis.Synonym { @@ -23,7 +23,7 @@ namespace Lucene.Net.Analysis.Synonym */ /// <summary> - /// SynonymFilter handles multi-token synonyms with variable position increment offsets. + /// <see cref="SynonymFilter"/> handles multi-token synonyms with variable position increment offsets. /// <para> /// The matched tokens from the input stream may be optionally passed through (includeOrig=true) /// or discarded. If the original tokens are included, the position increments may be modified @@ -33,15 +33,15 @@ namespace Lucene.Net.Analysis.Synonym /// Generated synonyms will start at the same position as the first matched source token. /// </para> /// </summary> - /// @deprecated (3.4) use <see cref="SynonymFilterFactory"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0 - [Obsolete("(3.4) use <seealso cref=\"SynonymFilterFactory\"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")] + /// @deprecated (3.4) use SynonymFilterFactory instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0 + [Obsolete("(3.4) use SynonymFilterFactory instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")] internal sealed class SlowSynonymFilter : TokenFilter { - private readonly SlowSynonymMap map; // Map<String, SynonymMap> private IEnumerator<AttributeSource> replacement; // iterator over generated tokens - public SlowSynonymFilter(TokenStream @in, SlowSynonymMap map) : base(@in) + public SlowSynonymFilter(TokenStream @in, SlowSynonymMap map) + : base(@in) { if (map == null) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs index 7d51320..a089173 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymFilterFactory.cs @@ -1,14 +1,10 @@ -using System; -using System.Collections; +using Lucene.Net.Analysis.TokenAttributes; +using Lucene.Net.Analysis.Util; +using System; using System.Collections.Generic; -using System.Linq; using System.IO; using System.Text; using System.Text.RegularExpressions; -using Lucene.Net.Analysis.Util; -using Lucene.Net.Analysis.TokenAttributes; -using System.Reflection; -using System.Globalization; namespace Lucene.Net.Analysis.Synonym { @@ -30,17 +26,18 @@ namespace Lucene.Net.Analysis.Synonym */ /// <summary> - /// Factory for <see cref="SlowSynonymFilter"/> (only used with luceneMatchVersion < 3.4) - /// <pre class="prettyprint" > + /// Factory for <see cref="SlowSynonymFilter"/> (only used with luceneMatchVersion < 3.4) + /// <code> /// <fieldType name="text_synonym" class="solr.TextField" positionIncrementGap="100"> /// <analyzer> /// <tokenizer class="solr.WhitespaceTokenizerFactory"/> /// <filter class="solr.SynonymFilterFactory" synonyms="synonyms.txt" ignoreCase="false" /// expand="true" tokenizerFactory="solr.WhitespaceTokenizerFactory"/> /// </analyzer> - /// </fieldType></code> </summary> - /// @deprecated (3.4) use <see cref="SynonymFilterFactory"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0 - [Obsolete("(3.4) use <seealso cref=\"SynonymFilterFactory\"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")] + /// </fieldType></code> + /// </summary> + /// @deprecated (3.4) use SynonymFilterFactory instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0 + [Obsolete("(3.4) use SynonymFilterFactory instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")] internal sealed class SlowSynonymFilterFactory : TokenFilterFactory, IResourceLoaderAware { private readonly string synonyms; @@ -49,7 +46,8 @@ namespace Lucene.Net.Analysis.Synonym private readonly string tf; private readonly IDictionary<string, string> tokArgs = new Dictionary<string, string>(); - public SlowSynonymFilterFactory(IDictionary<string, string> args) : base(args) + public SlowSynonymFilterFactory(IDictionary<string, string> args) + : base(args) { synonyms = Require(args, "synonyms"); ignoreCase = GetBoolean(args, "ignoreCase", false); @@ -89,7 +87,7 @@ namespace Lucene.Net.Analysis.Synonym } /// <returns> a list of all rules </returns> - internal IEnumerable<string> LoadRules(string synonyms, IResourceLoader loader) + private IEnumerable<string> LoadRules(string synonyms, IResourceLoader loader) { List<string> wlist = null; if (File.Exists(synonyms)) @@ -303,12 +301,10 @@ namespace Lucene.Net.Analysis.Synonym /// <summary> /// Splits a backslash escaped string on the separator. - /// <para> + /// <para/> /// Current backslash escaping supported: - /// <br> \n \t \r \b \f are escaped the same as a Java String - /// <br> Other characters following a backslash are produced verbatim (\c => c) - /// - /// </para> + /// <para/> \n \t \r \b \f are escaped the same as a .NET string + /// <para/> Other characters following a backslash are produced verbatim (\c => c) /// </summary> /// <param name="s"> the string to split </param> /// <param name="separator"> the separator to split on </param> http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs index 178618c..7a6f259 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SlowSynonymMap.cs @@ -27,7 +27,8 @@ namespace Lucene.Net.Analysis.Synonym */ /// <summary> - /// Mapping rules for use with <see cref="SlowSynonymFilter"/> </summary> + /// Mapping rules for use with <see cref="SlowSynonymFilter"/> + /// </summary> /// @deprecated (3.4) use <see cref="SynonymFilterFactory"/> instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0 [Obsolete("(3.4) use SynonymFilterFactory instead. only for precise index backwards compatibility. this factory will be removed in Lucene 5.0")] internal class SlowSynonymMap @@ -40,6 +41,7 @@ namespace Lucene.Net.Analysis.Synonym set { submap = value; } } private CharArrayMap<SlowSynonymMap> submap; + /// <summary> /// @lucene.internal </summary> [WritableArray] @@ -58,6 +60,7 @@ namespace Lucene.Net.Analysis.Synonym public SlowSynonymMap() { } + public SlowSynonymMap(bool ignoreCase) { if (ignoreCase) @@ -70,9 +73,7 @@ namespace Lucene.Net.Analysis.Synonym { get { - { - return (flags & INCLUDE_ORIG) != 0; - } + return (flags & INCLUDE_ORIG) != 0; } } @@ -80,14 +81,12 @@ namespace Lucene.Net.Analysis.Synonym { get { - { - return (flags & IGNORE_CASE) != 0; - } + return (flags & IGNORE_CASE) != 0; } } - /// <param name="singleMatch"> List<String>, the sequence of strings to match </param> - /// <param name="replacement"> List<Token> the list of tokens to use on a match </param> + /// <param name="singleMatch"> <see cref="IList{String}"/>, the sequence of strings to match </param> + /// <param name="replacement"> <see cref="IList{Token}"/> the list of tokens to use on a match </param> /// <param name="includeOrig"> sets a flag on this mapping signaling the generation of matched tokens in addition to the replacement tokens </param> /// <param name="mergeExisting"> merge the replacement tokens with any other mappings that exist </param> public virtual void Add(IList<string> singleMatch, IList<Token> replacement, bool includeOrig, bool mergeExisting) @@ -125,7 +124,6 @@ namespace Lucene.Net.Analysis.Synonym } } - public override string ToString() { var sb = new StringBuilder("<"); @@ -151,10 +149,9 @@ namespace Lucene.Net.Analysis.Synonym return sb.ToString(); } - - /// <summary> - /// Produces a List<Token> from a List<String> </summary> + /// Produces a <see cref="IList{Token}"/> from a <see cref="IList{String}"/> + /// </summary> public static IList<Token> MakeTokens(IList<string> strings) { IList<Token> ret = new List<Token>(strings.Count); @@ -174,7 +171,6 @@ namespace Lucene.Net.Analysis.Synonym /// /// Example: [a b] merged with [c d] produces [a/b c/d] ('/' denotes tokens in the same position) /// Example: [a,5 b,2] merged with [c d,4 e,4] produces [c a,5/d b,2 e,2] (a,n means a has posInc=n) - /// /// </summary> public static IList<Token> MergeTokens(IList<Token> lst1, IList<Token> lst2) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SolrSynonymParser.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SolrSynonymParser.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SolrSynonymParser.cs index 94c9416..cd13921 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SolrSynonymParser.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SolrSynonymParser.cs @@ -25,36 +25,39 @@ namespace Lucene.Net.Analysis.Synonym /// <summary> /// Parser for the Solr synonyms format. - /// <ol> - /// <li> Blank lines and lines starting with '#' are comments. - /// <li> Explicit mappings match any token sequence on the LHS of "=>" - /// and replace with all alternatives on the RHS. These types of mappings - /// ignore the expand parameter in the constructor. - /// Example: - /// <blockquote>i-pod, i pod => ipod</blockquote> - /// <li> Equivalent synonyms may be separated with commas and give - /// no explicit mapping. In this case the mapping behavior will - /// be taken from the expand parameter in the constructor. This allows - /// the same synonym file to be used in different synonym handling strategies. - /// Example: - /// <blockquote>ipod, i-pod, i pod</blockquote> - /// - /// <li> Multiple synonym mapping entries are merged. - /// Example: - /// <blockquote> - /// foo => foo bar<br> - /// foo => baz<br><br> - /// is equivalent to<br><br> - /// foo => foo bar, baz - /// </blockquote> - /// </ol> + /// <list type="bullet"> + /// <item> Blank lines and lines starting with '#' are comments.</item> + /// <item> Explicit mappings match any token sequence on the LHS of "=>" + /// and replace with all alternatives on the RHS. These types of mappings + /// ignore the expand parameter in the constructor. + /// Example: + /// <code>i-pod, i pod => ipod</code> + /// </item> + /// <item> Equivalent synonyms may be separated with commas and give + /// no explicit mapping. In this case the mapping behavior will + /// be taken from the expand parameter in the constructor. This allows + /// the same synonym file to be used in different synonym handling strategies. + /// Example: + /// <code>ipod, i-pod, i pod</code> + /// </item> + /// <item> Multiple synonym mapping entries are merged. + /// Example: + /// <code> + /// foo => foo bar + /// foo => baz + /// is equivalent to + /// foo => foo bar, baz + /// </code> + /// </item> + /// </list> /// @lucene.experimental /// </summary> public class SolrSynonymParser : SynonymMap.Parser { private readonly bool expand; - public SolrSynonymParser(bool dedup, bool expand, Analyzer analyzer) : base(dedup, analyzer) + public SolrSynonymParser(bool dedup, bool expand, Analyzer analyzer) + : base(dedup, analyzer) { this.expand = expand; } http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs index 112c7fa..52bb61d 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilter.cs @@ -1,10 +1,10 @@ -using System; -using System.Diagnostics; -using Lucene.Net.Analysis.TokenAttributes; +using Lucene.Net.Analysis.TokenAttributes; using Lucene.Net.Store; using Lucene.Net.Support; using Lucene.Net.Util; using Lucene.Net.Util.Fst; +using System; +using System.Diagnostics; namespace Lucene.Net.Analysis.Synonym { @@ -36,14 +36,14 @@ namespace Lucene.Net.Analysis.Synonym /// starting the earliest and parsing the most tokens wins. /// For example if you have these rules: /// - /// <pre> + /// <code> /// a -> x /// a b -> y /// b c d -> z /// </code> /// - /// Then input <code>a b c d e</code> parses to <code>y b c - /// d</code>, ie the 2nd rule "wins" because it started + /// Then input <c>a b c d e</c> parses to <c>y b c + /// d</c>, ie the 2nd rule "wins" because it started /// earliest and matched the most input tokens of other rules /// starting at that point.</para> /// @@ -56,14 +56,14 @@ namespace Lucene.Net.Analysis.Synonym /// <para><b>NOTE</b>: when a match occurs, the output tokens /// associated with the matching rule are "stacked" on top of /// the input stream (if the rule had - /// <code>keepOrig=true</code>) and also on top of another + /// <c>keepOrig=true</c>) and also on top of another /// matched rule's output tokens. This is not a correct /// solution, as really the output should be an arbitrary /// graph/lattice. For example, with the above match, you - /// would expect an exact <code>PhraseQuery</code> <code>"y b - /// c"</code> to match the parsed tokens, but it will fail to + /// would expect an exact <see cref="Search.PhraseQuery"/> <c>"y b + /// c"</c> to match the parsed tokens, but it will fail to /// do so. This limitation is necessary because Lucene's - /// TokenStream (and index) cannot yet represent an arbitrary + /// <see cref="TokenStream"/> (and index) cannot yet represent an arbitrary /// graph.</para> /// /// <para><b>NOTE</b>: If multiple incoming tokens arrive on the @@ -95,7 +95,6 @@ namespace Lucene.Net.Analysis.Synonym public sealed class SynonymFilter : TokenFilter { - public const string TYPE_SYNONYM = "SYNONYM"; private readonly SynonymMap synonyms; @@ -265,10 +264,11 @@ namespace Lucene.Net.Analysis.Synonym /// <param name="input"> input tokenstream </param> /// <param name="synonyms"> synonym map </param> - /// <param name="ignoreCase"> case-folds input for matching with <see cref="Character#toLowerCase(int)"/>. + /// <param name="ignoreCase"> case-folds input for matching with <see cref="Character.ToLowerCase(int)"/>. /// Note, if you set this to true, its your responsibility to lowercase /// the input entries when you create the <see cref="SynonymMap"/> </param> - public SynonymFilter(TokenStream input, SynonymMap synonyms, bool ignoreCase) : base(input) + public SynonymFilter(TokenStream input, SynonymMap synonyms, bool ignoreCase) + : base(input) { termAtt = AddAttribute<ICharTermAttribute>(); posIncrAtt = AddAttribute<IPositionIncrementAttribute>(); http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilterFactory.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilterFactory.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilterFactory.cs index 4c05334..80699e6 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilterFactory.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymFilterFactory.cs @@ -1,7 +1,7 @@ -using System; -using System.Collections.Generic; -using Lucene.Net.Analysis.Util; +using Lucene.Net.Analysis.Util; using Lucene.Net.Util; +using System; +using System.Collections.Generic; namespace Lucene.Net.Analysis.Synonym { @@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Synonym /// <summary> /// Factory for <see cref="SynonymFilter"/>. - /// <pre class="prettyprint" > + /// <code> /// <fieldType name="text_synonym" class="solr.TextField" positionIncrementGap="100"> /// <analyzer> /// <tokenizer class="solr.WhitespaceTokenizerFactory"/> @@ -37,22 +37,22 @@ namespace Lucene.Net.Analysis.Synonym /// /// <para> /// An optional param name prefix of "tokenizerFactory." may be used for any - /// init params that the SynonymFilterFactory needs to pass to the specified - /// TokenizerFactory. If the TokenizerFactory expects an init parameters with - /// the same name as an init param used by the SynonymFilterFactory, the prefix + /// init params that the <see cref="SynonymFilterFactory"/> needs to pass to the specified + /// <see cref="TokenizerFactory"/>. If the <see cref="TokenizerFactory"/> expects an init parameters with + /// the same name as an init param used by the <see cref="SynonymFilterFactory"/>, the prefix /// is mandatory. /// </para> /// <para> - /// The optional {@code format} parameter controls how the synonyms will be parsed: - /// It supports the short names of {@code solr} for <see cref="SolrSynonymParser"/> - /// and {@code wordnet} for and <see cref="WordnetSynonymParser"/>, or your own - /// {@code SynonymMap.Parser} class name. The default is {@code solr}. + /// The optional <c>format</c> parameter controls how the synonyms will be parsed: + /// It supports the short names of <c>solr</c> for <see cref="SolrSynonymParser"/> + /// and <c>wordnet</c> for and <see cref="WordnetSynonymParser"/>, or your own + /// <see cref="SynonymMap.Parser"/> class name. The default is <c>solr</c>. /// A custom <see cref="SynonymMap.Parser"/> is expected to have a constructor taking: - /// <ul> - /// <li><code>boolean dedup</code> - true if duplicates should be ignored, false otherwise</li> - /// <li><code>boolean expand</code> - true if conflation groups should be expanded, false if they are one-directional</li> - /// <li><code><see cref="Analyzer"/> analyzer</code> - an analyzer used for each raw synonym</li> - /// </ul> + /// <list type="bullet"> + /// <item><c><see cref="bool"/> dedup</c> - true if duplicates should be ignored, false otherwise</item> + /// <item><c><see cref="bool"/> expand</c> - true if conflation groups should be expanded, false if they are one-directional</item> + /// <item><c><see cref="Analyzer"/> analyzer</c> - an analyzer used for each raw synonym</item> + /// </list> /// </para> /// </summary> public class SynonymFilterFactory : TokenFilterFactory, IResourceLoaderAware @@ -94,7 +94,7 @@ namespace Lucene.Net.Analysis.Synonym } /// <summary> - /// Access to the delegator TokenFilterFactory for test verification + /// Access to the delegator <see cref="TokenFilterFactory"/> for test verification /// </summary> /// @deprecated Method exists only for testing 4x, will be removed in 5.0 /// @lucene.internal http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs index ca9e038..1c37c85 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/SynonymMap.cs @@ -71,7 +71,7 @@ namespace Lucene.Net.Analysis.Synonym /// <summary> /// Builds an FSTSynonymMap. /// <para> - /// Call add() until you have added all the mappings, then call build() to get an FSTSynonymMap + /// Call <see cref="Add(CharsRef, CharsRef, bool)"/> until you have added all the mappings, then call <see cref="Build"/> to get an FSTSynonymMap /// @lucene.experimental /// </para> /// </summary> @@ -100,9 +100,9 @@ namespace Lucene.Net.Analysis.Synonym } /// <summary> - /// Sugar: just joins the provided terms with {@link - /// SynonymMap#WORD_SEPARATOR}. reuse and its chars - /// must not be null. + /// Sugar: just joins the provided terms with + /// <see cref="SynonymMap.WORD_SEPARATOR"/>. reuse and its chars + /// must not be null. /// </summary> public static CharsRef Join(string[] words, CharsRef reuse) { @@ -339,8 +339,7 @@ namespace Lucene.Net.Analysis.Synonym /// </summary> public abstract class Parser : Builder { - - internal readonly Analyzer analyzer; + private readonly Analyzer analyzer; public Parser(bool dedup, Analyzer analyzer) : base(dedup) @@ -355,8 +354,8 @@ namespace Lucene.Net.Analysis.Synonym /// <summary> /// Sugar: analyzes the text with the analyzer and - /// separates by <see cref="SynonymMap#WORD_SEPARATOR"/>. - /// reuse and its chars must not be null. + /// separates by <see cref="SynonymMap.WORD_SEPARATOR"/>. + /// reuse and its chars must not be null. /// </summary> public virtual CharsRef Analyze(string text, CharsRef reuse) { http://git-wip-us.apache.org/repos/asf/lucenenet/blob/0f3d7fb6/src/Lucene.Net.Analysis.Common/Analysis/Synonym/WordnetSynonymParser.cs ---------------------------------------------------------------------- diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/WordnetSynonymParser.cs b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/WordnetSynonymParser.cs index 53677b0..604cbb8 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Synonym/WordnetSynonymParser.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Synonym/WordnetSynonymParser.cs @@ -1,6 +1,6 @@ -using System; +using Lucene.Net.Util; +using System; using System.IO; -using Lucene.Net.Util; namespace Lucene.Net.Analysis.Synonym { @@ -33,7 +33,8 @@ namespace Lucene.Net.Analysis.Synonym { private readonly bool expand; - public WordnetSynonymParser(bool dedup, bool expand, Analyzer analyzer) : base(dedup, analyzer) + public WordnetSynonymParser(bool dedup, bool expand, Analyzer analyzer) + : base(dedup, analyzer) { this.expand = expand; }
