Skip to content

Commit

Permalink
Address PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
paulirwin committed Oct 22, 2024
1 parent dba4877 commit 1899e51
Show file tree
Hide file tree
Showing 28 changed files with 344 additions and 409 deletions.
20 changes: 12 additions & 8 deletions src/Lucene.Net.Analysis.Kuromoji/Tools/DictionaryBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ namespace Lucene.Net.Analysis.Ja.Util
*/

/// <summary>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this class' Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: analysis kuromoji-build-dictionary.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to that method:
/// analysis kuromoji-build-dictionary.
/// </summary>
public static class DictionaryBuilder // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable
{
Expand Down Expand Up @@ -70,11 +72,13 @@ ConnectionCostsWriter connectionCosts
}

/// <summary>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: analysis kuromoji-build-dictionary.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// analysis kuromoji-build-dictionary.
/// </summary>
public static void Main(string[] args)
{
Expand Down
30 changes: 16 additions & 14 deletions src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/Compile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,14 @@ namespace Egothor.Stemmer
{
/// <summary>
/// The Compile class is used to compile a stemmer table.
/// <para>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// <para />
/// LUCENENET specific: In the Java implementation, this class' Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: analysis stempel-compile-stems
/// </para>
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to that method:
/// analysis stempel-compile-stems
/// </summary>
public static class Compile // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable
{
Expand All @@ -81,19 +82,20 @@ public static class Compile // LUCENENET specific: CA1052 Static holder types sh
private static Trie trie;

/// <summary>
/// <para>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: analysis stempel-compile-stems.
/// </para>
/// Entry point to the Compile application.
/// <para/>
/// <para />
/// This program takes any number of arguments: the first is the name of the
/// desired stemming algorithm to use (a list is available in the package
/// description) , all of the rest should be the path or paths to a file or
/// files containing a stemmer table to compile.
/// <para />
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// analysis stempel-compile-stems
/// </summary>
/// <param name="args">the command line arguments</param>
public static void Main(string[] args)
Expand Down
33 changes: 17 additions & 16 deletions src/Lucene.Net.Analysis.Stempel/Egothor.Stemmer/DiffIt.cs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,16 @@ created by Leo Galambos ([email protected]).
namespace Egothor.Stemmer
{
/// <summary>
/// <para>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: analysis stempel-patch-stems.
/// </para>
/// The DiffIt class is a means generate patch commands from an already prepared
/// stemmer table.
/// <para />
/// LUCENENET specific: In the Java implementation, this class' Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to that method:
/// analysis stempel-patch-stems
/// </summary>
public static class DiffIt // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable
{
Expand All @@ -89,19 +90,19 @@ internal static int Get(int i, string s)
}

/// <summary>
/// <para>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: analysis stempel-patch-stems.
/// </para>
/// Entry point to the DiffIt application.
/// <para>
/// <para />
/// This application takes one argument, the path to a file containing a
/// stemmer table. The program reads the file and generates the patch commands
/// for the stems.
/// </para>
/// <para />
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// analysis stempel-patch-stems
/// </summary>
/// <param name="args">the path to a file containing a stemmer table</param>
public static void Main(string[] args)
Expand Down
17 changes: 9 additions & 8 deletions src/Lucene.Net.Benchmark/ByTask/Benchmark.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,15 @@ public virtual void Execute()
}

/// <summary>
/// <para>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: benchmark.
/// </para>
/// Run the benchmark algorithm.
/// <para />
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// benchmark
/// </summary>
/// <param name="args">Benchmark config and algorithm files.</param>
public static void Main(string[] args)
Expand All @@ -127,7 +128,7 @@ public static void Exec(string[] args)
//Environment.Exit(1);
}

// verify input files
// verify input files
FileInfo algFile = new FileInfo(args[0]);
if (!algFile.Exists /*|| !algFile.isFile() ||!algFile.canRead()*/ )
{
Expand Down
25 changes: 14 additions & 11 deletions src/Lucene.Net.Benchmark/ByTask/Programmatic/Sample.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,28 @@ namespace Lucene.Net.Benchmarks.ByTask.Programmatic

/// <summary>
/// Sample performance test written programmatically - no algorithm file is needed here.
/// <para>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// <para />
/// LUCENENET specific: In the Java implementation, this class' Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: benchmark sample.
/// </para>
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to that method:
/// benchmark sample
/// </summary>
public static class Sample // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable
{

/// <summary>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: benchmark sample.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// benchmark sample
/// </summary>
/// <param name="args"></param>
/// <param name="args">The command line arguments</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Style", "IDE0060:Remove unused parameter", Justification = "Sample shows optional args[] parameter")]
public static void Main(string[] args)
{
Expand Down
26 changes: 14 additions & 12 deletions src/Lucene.Net.Benchmark/Quality/Trec/QueryDriver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,26 +31,28 @@ namespace Lucene.Net.Benchmarks.Quality.Trec

/// <summary>
/// Command-line tool for doing a TREC evaluation run.
/// <para>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// <para />
/// LUCENENET specific: In the Java implementation, this class' Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: benchmark run-trec-eval.
/// </para>
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to that method:
/// benchmark run-trec-eval
/// </summary>
public static class QueryDriver // LUCENENET specific: CA1052 Static holder types should be Static or NotInheritable
{

/// <summary>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: benchmark run-trec-eval.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// benchmark run-trec-eval
/// </summary>
/// <param name="args">Must contain 4 or 5 values</param>
/// <exception cref="ArgumentException"></exception>
/// <exception cref="ArgumentException">Thrown if the incorrect number of arguments are provided.</exception>
public static void Main(string[] args)
{
if (args.Length < 4 || args.Length > 5)
Expand Down
23 changes: 13 additions & 10 deletions src/Lucene.Net.Benchmark/Quality/Utils/QualityQueriesFinder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,14 @@ namespace Lucene.Net.Benchmarks.Quality.Utils
/// <summary>
/// Suggest Quality queries based on an index contents.
/// Utility class, used for making quality test benchmarks.
/// <para>
/// LUCENENET specific: This class is not for direct use. In the Java implementation
/// it's Main method was intended to be called from the command line. However in .NET a
/// <para />
/// LUCENENET specific: In the Java implementation, this class' Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to that method: benchmark find-quality-queries.
/// </para>
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to that method:
/// benchmark find-quality-queries
/// </summary>
public class QualityQueriesFinder
{
Expand All @@ -50,11 +51,13 @@ private QualityQueriesFinder(Store.Directory dir)
}

/// <summary>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: benchmark find-quality-queries.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// benchmark find-quality-queries
/// </summary>
/// <param name="args">{index-dir}</param>
/// <exception cref="IOException">if cannot access the index.</exception>
Expand Down
12 changes: 7 additions & 5 deletions src/Lucene.Net.Benchmark/Utils/ExtractReuters.cs
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,15 @@ protected virtual void ExtractFile(FileInfo sgmFile)
}

/// <summary>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: benchmark extract-reuters.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// benchmark extract-reuters
/// </summary>
/// <param name="args"></param>
/// <param name="args">The command line arguments</param>
public static void Main(string[] args)
{
if (args.Length != 2)
Expand Down
12 changes: 7 additions & 5 deletions src/Lucene.Net.Benchmark/Utils/ExtractWikipedia.cs
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,15 @@ public virtual void Extract()
}

/// <summary>
/// LUCENENET specific: This method is not for direct use. In the Java implementation
/// it was intended to be called from the command line. However in .NET a
/// LUCENENET specific: In the Java implementation, this Main method
/// was intended to be called from the command line. However, in .NET a
/// method within a DLL can't be directly called from the command line so we
/// provide a <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>
/// with a command that maps to this method: benchmark extract-wikipedia.
/// provide a <see href="https://learn.microsoft.com/en-us/dotnet/core/tools/global-tools">.NET tool</see>,
/// <see href="https://www.nuget.org/packages/lucene-cli">lucene-cli</see>,
/// with a command that maps to this method:
/// benchmark extract-wikipedia
/// </summary>
/// <param name="args"></param>
/// <param name="args">The command line arguments</param>
public static void Main(string[] args)
{

Expand Down
Loading

0 comments on commit 1899e51

Please sign in to comment.