Skip to content

Commit

Permalink
Update Usage-Via-Library.md
Browse files Browse the repository at this point in the history
Add details-tag to hide the kotlin code.
Additionally, added a missing "java" tag for code
  • Loading branch information
Gram21 authored Sep 25, 2024
1 parent da985d0 commit 2006444
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion docs/Usage-Via-Library.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ Once the library is included, you can import and use the **ClassificationMetrics

### Example for Classification Metrics:

<details>
<summary>Kotlin example</summary>

```kotlin
import edu.kit.kastel.mcse.ardoco.metrics.ClassificationMetricsCalculator
import edu.kit.kastel.mcse.ardoco.metrics.result.SingleClassificationResult
Expand All @@ -56,6 +59,10 @@ fun main() {
}
```

</details>
<details open>
<summary>Java example</summary>

```java
import edu.kit.kastel.mcse.ardoco.metrics.ClassificationMetricsCalculator;
import edu.kit.kastel.mcse.ardoco.metrics.result.SingleClassificationResult;
Expand All @@ -80,9 +87,13 @@ public class ClassificationExample {
}
}
```
</details>

### Example for Rank Metrics:

<details>
<summary>Kotlin example</summary>

```kotlin
import edu.kit.kastel.mcse.ardoco.metrics.RankMetricsCalculator
import edu.kit.kastel.mcse.ardoco.metrics.result.SingleRankMetricsResult
Expand All @@ -106,6 +117,10 @@ fun main() {
}
```

</details>
<details open>
<summary>Java example</summary>

```java
import edu.kit.kastel.mcse.ardoco.metrics.RankMetricsCalculator;
import edu.kit.kastel.mcse.ardoco.metrics.result.SingleRankMetricsResult;
Expand Down Expand Up @@ -134,6 +149,7 @@ public class RankMetricsExample {
}
}
```
</details>

## 3. Customizing the Calculations

Expand All @@ -147,6 +163,9 @@ The **`RelevanceBasedInput`** class allows you to pass additional relevance scor

#### Code Example:

<details>
<summary>Kotlin example</summary>

```kotlin
import edu.kit.kastel.mcse.ardoco.metrics.RankMetricsCalculator
import edu.kit.kastel.mcse.ardoco.metrics.result.SingleRankMetricsResult
Expand Down Expand Up @@ -188,7 +207,11 @@ fun main() {
}
```

```
</details>
<details open>
<summary>Java example</summary>

```java
import edu.kit.kastel.mcse.ardoco.metrics.RankMetricsCalculator;
import edu.kit.kastel.mcse.ardoco.metrics.result.SingleRankMetricsResult;
import edu.kit.kastel.mcse.ardoco.metrics.internal.RelevanceBasedInput;
Expand Down Expand Up @@ -233,6 +256,8 @@ public class RankMetricsWithRelevanceExample {
}
}
```
</details>


#### Explanation:
1. **Ranked Results**: A list of lists where each list represents ranked items for a query.
Expand Down

0 comments on commit 2006444

Please sign in to comment.