diff --git a/.build/psake/public/Invoke-psake.ps1 b/.build/psake/public/Invoke-psake.ps1 index 2e9a65ad89..21696c1134 100644 --- a/.build/psake/public/Invoke-psake.ps1 +++ b/.build/psake/public/Invoke-psake.ps1 @@ -125,7 +125,7 @@ function Invoke-psake { $psake.context # holds onto the current state of all variables $psake.run_by_psake_build_tester # indicates that build is being run by psake-BuildTester $psake.config_default # contains default configuration - # can be overriden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script + # can be overridden in psake-config.ps1 in directory with psake.psm1 or in directory with current build script $psake.build_success # indicates that the current build was successful $psake.build_script_file # contains a System.IO.FileInfo for the current build script $psake.build_script_dir # contains the fully qualified path to the current build script diff --git a/.github/linters/codespell.txt b/.github/linters/codespell.txt index f22ee07bdf..822a9b3097 100644 --- a/.github/linters/codespell.txt +++ b/.github/linters/codespell.txt @@ -118,8 +118,6 @@ ine ines informations ingenuous -intance -interruted isnt isse isses @@ -158,12 +156,9 @@ nin noe noen noes -non-existant -nonexistant noone notin nowe -occurances oder oint oje @@ -174,8 +169,6 @@ ony ore ot overide -overriden -ovewrite padd pard parms @@ -186,7 +179,6 @@ posin pre-pended pres prevend -probablistic programer pronounciation querys @@ -200,7 +192,6 @@ re-using ream reasearch recipies -refering repot reproducability reproducable diff --git a/CHANGES.txt b/CHANGES.txt index e2848dcae9..82d4e59098 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4355,7 +4355,7 @@ Infrastructure erases the directory contents, even when the directory has already been accessed in this JVM. - RangeQuery: Fix issue where an inclusive range query would - include the nearest term in the index above a non-existant + include the nearest term in the index above a non-existent specified upper term. - SegmentTermEnum: Fix NullPointerException in clone() method when the Term is null. diff --git a/src/Lucene.Net.Analysis.Common/Analysis/Pattern/PatternReplaceFilter.cs b/src/Lucene.Net.Analysis.Common/Analysis/Pattern/PatternReplaceFilter.cs index a139077d1f..2548c64c5c 100644 --- a/src/Lucene.Net.Analysis.Common/Analysis/Pattern/PatternReplaceFilter.cs +++ b/src/Lucene.Net.Analysis.Common/Analysis/Pattern/PatternReplaceFilter.cs @@ -24,7 +24,7 @@ namespace Lucene.Net.Analysis.Pattern /// /// A TokenFilter which applies a to each token in the stream, - /// replacing match occurances with the specified replacement string. + /// replacing match occurrences with the specified replacement string. /// /// /// Note: Depending on the input and the pattern used and the input @@ -41,7 +41,7 @@ public sealed class PatternReplaceFilter : TokenFilter private readonly Regex pattern; /// - /// Constructs an instance to replace either the first, or all occurances + /// Constructs an instance to replace either the first, or all occurrences /// /// the to process /// the pattern (a object) to apply to each diff --git a/src/Lucene.Net.Analysis.ICU/Analysis/Icu/Segmentation/DefaultICUTokenizerConfig.cs b/src/Lucene.Net.Analysis.ICU/Analysis/Icu/Segmentation/DefaultICUTokenizerConfig.cs index cc2cc3fb00..919ffddc23 100644 --- a/src/Lucene.Net.Analysis.ICU/Analysis/Icu/Segmentation/DefaultICUTokenizerConfig.cs +++ b/src/Lucene.Net.Analysis.ICU/Analysis/Icu/Segmentation/DefaultICUTokenizerConfig.cs @@ -61,7 +61,7 @@ public class DefaultICUTokenizerConfig : ICUTokenizerConfig /// the default breakiterators in use. these can be expensive to /// instantiate, cheap to clone. /// - // we keep the cjk breaking separate, thats because it cannot be customized (because dictionary + // we keep the cjk breaking separate, that's because it cannot be customized (because dictionary // is only triggered when kind = WORD, but kind = LINE by default and we have no non-evil way to change it) private static readonly BreakIterator cjkBreakIterator = BreakIterator.GetWordInstance(UCultureInfo.InvariantCulture); diff --git a/src/Lucene.Net.Analysis.Kuromoji/Tools/TokenInfoDictionaryBuilder.cs b/src/Lucene.Net.Analysis.Kuromoji/Tools/TokenInfoDictionaryBuilder.cs index 5f1e8976ed..298e88d249 100644 --- a/src/Lucene.Net.Analysis.Kuromoji/Tools/TokenInfoDictionaryBuilder.cs +++ b/src/Lucene.Net.Analysis.Kuromoji/Tools/TokenInfoDictionaryBuilder.cs @@ -171,7 +171,7 @@ public virtual TokenInfoDictionaryWriter BuildDictionary(IList csvFiles) /// 4-9 - pos /// 10 - base form /// 11 - reading - /// 12 - pronounciation + /// 12 - pronunciation /// /// UniDic features /// diff --git a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs index d5a96db8bf..ef76efb36b 100644 --- a/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs +++ b/src/Lucene.Net.Facet/Taxonomy/Directory/DirectoryTaxonomyWriter.cs @@ -977,7 +977,7 @@ public virtual int GetParent(int ordinal) { EnsureOpen(); // Note: the following if() just enforces that a user can never ask - // for the parent of a nonexistant category - even if the parent array + // for the parent of a nonexistent category - even if the parent array // was allocated bigger than it really needs to be. if (ordinal >= nextID) // LUCENENET specific: Changed exception type thrown to be consistent with guard clauses in .NET diff --git a/src/Lucene.Net.Grouping/AbstractAllGroupHeadsCollector.cs b/src/Lucene.Net.Grouping/AbstractAllGroupHeadsCollector.cs index 990bf892d1..bba5bd533f 100644 --- a/src/Lucene.Net.Grouping/AbstractAllGroupHeadsCollector.cs +++ b/src/Lucene.Net.Grouping/AbstractAllGroupHeadsCollector.cs @@ -200,7 +200,7 @@ protected AbstractAllGroupHeadsCollector_GroupHead(/*TGroupValue groupValue,*/ i /// /// LUCENENET specific class used to reference an /// subclass - /// without refering to its generic closing type. + /// without referring to its generic closing type. /// public abstract class AbstractAllGroupHeadsCollector : ICollector { diff --git a/src/Lucene.Net.Misc/Document/LazyDocument.cs b/src/Lucene.Net.Misc/Document/LazyDocument.cs index 04bccdd223..7a0b7aecf2 100644 --- a/src/Lucene.Net.Misc/Document/LazyDocument.cs +++ b/src/Lucene.Net.Misc/Document/LazyDocument.cs @@ -56,7 +56,7 @@ public LazyDocument(IndexReader reader, int docID) /// /// NOTE: This method must be called once for each value of the field /// name specified in sequence that the values exist. This method may not be - /// used to generate multiple, lazy, IndexableField instances refering to + /// used to generate multiple, lazy, IndexableField instances referring to /// the same underlying IndexableField instance. /// /// diff --git a/src/Lucene.Net.Replicator/ReplicationClient.cs b/src/Lucene.Net.Replicator/ReplicationClient.cs index 3f4915353c..3e96147d7c 100644 --- a/src/Lucene.Net.Replicator/ReplicationClient.cs +++ b/src/Lucene.Net.Replicator/ReplicationClient.cs @@ -108,7 +108,7 @@ public override void Run() } catch (Exception e) when (e.IsInterruptedException()) { - // if we were interruted, somebody wants to terminate us, so just + // if we were interrupted, somebody wants to terminate us, so just // throw the exception further. Thread.CurrentThread.Interrupt(); throw new Util.ThreadInterruptedException(e); diff --git a/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs b/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs index 0e60e165ac..573eb22d79 100644 --- a/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs +++ b/src/Lucene.Net.TestFramework/Util/TestRuleSetupAndRestoreClassEnv.cs @@ -242,7 +242,7 @@ public override void Before() else if ("CheapBastard".Equals(LuceneTestCase.TestCodec, StringComparison.Ordinal) || ("random".Equals(LuceneTestCase.TestCodec, StringComparison.Ordinal) && randomVal == 8 && !ShouldAvoidCodec("CheapBastard") && !ShouldAvoidCodec("Lucene41"))) { - // we also avoid this codec if Lucene41 is avoided, since thats the postings format it uses. + // we also avoid this codec if Lucene41 is avoided, since that's the postings format it uses. codec = new CheapBastardCodec(); } else if ("Asserting".Equals(LuceneTestCase.TestCodec, StringComparison.Ordinal) diff --git a/src/Lucene.Net.TestFramework/Util/TestRuleSetupTeardownChained.cs b/src/Lucene.Net.TestFramework/Util/TestRuleSetupTeardownChained.cs index a23f384734..0f1d60e347 100644 --- a/src/Lucene.Net.TestFramework/Util/TestRuleSetupTeardownChained.cs +++ b/src/Lucene.Net.TestFramework/Util/TestRuleSetupTeardownChained.cs @@ -28,7 +28,7 @@ namespace Lucene.Net.Util /// /// Make sure and were invoked even if they - /// have been overriden. We assume nobody will call these out of non-overriden + /// have been overridden. We assume nobody will call these out of non-overridden /// methods (they have to be public by contract, unfortunately). The top-level /// methods just set a flag that is checked upon successful execution of each test /// case. diff --git a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs index 71f8be9908..47013b4c14 100644 --- a/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs +++ b/src/Lucene.Net.Tests.Analysis.Common/Analysis/Core/TestRandomChains.cs @@ -178,7 +178,7 @@ static TestRandomChains() allowedTokenFilterArgs = new JCG.HashSet(IdentityEqualityComparer.Default); allowedTokenFilterArgs.addAll(argProducers.Keys); allowedTokenFilterArgs.Add(typeof(TokenStream)); - // TODO: fix this one, thats broken: + // TODO: fix this one, that's broken: allowedTokenFilterArgs.Add(typeof(CommonGramsFilter)); allowedCharFilterArgs = new JCG.HashSet(IdentityEqualityComparer.Default); @@ -970,7 +970,7 @@ static object[] NewFilterArgs(Random random, TokenStream stream, Type[] paramTyp } else if (paramType == typeof(CommonGramsFilter)) { - // TODO: fix this one, thats broken: CommonGramsQueryFilter takes this one explicitly + // TODO: fix this one, that's broken: CommonGramsQueryFilter takes this one explicitly args[i] = new CommonGramsFilter(TEST_VERSION_CURRENT, stream, NewRandomArg(random, typeof(CharArraySet))); } else @@ -1066,7 +1066,7 @@ private T CreateComponent(ConstructorInfo ctor, object[] args, StringBuilder || ite.InnerException.GetType().Equals(typeof(NotSupportedException)))) { - // thats ok, ignore + // that's ok, ignore if (Verbose) { Console.WriteLine("Ignoring IAE/UOE from ctor:"); diff --git a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs index 2847e9f497..c28ea230c7 100644 --- a/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs +++ b/src/Lucene.Net.Tests.Facet/Taxonomy/TestTaxonomyCombined.cs @@ -412,7 +412,8 @@ public virtual void TestReaderBasic() } } // (also test invalid categories:) - Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.GetOrdinal(new FacetLabel("non-existant"))); + // LUCENENET specific: Fixed the spelling of the word non-existent (upstream was non-existant) + Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.GetOrdinal(new FacetLabel("non-existent"))); Assert.AreEqual(TaxonomyReader.INVALID_ORDINAL, tr.GetOrdinal(new FacetLabel("Author", "Jules Verne"))); tr.Dispose(); diff --git a/src/Lucene.Net.Tests/Index/TestAllFilesHaveChecksumFooter.cs b/src/Lucene.Net.Tests/Index/TestAllFilesHaveChecksumFooter.cs index dbb4efc9d9..ce4bcd0ec3 100644 --- a/src/Lucene.Net.Tests/Index/TestAllFilesHaveChecksumFooter.cs +++ b/src/Lucene.Net.Tests/Index/TestAllFilesHaveChecksumFooter.cs @@ -81,7 +81,7 @@ private void CheckHeaders(Directory dir) { if (file.Equals(IndexWriter.WRITE_LOCK_NAME, StringComparison.Ordinal)) { - continue; // write.lock has no footer, thats ok + continue; // write.lock has no footer, that's ok } if (file.EndsWith(IndexFileNames.COMPOUND_FILE_EXTENSION, StringComparison.Ordinal)) { diff --git a/src/Lucene.Net.Tests/Index/TestAllFilesHaveCodecHeader.cs b/src/Lucene.Net.Tests/Index/TestAllFilesHaveCodecHeader.cs index 7c643422cb..df3b59f003 100644 --- a/src/Lucene.Net.Tests/Index/TestAllFilesHaveCodecHeader.cs +++ b/src/Lucene.Net.Tests/Index/TestAllFilesHaveCodecHeader.cs @@ -82,11 +82,11 @@ private void CheckHeaders(Directory dir) { if (file.Equals(IndexWriter.WRITE_LOCK_NAME, StringComparison.Ordinal)) { - continue; // write.lock has no header, thats ok + continue; // write.lock has no header, that's ok } if (file.Equals(IndexFileNames.SEGMENTS_GEN, StringComparison.Ordinal)) { - continue; // segments.gen has no header, thats ok + continue; // segments.gen has no header, that's ok } if (file.EndsWith(IndexFileNames.COMPOUND_FILE_EXTENSION, StringComparison.Ordinal)) { diff --git a/src/Lucene.Net.Tests/Search/TestPrefixFilter.cs b/src/Lucene.Net.Tests/Search/TestPrefixFilter.cs index 87b7d36764..b7958b60bf 100644 --- a/src/Lucene.Net.Tests/Search/TestPrefixFilter.cs +++ b/src/Lucene.Net.Tests/Search/TestPrefixFilter.cs @@ -75,19 +75,19 @@ public virtual void TestPrefixFilter_Mem() hits = searcher.Search(query, null, 1000).ScoreDocs; Assert.AreEqual(1, hits.Length); - // test non-existant + // test non-existent filter = new PrefixFilter(new Term("category", "/Computers/ObsoleteOS")); query = new ConstantScoreQuery(filter); hits = searcher.Search(query, null, 1000).ScoreDocs; Assert.AreEqual(0, hits.Length); - // test non-existant, before values + // test non-existent, before values filter = new PrefixFilter(new Term("category", "/Computers/AAA")); query = new ConstantScoreQuery(filter); hits = searcher.Search(query, null, 1000).ScoreDocs; Assert.AreEqual(0, hits.Length); - // test non-existant, after values + // test non-existent, after values filter = new PrefixFilter(new Term("category", "/Computers/ZZZ")); query = new ConstantScoreQuery(filter); hits = searcher.Search(query, null, 1000).ScoreDocs; diff --git a/src/Lucene.Net/Analysis/TokenStreamToAutomaton.cs b/src/Lucene.Net/Analysis/TokenStreamToAutomaton.cs index f011818d78..ad82ac2a10 100644 --- a/src/Lucene.Net/Analysis/TokenStreamToAutomaton.cs +++ b/src/Lucene.Net/Analysis/TokenStreamToAutomaton.cs @@ -188,7 +188,7 @@ public virtual Automaton ToAutomaton(TokenStream @in) { // note: this isn't necessarily true. its just that we aren't surely det. // we could optimize this further (e.g. buffer and sort synonyms at a position) - // but thats probably overkill. this is cheap and dirty + // but that's probably overkill. this is cheap and dirty deterministic = false; } diff --git a/src/Lucene.Net/Index/FilterAtomicReader.cs b/src/Lucene.Net/Index/FilterAtomicReader.cs index f94203b1c4..ed3569edf4 100644 --- a/src/Lucene.Net/Index/FilterAtomicReader.cs +++ b/src/Lucene.Net/Index/FilterAtomicReader.cs @@ -48,7 +48,7 @@ public class FilterAtomicReader : AtomicReader { /// /// Get the wrapped instance by as long as this reader is - /// an intance of . + /// an instance of . /// public static AtomicReader Unwrap(AtomicReader reader) { diff --git a/src/Lucene.Net/Search/package.md b/src/Lucene.Net/Search/package.md index 3cf1d1ca4b..5b19e5ce75 100644 --- a/src/Lucene.Net/Search/package.md +++ b/src/Lucene.Net/Search/package.md @@ -96,7 +96,7 @@ While this document won't answer your specific scoring issues, it will, hopefull Lucene scoring supports a number of pluggable information retrieval [models](http://en.wikipedia.org/wiki/Information_retrieval#Model_types), including: * [Vector Space Model (VSM)](http://en.wikipedia.org/wiki/Vector_Space_Model) -* [Probablistic Models](http://en.wikipedia.org/wiki/Probabilistic_relevance_model) such as [Okapi BM25](http://en.wikipedia.org/wiki/Probabilistic_relevance_model_(BM25)) and [DFR](http://en.wikipedia.org/wiki/Divergence-from-randomness_model) +* [Probabilistic Models](http://en.wikipedia.org/wiki/Probabilistic_relevance_model) such as [Okapi BM25](http://en.wikipedia.org/wiki/Probabilistic_relevance_model_(BM25)) and [DFR](http://en.wikipedia.org/wiki/Divergence-from-randomness_model) * [Language models](http://en.wikipedia.org/wiki/Language_model) These models can be plugged in via the [Similarity API](xref:Lucene.Net.Search.Similarities), and offer extension hooks and parameters for tuning. In general, Lucene first finds the documents that need to be scored based on boolean logic in the Query specification, and then ranks this subset of matching documents via the retrieval model. For some valuable references on VSM and IR in general refer to [Lucene Wiki IR references](http://wiki.apache.org/lucene-java/InformationRetrieval). diff --git a/src/Lucene.Net/Util/Fst/FST.cs b/src/Lucene.Net/Util/Fst/FST.cs index d383822996..db7123825b 100644 --- a/src/Lucene.Net/Util/Fst/FST.cs +++ b/src/Lucene.Net/Util/Fst/FST.cs @@ -1993,7 +1993,7 @@ internal FST Pack(int minInCountDeref, int maxDerefNodes, float acceptableOve // somehow (rarely, possibly never) we use // more bytesPerArc in this rewrite than the // incoming FST did... but in this case we - // will retry (below) so it's OK to ovewrite + // will retry (below) so it's OK to overwrite // bytes: //wasted += bytesPerArc - arcBytes; writer.SkipBytes((int)(arcStartPos + bytesPerArc - writer.Position)); diff --git a/src/Lucene.Net/Util/StringHelper.cs b/src/Lucene.Net/Util/StringHelper.cs index d32aef1b79..b331a52a42 100644 --- a/src/Lucene.Net/Util/StringHelper.cs +++ b/src/Lucene.Net/Util/StringHelper.cs @@ -98,7 +98,7 @@ public static int BytesDifference(this BytesRef left, BytesRef right) // LUCENEN } else { - // a has some extra trailing tokens. if these are all zeroes, thats ok. + // a has some extra trailing tokens. if these are all zeroes, that's ok. if (aToken != 0) { return 1; @@ -106,7 +106,7 @@ public static int BytesDifference(this BytesRef left, BytesRef right) // LUCENEN } } - // b has some extra trailing tokens. if these are all zeroes, thats ok. + // b has some extra trailing tokens. if these are all zeroes, that's ok. while (bTokens.MoveNext()) { if (Convert.ToInt32(bTokens.Current, CultureInfo.InvariantCulture) != 0)