Skip to content

Commit

Permalink
Update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
russcam committed Nov 18, 2024
1 parent f95e592 commit 9a6f697
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 10 deletions.
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# RankLib for .NET

[![NuGet Release][nuget image]][nuget url]
[![Build Status](https://github.com/searchpioneer/lingua-dotnet/actions/workflows/dotnet.yml/badge.svg)](https://github.com/searchpioneer/lingua-dotnet/actions/workflows/dotnet.yml)
[![license badge][license badge]][license url]

Ranklib for .NET is a hardened port to .NET of [RankLib](https://sourceforge.net/p/lemur/wiki/RankLib/),
a popular open source learning to rank library written in Java. It maintains compatibility with input and output
files of RankLib, allowing it to be used to integrate with systems that use RankLib, such as the
Expand All @@ -15,15 +19,15 @@ incorporating into solutions.
To add as a library to an existing project

```sh
dotnet add package SearchPioneer.RankLib
dotnet add package SearchPioneer.RankLib --prerelease
```

### Command Line Tool

To add as a global .NET command line tool

```sh
dotnet tool install -g SearchPioneer.RankLib.Cli
dotnet tool install -g SearchPioneer.RankLib.Cli --prerelease
```

To see all the commands supported by the command line tool
Expand Down Expand Up @@ -64,3 +68,8 @@ The following metrics are implemented to measure the effectiveness of ranking
5. Normalized Discounted Cumulative Gain (`NDCG@K`)
6. Precision at K (`P@K`)
7. Reciprocal Rank (`RR`)

[nuget url]: https://www.nuget.org/packages/SearchPioneer.RankLib/
[nuget image]: https://img.shields.io/nuget/v/SearchPioneer.RankLib.svg
[license badge]: https://img.shields.io/badge/license-Apache%202.0-blue.svg
[license url]: https://www.apache.org/licenses/LICENSE-2.0
11 changes: 6 additions & 5 deletions docs/Docs/documentation/cli/dotnet-ranklib-eval.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,21 @@ dotnet-ranklib eval [options]
- `ERR@k`

> [!IMPORTANT]
> Use `--train-metric` as the current implementation does not case-sensitive
> Use `--train-metric` as the current implementation is not case-sensitive when parsing options
- **-metric2T | --test-metric `<test-metric>`**
Metric to evaluate on the test data. The default is same as **-metric2t | --train-metric**

> [!IMPORTANT]
> Use `--test-metric` as the current implementation does not case-sensitive
> Use `--test-metric` as the current implementation is not case-sensitive when parsing options
- **-gmax | --max-label `<max-label>`**
Highest judged relevance label. It affects the calculation of ERR. The default is `4` i.e.
5-point scale `[0,1,2,3,4]` where value used is $2^{gmax}$

- **-qrel | --query-relevance-input-file `<query-relevance-input-file>`**
[TREC-style relevance judgment file](../file-formats/relevance-judgment-file-format.md)
[TREC-style relevance judgment file](../file-formats/relevance-judgment-file-format.md) used to provide external judgments to MAP and NDCG
metrics for scoring.

- **-missingZero | --missing-zero**
Substitute zero for missing feature values rather than throwing an exception.
Expand Down Expand Up @@ -86,7 +87,7 @@ dotnet-ranklib eval [options]

- **-kcv | --cross-validation-folds `<cross-validation-folds>`**
Specify how many folds to perform for k-fold cross validation using the specified training data.
The default is k-fold cross validation.
The default is no k-fold cross validation.

- **-kcvmd | --cross-validation-output-directory `<cross-validation-output-directory>`**
Directory for models trained via cross-validation
Expand All @@ -95,7 +96,7 @@ dotnet-ranklib eval [options]
Name for model learned in each fold. It will be prefixed with the fold-number

- **-load | --model-input-files `<model-input-files>`**
Load saved model file for evaluation
Load saved model file for evaluation.

- **-thread | --thread `<thread>`**
Number of threads to use. The performance of some algorithms can be improved by parallelizing computation.
Expand Down
6 changes: 3 additions & 3 deletions docs/Docs/documentation/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,19 @@ incorporating into solutions.
To add as a library to an existing project

```sh
dotnet add package SearchPioneer.RankLib
dotnet add package SearchPioneer.RankLib --prerelease
```

## Command Line Tool

To add as a global .NET command line tool

```sh
dotnet tool install -g SearchPioneer.RankLib.Cli
dotnet tool install -g SearchPioneer.RankLib.Cli --prerelease
```

To see all the commands supported by the command line tool

```sh
dotnet-ranklib --help
dotnet-ranklib --help~~~~
```
9 changes: 9 additions & 0 deletions docs/Docs/index.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# RankLib for .NET

[![NuGet Release][nuget image]][nuget url]
[![Build Status](https://github.com/searchpioneer/lingua-dotnet/actions/workflows/dotnet.yml/badge.svg)](https://github.com/searchpioneer/lingua-dotnet/actions/workflows/dotnet.yml)
[![license badge][license badge]][license url]

Ranklib for .NET is a hardened open source port to .NET of [RankLib](https://sourceforge.net/p/lemur/wiki/RankLib/),
a popular open source learning to rank library written in Java. It maintains compatibility with input and output
files of RankLib, allowing it to be used to integrate with systems that use RankLib, such as the
Expand Down Expand Up @@ -40,3 +44,8 @@ The following metrics are implemented to measure the effectiveness of ranking
5. Normalized Discounted Cumulative Gain (`NDCG@K`)
6. Precision at K (`P@K`)
7. Reciprocal Rank (`RR`)

[nuget url]: https://www.nuget.org/packages/SearchPioneer.RankLib/
[nuget image]: https://img.shields.io/nuget/v/SearchPioneer.RankLib.svg
[license badge]: https://img.shields.io/badge/license-Apache%202.0-blue.svg
[license url]: https://www.apache.org/licenses/LICENSE-2.0

0 comments on commit 9a6f697

Please sign in to comment.