3 ms·
It is similar to the tool github uses to detect language of files (https://github.com/github/linguist https://github.com/github/linguist) but about 2x faster.
by ducktective 6y ago
It is similar to the tool github uses to detect language of files (https://github.com/github/linguist https://github.com/github/linguist) but about 2x faster.
Here is the CLI binary repo:
https://github.com/go-enry/enry https://github.com/go-enry/enry
- daxfohl 6y agoAh, cool. I was initially thinking it was a tool that would look at binary executables and try to figure out what language they were compiled from. Once I realized this was only looking at source, I couldn't figure out what anyone would use it for. Totally makes sense after this comment. (Which should probably be in the readme too).
- ducktective 6y agoI think for binaries, `binwalk` is the proper tool. One of the usecases of this tool could be "automatic syntax highlighting" for webapps (like git repo interfaces) or pastebin sites.
- throwawaybutwhy 6y agoHave you got accuracy scores? Speed ain't everything if misclassification is frequent enough to worry.
- ducktective 6y agoI didn't find any in the README.md. Maybe someone from the project could provide an accuracy benchmark.