From 4eea6cd79d5919d52672fe53e8ceae50bdfdda9b Mon Sep 17 00:00:00 2001 From: John Bampton Date: Sun, 19 Apr 2026 14:53:28 +1000 Subject: [PATCH] misc: fix typos General spelling clean up --- .github/linters/codespell.txt | 11 ----------- azure-pipelines.yml | 2 +- .../Analysis/In/IndicNormalizer.cs | 2 +- .../Dict/BinaryDictionary.cs | 2 +- src/Lucene.Net.Analysis.OpenNLP/overview.md | 2 +- .../Language/StringEncoder.cs | 2 +- src/Lucene.Net.Analysis.SmartCn/AnalyzerProfile.cs | 2 +- .../Highlight/WeightedSpanTermExtractor.cs | 2 +- .../VectorHighlight/FieldQuery.cs | 2 +- src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs | 4 ++-- .../Analysis/CharFilters/TestMappingCharFilter.cs | 2 +- .../Analysis/Hunspell/TestAllDictionaries.cs | 2 +- .../Analysis/Synonym/TestSynonymMap.cs | 2 +- .../Analysis/Wikipedia/WikipediaTokenizerTest.cs | 2 +- src/Lucene.Net.Tests.Analysis.Common/Startup.cs | 2 +- src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs | 2 +- src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs | 4 ++-- .../site/release-notes/version-4.8.0-beta00014.md | 2 +- 18 files changed, 19 insertions(+), 30 deletions(-) diff --git a/.github/linters/codespell.txt b/.github/linters/codespell.txt index 6e4b9d3369..0124e73456 100644 --- a/.github/linters/codespell.txt +++ b/.github/linters/codespell.txt @@ -107,13 +107,9 @@ coo corelate corespondent correcty -correponding -corrsponding corse couldnt countr -couterpart -coversion covert cunt curren @@ -129,16 +125,11 @@ dependant despatch despatches detecing -dicationary didnt -differnetly diposing discreet discus displaing -docuentation -documenation -documention doen doens't doesnt @@ -407,8 +398,6 @@ sizin slippy som somme -speacial -specifc specifiy splitted statics diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b1ee26a205..2fae5729a9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -296,7 +296,7 @@ stages: displayName: 'Generate Documentation' - task: ArchiveFiles@2 - displayName: 'Zip Documenation Files' + displayName: 'Zip Documentation Files' inputs: rootFolderOrFile: '$(Build.SourcesDirectory)/websites/apidocs/_site' includeRootFolder: false diff --git a/src/Lucene.Net.Analysis.Common/Analysis/In/IndicNormalizer.cs b/src/Lucene.Net.Analysis.Common/Analysis/In/IndicNormalizer.cs index 0de0078030..1d9d5a1ef7 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/In/IndicNormalizer.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/In/IndicNormalizer.cs @@ -33,7 +33,7 @@ namespace Lucene.Net.Analysis.In /// public class IndicNormalizer { - // LUCENENET NOTE: This class was refactored from its Java couterpart, + // LUCENENET NOTE: This class was refactored from its Java counterpart, // favoring the .NET Regex class to determine the "Unicode Block" rather than // porting over that part of the Java Character class. // References: diff --git a/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs b/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs index f1ba93df73..58b70e51ff 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Dict/BinaryDictionary.cs @@ -31,7 +31,7 @@ namespace Lucene.Net.Analysis.Ja.Dict /// /// Base class for a binary-encoded in-memory dictionary. /// - /// NOTE: To use an alternate dicationary than the built-in one, put the data files in a subdirectory of + /// NOTE: To use an alternate dictionary than the built-in one, put the data files in a subdirectory of /// your application named "kuromoji-data". This subdirectory /// can be placed in any directory up to and including the root directory (if the OS permission allows). /// To place the files in an alternate location, set an environment variable named "kuromoji.data.dir" diff --git a/src/Lucene.Net.Analysis.OpenNLP/overview.md b/src/Lucene.Net.Analysis.OpenNLP/overview.md index 52f54e30db..33e23f4b6f 100644 --- a/src/Lucene.Net.Analysis.OpenNLP/overview.md +++ b/src/Lucene.Net.Analysis.OpenNLP/overview.md @@ -115,7 +115,7 @@ public class CustomOpenNLPAnalyzer : OpenNLPTokenizerFactory } ``` -In the above example, `CustomOpenNLPAnalyzer` extends `OpenNLPTokenizerFactory` (assuming that's the analyzer you're using), and it wraps the OpenNLP tokenizer with UIMA annotators. You'll need to replace the placeholder methods (`CreateUIMASentenceAnnotator` and `CreateUIMATokenAnnotator`) with the actual code to create and configure your UIMA annotators. Please note that configuring NLP can be complex. See the [OpenNLP 1.9.4 Manual](https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html) and [OpenNLP UIMA 1.9.4 API Documention](https://opennlp.apache.org/docs/1.9.4/apidocs/opennlp-uima/index.html) for details. +In the above example, `CustomOpenNLPAnalyzer` extends `OpenNLPTokenizerFactory` (assuming that's the analyzer you're using), and it wraps the OpenNLP tokenizer with UIMA annotators. You'll need to replace the placeholder methods (`CreateUIMASentenceAnnotator` and `CreateUIMATokenAnnotator`) with the actual code to create and configure your UIMA annotators. Please note that configuring NLP can be complex. See the [OpenNLP 1.9.4 Manual](https://opennlp.apache.org/docs/1.9.4/manual/opennlp.html) and [OpenNLP UIMA 1.9.4 API Documentation](https://opennlp.apache.org/docs/1.9.4/apidocs/opennlp-uima/index.html) for details. > [!NOTE] > IKVM (and ``) does not support Java SE higher than version 8. So it will not be possible to add a `` to OpenNLP 2.x until support is added for it in IKVM. diff --git a/src/Lucene.Net.Analysis.Phonetic/Language/StringEncoder.cs b/src/Lucene.Net.Analysis.Phonetic/Language/StringEncoder.cs index b386d93440..01c68db54c 100644 --- a/src/Lucene.Net.Analysis.Phonetic/Language/StringEncoder.cs +++ b/src/Lucene.Net.Analysis.Phonetic/Language/StringEncoder.cs @@ -28,7 +28,7 @@ public interface IStringEncoder /// /// the to encode /// the encoded - // LUCENENET specific - EncoderException not ported, as it was only thrown on a coversion from object to string type + // LUCENENET specific - EncoderException not ported, as it was only thrown on a conversion from object to string type // thrown if there is an error condition during the encoding process. string Encode(string source); } diff --git a/src/Lucene.Net.Analysis.SmartCn/AnalyzerProfile.cs b/src/Lucene.Net.Analysis.SmartCn/AnalyzerProfile.cs index 0494c5c0c3..9c9eb2eb04 100644 --- a/src/Lucene.Net.Analysis.SmartCn/AnalyzerProfile.cs +++ b/src/Lucene.Net.Analysis.SmartCn/AnalyzerProfile.cs @@ -28,7 +28,7 @@ namespace Lucene.Net.Analysis.Cn.Smart /// /// has a built-in dictionary and stopword list out-of-box. /// - /// NOTE: To use an alternate dicationary than the built-in one, put the "bigramdict.dct" and + /// NOTE: To use an alternate dictionary than the built-in one, put the "bigramdict.dct" and /// "coredict.dct" files in a subdirectory of your application named "smartcn-data". This subdirectory /// can be placed in any directory up to and including the root directory (if the OS permission allows). /// To place the files in an alternate location, set an environment variable named "smartcn.data.dir" diff --git a/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs b/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs index d3ed00028e..da76fb6d76 100644 --- a/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs +++ b/src/Lucene.Net.Highlighter/Highlight/WeightedSpanTermExtractor.cs @@ -222,7 +222,7 @@ protected virtual void Extract(Query query, IDictionary Query rewritten = query.Rewrite(reader); if (rewritten != query) { - // only rewrite once and then flatten again - the rewritten query could have a speacial treatment + // only rewrite once and then flatten again - the rewritten query could have a special treatment // if this method is overwritten in a subclass. Flatten(rewritten, reader, flatQueries); diff --git a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs index 708223908d..f20c4f7c2e 100644 --- a/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs +++ b/src/Lucene.Net.TestFramework/Util/LuceneTestCase.cs @@ -1308,9 +1308,9 @@ public static ISet AsSet(params object[] args) /// Convenience method for logging an enumerator. /// /// String logged before/after the items in the enumerator. - /// Each element is ToString()ed and logged on it's own line. If iter is null this is logged differnetly then an empty enumerator. + /// Each element is ToString()ed and logged on it's own line. If iter is null this is logged differently then an empty enumerator. /// Stream to log messages to. - public static void DumpEnumerator(string label, IEnumerator iter, TextWriter stream) // LUCENENET specifc - renamed from DumpIterator + public static void DumpEnumerator(string label, IEnumerator iter, TextWriter stream) // LUCENENET specific - renamed from DumpIterator { stream.WriteLine("*** BEGIN " + label + " ***"); if (null == iter) diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilter.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilter.cs index 444f09f8fa..33a9bd0309 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilter.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/CharFilters/TestMappingCharFilter.cs @@ -484,7 +484,7 @@ public virtual void TestRandomMaps2() } } - // Finish mappping offsets + // Finish mapping offsets while (actualInputOffsets.Count < actualBuilder.Length) { actualInputOffsets.Add(mapFilter.CorrectOffset(actualInputOffsets.Count)); diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs index 76626cbe29..7033d713d8 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Hunspell/TestAllDictionaries.cs @@ -31,7 +31,7 @@ namespace Lucene.Net.Analysis.Hunspell /// wget --mirror -np http://archive.services.openoffice.org/pub/mirror/OpenOffice.org/contrib/dictionaries/ /// Note some of the files differ only in case. This may be a problem on your operating system! /// - /// LUCENENET NOTE: The above URL is no longer valid. These dictionaries can be retreived via FTP at one of these URLs + /// LUCENENET NOTE: The above URL is no longer valid. These dictionaries can be retrieved via FTP at one of these URLs /// ftp://ftp.us.horde.org/pub/software/openoffice/contrib/dictionaries/ /// ftp://mirror.nl.leaseweb.net/openoffice/contrib/dictionaries/ /// ftp://mirror.aptus.co.tz/openoffice/contrib/dictionaries/ diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs index cfe38e0978..fb38d139c5 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Synonym/TestSynonymMap.cs @@ -308,7 +308,7 @@ public Stream OpenResource(string resource) { if (!"something.txt".Equals(resource, StringComparison.Ordinal)) { - throw RuntimeException.Create("should not get a differnt resource"); + throw RuntimeException.Create("should not get a different resource"); } else { diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Wikipedia/WikipediaTokenizerTest.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Wikipedia/WikipediaTokenizerTest.cs index 5f38f4bc0a..4b2e33314f 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Wikipedia/WikipediaTokenizerTest.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Wikipedia/WikipediaTokenizerTest.cs @@ -92,7 +92,7 @@ public virtual void TestBoth() untoks.Add(WikipediaTokenizer.CATEGORY); untoks.Add(WikipediaTokenizer.ITALICS); string test = "[[Category:a b c d]] [[Category:e f g]] [[link here]] [[link there]] ''italics here'' something ''more italics'' [[Category:h i j]]"; - //should output all the indivual tokens plus the untokenized tokens as well. Untokenized tokens + //should output all the individual tokens plus the untokenized tokens as well. Untokenized tokens WikipediaTokenizer tf = new WikipediaTokenizer(new StringReader(test), WikipediaTokenizer.BOTH, untoks); AssertTokenStreamContents(tf, new string[] { "a b c d", "a", "b", "c", "d", "e f g", "e", "f", "g", "link", "here", "link", "there", "italics here", "italics", "here", "something", "more italics", "more", "italics", "h i j", "h", "i", "j" }, new int[] { 11, 11, 13, 15, 17, 32, 32, 34, 36, 42, 47, 56, 61, 71, 71, 79, 86, 98, 98, 103, 124, 124, 128, 132 }, new int[] { 18, 12, 14, 16, 18, 37, 33, 35, 37, 46, 51, 60, 66, 83, 78, 83, 95, 110, 102, 110, 133, 125, 129, 133 }, new int[] { 1, 0, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 0, 1, 1 }); diff --git a/src/Lucene.Net.Tests.Analysis.Common/Startup.cs b/src/Lucene.Net.Tests.Analysis.Common/Startup.cs index 342263bc56..3e8cff3fda 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Startup.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Startup.cs @@ -29,7 +29,7 @@ protected override void TestFrameworkSetUp() // or Hunspell that require it. // // Note this is in the test project, which never uses netstandard2.0. If we were using - // netstandard2.0, we would need an extra check to deteremine if we are on .NET Framework, + // netstandard2.0, we would need an extra check to determine if we are on .NET Framework, // which doesn't support encoding providers. See EncodingProviderInitializer in the // Lucene.Net.Analysis.Kuromoji project. System.Text.Encoding.RegisterProvider(System.Text.CodePagesEncodingProvider.Instance); diff --git a/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs b/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs index 00b177a590..f373246c15 100644 --- a/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs +++ b/src/Lucene.Net.Tests.Queries/BooleanFilterTest.cs @@ -39,7 +39,7 @@ public override void SetUp() directory = NewDirectory(); RandomIndexWriter writer = new RandomIndexWriter(Random, directory, new MockAnalyzer(Random, MockTokenizer.WHITESPACE, false)); - //Add series of docs with filterable fields : acces rights, prices, dates and "in-stock" flags + //Add series of docs with filterable fields : access rights, prices, dates and "in-stock" flags AddDoc(writer, @"admin guest", @"010", @"20040101", @"Y"); AddDoc(writer, @"guest", @"020", @"20040101", @"Y"); AddDoc(writer, @"guest", @"020", @"20050101", @"Y"); diff --git a/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs b/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs index 59a5b0cfde..b2705563c0 100644 --- a/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs +++ b/src/Lucene.Net.Tests.Queries/CommonTermsQueryTest.cs @@ -333,7 +333,7 @@ public void TestIllegalOccur() try { new CommonTermsQuery(Occur.MUST_NOT, RandomOccur(random), Random.NextSingle()); - Assert.Fail(@"MUST_NOT is not supproted"); + Assert.Fail(@"MUST_NOT is not supported"); } catch (Exception ex) when (ex.IsIllegalArgumentException()) { @@ -342,7 +342,7 @@ public void TestIllegalOccur() try { new CommonTermsQuery(RandomOccur(random), Occur.MUST_NOT, Random.NextSingle()); - Assert.Fail(@"MUST_NOT is not supproted"); + Assert.Fail(@"MUST_NOT is not supported"); } catch (Exception ex) when (ex.IsIllegalArgumentException()) { diff --git a/websites/site/release-notes/version-4.8.0-beta00014.md b/websites/site/release-notes/version-4.8.0-beta00014.md index c8ba76e619..6fe0af868c 100644 --- a/websites/site/release-notes/version-4.8.0-beta00014.md +++ b/websites/site/release-notes/version-4.8.0-beta00014.md @@ -175,7 +175,7 @@ IterationCount=15 LaunchCount=2 WarmupCount=10 * [#444](https://github.com/apache/lucenenet/pull/444), [#272](https://github.com/apache/lucenenet/pull/272) - **PERFORMANCE:** `Lucene.Net.Search.FieldCacheImpl`: Reverted locking back to the state of Lucene 4.8.0. * [#445](https://github.com/apache/lucenenet/pull/445) - Removed `FEATURE_THREAD_INTERRUPT` since all supported targets now support thread interrupts. Note also that Lucene *depends* on thread interrupts to function properly, so disabling this feature would be invalid. * [#448](https://github.com/apache/lucenenet/pull/448) - **DOCS:** Added migration guide for users migrating from Lucene.NET 3.0.3 to Lucene.NET 4.8.0. -* [#396](https://github.com/apache/lucenenet/pull/396) - **DOCS:** Create branching scheme to track changes in docuentation between different Lucene versions and removed the `JavaDocToMarkdownConverter` tool from the normal build workflow of the API docs. This frees us up to update the "namespace" documentation with .NET-specific information and code examples. +* [#396](https://github.com/apache/lucenenet/pull/396) - **DOCS:** Create branching scheme to track changes in documentation between different Lucene versions and removed the `JavaDocToMarkdownConverter` tool from the normal build workflow of the API docs. This frees us up to update the "namespace" documentation with .NET-specific information and code examples. * Upgraded J2N NuGet package dependency to 2.0.0-beta-0012 * Upgraded ICU4N NuGet package dependency to 60.1.0-alpha.254 * Upgraded Morfologik.Stemming package dependency to 2.1.7-beta-0002