https://github.com/webfashionist/devclassify
DevClassify analyzes the source code of several programming languages and returns the probabilities for each language with the recommended file extension.
https://github.com/webfashionist/devclassify
analysis classification devclassify-analyzes language php programming-language
Last synced: 7 months ago
JSON representation
DevClassify analyzes the source code of several programming languages and returns the probabilities for each language with the recommended file extension.
- Host: GitHub
- URL: https://github.com/webfashionist/devclassify
- Owner: webfashionist
- License: agpl-3.0
- Created: 2016-12-18T00:04:57.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2020-04-14T00:02:19.000Z (almost 6 years ago)
- Last Synced: 2025-06-09T10:08:37.217Z (8 months ago)
- Topics: analysis, classification, devclassify-analyzes, language, php, programming-language
- Language: PHP
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DevClassify
DevClassify analyzes the source code of several programming languages and returns the probabilities for each language with the recommended file extension.
## Usage
To implement DevClassify in your project, you only need to `include` the `src/classes/ProgrammingLanguage.class.php` class and call the `check()` method. You can find an example in `tests/checkLanguage.php`.
```php
check($yourCode); // set your code as parameter of this method
// probabilities:
var_dump($result->probabilities);
echo '
';
// recommended file extension:
echo $result->extension;
?>
```
## Languages
- [x] HTML
- [X] XML (XML snippets will be identified as HTML - the `` tag must be set)
- [x] CSS
- [X] JavaScript
- [X] PHP
- [X] SQL
- [X] JSON
- [X] Bash
- [X] Python
- [ ] ...