Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

More similarity metrics #1396

Draft
wants to merge 5 commits into
base: develop
Choose a base branch
from
Draft

Conversation

TwoOfTwelve
Copy link
Contributor

@TwoOfTwelve TwoOfTwelve commented Nov 28, 2023

Adds the similarity metrics described in #1134
Also changes the report generation to export all metrics defined in the enum

As discussed the distributions in the report are not reversed anymore, this is an api breaking change.


public enum SimilarityMetric implements ToDoubleFunction<JPlagComparison> {
AVG("average similarity", JPlagComparison::similarity),
MIN("minimum similarity", JPlagComparison::minimalSimilarity),
MAX("maximal similarity", JPlagComparison::maximalSimilarity),
INTERSECTION("matched tokens", it -> (double) it.getNumberOfMatchedTokens());
INTERSECTION("matched tokens", it -> (double) it.getNumberOfMatchedTokens()),
SYMMETRIC("symmetric similarity", it -> {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this equivalent to the implementation of the "average similarity", only ignoring base code?

@Kr0nox
Copy link
Member

Kr0nox commented Dec 11, 2023

With reversing the distribution, it now is the wrong way for the report-viewer. We should decide whether we want it to be reversed in the application and then written into the report the way the report-viewer currently expects it, or whether the report-viewer should turn it around

@tsaglam tsaglam added enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change labels Dec 13, 2023
Copy link

sonarcloud bot commented Dec 13, 2023

Quality Gate Passed Quality Gate passed for 'JPlag Report Viewer'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Dec 13, 2023

Quality Gate Passed Quality Gate passed for 'JPlag Plagiarism Detector'

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
96.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@TwoOfTwelve TwoOfTwelve marked this pull request as draft August 1, 2024 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issue/PR that involves features, improvements and other changes minor Minor issue/feature/contribution/change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants