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

✨ - add cli tool to quickly check relevance conflicts #1554

Merged

Conversation

ellismarkf
Copy link
Contributor

@ellismarkf ellismarkf commented Jun 21, 2017

Rather than having to individually check for relevance score conflicts with the developer.html UI, this PR introduces a Node program to check for relevance score conflicts programmatically, all at once, displaying results in the terminal.

To run the check: node test/detect/checkAutoDetectResults.js

If there are no conflicts:
screen shot 2017-06-21 at 4 30 01 pm

The tool distinguishes between moderate and severe conflicts, where moderate conflicts are when the expected language is returned as the second_best result, and severe conflicts are when the expected language was out-scored by both the primary and second_best results.

Moderate conflicts:
screen shot 2017-06-21 at 4 31 37 pm

Severe conflicts:
screen shot 2017-06-21 at 4 36 40 pm

The goal of this tool is to make it easier to understand relevance, as well as give faster feedback to developers about where their language is over-relevant.

The tool should be invoked after building the project, and works best when doing a full, uncompressed build, ie node tools/build.js -n. In compressed mode, relevance doesn't seem to be returned, or at least not in the same way, so I coded around that.

(To capture above screenshots, I arbitrarily spiked relevance in Typescript, Javascript, and Clojure, then discarded the changes. Don't worry 😉 )

@marcoscaceres
Copy link
Contributor

Wonder if it we should combine superpowers: #1525

@joshgoebel joshgoebel added this to Investigate or close in Highlight.js Oct 25, 2019
@joshgoebel joshgoebel moved this from Promote or close to Next Up in Highlight.js Oct 25, 2019
@joshgoebel
Copy link
Member

joshgoebel commented Oct 25, 2019

@ellismarkf This is pretty great. Thanks! Sorry it sat around for so long.

@joshgoebel joshgoebel merged commit 25a81dd into highlightjs:master Oct 25, 2019
Highlight.js automation moved this from Next Up to Done Oct 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Highlight.js
  
Done
Development

Successfully merging this pull request may close these issues.

None yet

3 participants