fossology / atarashi

Atarashi scans for license statements in open source software, focusing on text statistics. Designed to work stand-alone and with FOSSology.
http://fossology.github.io/atarashi
GNU General Public License v2.0
26 stars 23 forks source link

feat(semanticTextSim): Semantic Text sim algorithm using doc2vec #60

Open hastagAB opened 5 years ago

hastagAB commented 5 years ago

Description

New Open Source License Scanning Algorithm: Semantic Text Similarity find similarity between documents according to its semantics. The Gensim implementation of Doc2Vec converts the whole document (unlike word2vec) into vector with their labels. The Doc2Vec model is trained using the filename as its label and license text as the document. The current training dataset is the txt format of license-list-data provided by SPDX.

Files

Test

amanjain97 commented 4 years ago

@hastagAB Can you please share the results about time taken to find the license and precision of the algorithm.

amanjain97 commented 4 years ago

@hastagAB When these license files are used ? It seems that a lot of files may slow down the build process. If they are only used once, (I think only for creating doctovec model) so we can download during build process and create the model and delete them later. It will make the process more clean (I am not sure). @GMishx Please review the process.

hastagAB commented 4 years ago

@hastagAB Can you please share the results about time taken to find the license and precision of the algorithm.

I have tested all the algorithms using our evaluator and created a report to check the accuracy and time.

As of now, semanticTextSim has very less accuracy because the dataset used and the code is at its primitive stage. This PR is created to add the primary establishment of the doc2vec ML model and the model will be improved gradually by manually creating a better training dataset.

hastagAB commented 4 years ago

@hastagAB When these license files are used ? It seems that a lot of files may slow down the build process. If they are only used once, (I think only for creating doctovec model) so we can download during build process and create the model and delete them later. It will make the process more clean (I am not sure). @GMishx Please review the process.

Yes, I totally agree with your suggested method. An alternative method might be to re-use the model's binary file only. once the model is created we don't need to train it again and again, so we can skip the training part as well as the files used for training. What do you suggest? @amanjain97 @GMishx