Skip to content

[False Positive] Json file detected as SQL #23

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

Closed
emanuelb opened this issue Jul 7, 2020 · 2 comments
Closed

[False Positive] Json file detected as SQL #23

emanuelb opened this issue Jul 7, 2020 · 2 comments

Comments

@emanuelb
Copy link

emanuelb commented Jul 7, 2020

Running guesslang data-2.0.json return Programming language: SQL
while running guesslang --probabilities data-2.0.json return: (the other langs have 0%)

Language name       Probability
 SQL                  98.52%
 JavaScript            1.31%
 PHP                   0.16%
 Python                0.01%

The file is:
https://sources.debian.org/data/main/n/node-caniuse-db/1.0.30001048-1/fulldata-json/data-2.0.json

while running guesslang on file data-1.0.json from:
https://sources.debian.org/data/main/n/node-caniuse-db/1.0.30001048-1/fulldata-json/data-1.0.json
works somehow correctly by returning Programming language: JavaScript & JavaScript 100.00% (as JSON not supported yet, but it's valid JavaScript)

@yoeo
Copy link
Owner

yoeo commented Jul 9, 2020

Hi @emanuelb

Indeed, JSON is not supported yet. The current model was not trained with JSON files see:

"JavaScript": ["js", "es6"],

In consequence, even if Guesslang may sometimes correctly classify JSON as JavaScript, classification errors are highly expected here.

A proper support for JSON files is planned #19, I just need to find enough JSON example files to feed the model.

@yoeo
Copy link
Owner

yoeo commented Jul 25, 2021

Hello @emanuelb ,

Guesslang properly supports JSON now as well as 23 other languages that where not supported before #33 🙂

@yoeo yoeo closed this as completed Jul 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants