macGist icon indicating copy to clipboard operation
macGist copied to clipboard

Detect language

Open Bunn opened this issue 7 years ago • 2 comments

Detect programming language to add correct gist extension.

Bunn avatar Jun 19 '17 12:06 Bunn

Github's linguist is open source, you could try calling it using CRuby.

fpg1503 avatar Jun 21 '17 16:06 fpg1503

@fpg1503 yep, I saw that, it's on my bookmark already, there's also some cool implementations using ML like: https://medium.com/machine-learning-at-petiteprogrammer/detecting-the-programming-language-of-source-code-snippets-using-machine-learning-and-neural-e275ca4ce93e

Not sure how to handle this yet, but probably the linguist approach is the best one. Thanks :)

Bunn avatar Jun 21 '17 17:06 Bunn