module homeblog.program_helper
#
Short summary#
module ensae_teaching_cs.homeblog.program_helper
Various function about programs such as guessing the language of a code
Functions#
function |
truncated documentation |
---|---|
Guess the language of a piece of code. The result can be: js, xml, html, cpp, py, sql, vba, css |
Documentation#
Various function about programs such as guessing the language of a code
- ensae_teaching_cs.homeblog.program_helper.guess_language_code(code)#
Guess the language of a piece of code. The result can be: js, xml, html, cpp, py, sql, vba, css
- Paramètres:
code – code
- Renvoie:
type of language or None if None if not found, score (in [0,1], 1 is good)
The algorithm is to compare two languages bamong each others on keywords they don’t have in common