SPOko

所属分类:WEB开发
开发工具:Jupyter Notebook
文件大小:1122KB
下载次数:0
上传日期:2020-03-13 22:24:44
上 传 者sh-1993
说明:  SPOko机器学习可以用于识别文本文件中的任何类型的编程语言。
(SPOko machine learning can be used to identify any type of programming language in a text file.)

文件列表:
.vscode (0, 2020-03-14)
.vscode\settings.json (71, 2020-03-14)
__init__.py (0, 2020-03-14)
combiner.py (3906, 2020-03-14)
compare.ipynb (14420, 2020-03-14)
compare.py (1997, 2020-03-14)
data.py (1972, 2020-03-14)
dataset (0, 2020-03-14)
dataset\default_dataset.csv (8123342, 2020-03-14)
index.py (878, 2020-03-14)
ml.ipynb (4702, 2020-03-14)
ml.py (1519, 2020-03-14)
model (0, 2020-03-14)
model\LR_SPOko.model (4855, 2020-03-14)
path.py (1586, 2020-03-14)
settings.py (3078, 2020-03-14)

# 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](https://github.com/iamoracle/SPOko/blob/master/dataset/default_dataset.csv) in the dataset folder you can gather your own data, it's simple! Go to [settings.py](https://github.com/iamoracle/SPOko/blob/master/settings.py) and edit the following line ```python # change to the directory where you have your source code files crawl_from = 'C:/Users/oracle/desktop/projects' ``` Then run the command below ```cmd 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](https://github.com/iamoracle/SPOko/blob/master/data.py) for more information ## Using your dataset You might need to install Jupyter Notebook on your device! Open [compare.ipynb](https://github.com/iamoracle/SPOko/blob/master/compare.ipynb) to compare models Open [ml.ipynb](https://github.com/iamoracle/SPOko/blob/master/ml.ipynb) to train and save model ## Developer [Oyeniyi Abiola Peace](https://github.com/iamoracle/SPOko/blob/master/https://twitter.com/_iamoracle]) ## Contributors 0 contributors, be the first! You can submit your dataset or send enquires to officialbilas(at)gmail(dot)com Thanks

近期下载者

相关文件


收藏者