Metadata-Version: 2.1
Name: guesslang
Version: 2.0.3
Summary: Detect the programming language of a source code
Home-page: https://github.com/yoeo/guesslang
Author: Y. SOMDA
License: MIT
Platform: any
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
License-File: LICENSE

Guesslang documentation
=======================

Guesslang detects the programming language of a given source code.

It supports **30** programming **languages** and detects
the correct programming language with more than **90% accuracy**.

`Guesslang is an open source <https://github.com/yoeo/guesslang>`_
deep learning software that have been trained with
**over a million** source code files.

You can use Guesslang as a command line interface tool or as a Python module:

.. code-block:: python

  from guesslang import Guess

  guess = Guess()

  # Guess the language from code
  language = 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(language)  # --> Erlang

Guesslang supports **30** of the **most popular** programming languages:

+------------------+-----------------+----------------------+----------+----------------+
| ``Batchfile``    | ``C``           | ``C#``               | ``C++``  | ``CSS``        |
+------------------+-----------------+----------------------+----------+----------------+
| ``CoffeeScript`` | ``Erlang``      | ``Go``               | ``HTML`` | ``Haskell``    |
+------------------+-----------------+----------------------+----------+----------------+
| ``Java``         | ``JavaScript``  | ``Jupyter Notebook`` | ``Lua``  | ``Markdown``   |
+------------------+-----------------+----------------------+----------+----------------+
| ``Matlab``       | ``Objective-C`` | ``PHP``              | ``Perl`` | ``PowerShell`` |
+------------------+-----------------+----------------------+----------+----------------+
| ``Python``       | ``R``           | ``Ruby``             | ``Rust`` | ``SQL``        |
+------------------+-----------------+----------------------+----------+----------------+
| ``Scala``        | ``Shell``       | ``Swift``            | ``TeX``  | ``TypeScript`` |
+------------------+-----------------+----------------------+----------+----------------+

Full documentation at https://guesslang.readthedocs.io/en/latest/

