Detect the programming language of a source code
Project description
Guesslang detects the programming language of a given source code:
from guesslang import Guess
name = Guess().language_name("""
% Quick sort
-module (recursion).
-export ([qsort/1]).
qsort([]) -> [];
qsort([Pivot|T]) ->
qsort([X || X <- T, X < Pivot])
++ [Pivot] ++
qsort([X || X <- T, X >= Pivot]).
""")
print(name) # >>> Erlang
Guesslang supports 20 programming languages:
C |
C# |
C++ |
CSS |
Erlang |
Go |
HTML |
Java |
Javascript |
Markdown |
Objective-C |
PHP |
Perl |
Python |
Ruby |
Rust |
SQL |
Scala |
Shell |
Swift |
The current guessing accuracy is higher than 90%.
You can contribute to Guesslang on Github https://github.com/yoeo/guesslang.
Full documentation at https://guesslang.readthedocs.io/en/latest/
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file guesslang-0.9.3-py3-none-any.whl.
File metadata
- Download URL: guesslang-0.9.3-py3-none-any.whl
- Upload date:
- Size: 3.2 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7727bbc04d2e7770c49cc3920a5f41065a8783c1503f4db28779ce015e2a04da
|
|
| MD5 |
41b52e553054db817324ee80d26eda60
|
|
| BLAKE2b-256 |
d5e20416000ea8c42665ca1c3a9b527b585e9a9610b4a6494d728358f25a3a46
|