GithubHelp home page GithubHelp logo

iamoracle / spoko Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 1.0 1.1 MB

SPOko machine learning can be used to identify any type of programming language in a text file.

Jupyter Notebook 56.15% Python 43.85%
machine-learning python svc linear-regression model

spoko's Introduction

SPOko Machine Learning

SPOko machine learning can be used to identify any type of programming language in a text file. This can be integrated into IDEs to automatically recognize files format and enable linting based on the file type.

The full dataset used in this machine learning project has over 90,000 source codes. However, for speed and efficiency it has been reduced to about 9,000.

We were able to achieve an accuracy of 99.39%, 99.21%, 96.01% and 82.41% using LinearSVC, LogisticRegression, KNeighborsClassifier and SVC algorithm respectively.

Due to certain limitations we were only able to train our model on Dart, PHP, Python and C++.

We hope this project will be useful!

Tutorials

Fetching your own dataset

In case you do not want to use the default dataset in the dataset folder you can gather your own data, it's simple!

Go to settings.py and edit the following line

# change to the directory where you have your source code files

crawl_from = 'C:/Users/oracle/desktop/projects' 

Then run the command below

C:\Users\user\Desktop\lab> python index.py

This will automatically generate the dataset for you, by automatically performing the folowing on the files discovered.

  • Remove comments in the file
  • extract the keywords
  • make sure that the new data is not in unique
  • you can check data.py for more information

Using your dataset

You might need to install Jupyter Notebook on your device!

Open compare.ipynb to compare models

Open ml.ipynb to train and save model

Developer

Oyeniyi Abiola Peace

Contributors

0 contributors, be the first!

You can submit your dataset or send enquires to officialbilas(at)gmail(dot)com

Thanks

spoko's People

Contributors

iamoracle avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar

Forkers

smavity

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.