Package: atarashi
AtarashiOpen source software is licensed using open source licenses. There are many
of open source licenses around and adding to that, open source software
packages involve sometimes multiple licenses for different files.Atarashi provides different methods for scanning for license statements in
open source software. Unlike existing rule-based approaches - such as the
Nomos license scanner from the FOSSology project - atarashi implements multiple
text statistics and information retrieval algorithms.Anticipated advantages is an improved precision while offering an as easy
as possible approach to add new license texts or new license references.Atarashi is designed to work stand-alone and with FOSSology. More info athttp://fossology.github.io/atarashiRequirementsPython >= v3.5pip >= 18.1Steps for InstallationInstallInstall from PyPipip install atarashiSource installpip install .It will download all dependencies required and trigger build as well.Build will generate 3 new files in your current directorydata/Ngram_keywords.jsonlicenses/<SPDX-version>.csvlicenses/processedList.csvThese files will be placed to their appropriate places by the install script.Installing just dependenciespip install -r requirements.txtBuild (optional)$ python3 setup.py buildHow to runGet the help by runningatarashi -horatarashi --helpExampleRunningDLDagentatarashi -a DLD /path/to/file.cRunningwordFrequencySimilarityagentatarashi -a wordFrequencySimilarity /path/to/file.cRunningtfidfagentWithCosine similarityatarashi -a tfidf /path/to/file.catarashi -a tfidf -s CosineSim /path/to/file.cWithScore similarityatarashi -a tfidf -s ScoreSim /path/to/file.cRunningNgramagentWithCosine similarityatarashi -a Ngram /path/to/file.catarashi -a Ngram -s CosineSim /path/to/file.cWithDice similarityatarashi -a Ngram -s DiceSim /path/to/file.cWithBigram Cosine similarityatarashi -a Ngram -s BigramCosineSim /path/to/file.cRunning inverbosemodeatarashi -a DLD -v /path/to/file.cRunning with custom CSVs and JSONsPlease reffer to the build instructions to get the CSV and JSON
understandable by atarashi.atarashi -a DLD -l /path/to/processedList.csv /path/to/file.catarashi -a Ngram -l /path/to/processedList.csv -j /path/to/ngram.json /path/to/file.cRunning Docker imagePull Docker imagedocker pull fossology/atarashi:latestRun the imagedocker run --rm -v <path/to/scan>:/project fossology/atarashi:latest <options> /project/<path/to/file>Since docker can not access host fs directly, we mount a volume from the
directory containing the files to scan to/projectin the container. Simply
pass the options and path to the file relative to the mounted path.TestRun imtihaan (meaningExamin Hindi) with the name of the Agent.eg.python atarashi/imtihaan.py /path/to/processedList.csv <DLD|tfidf|Ngram> <testfile>Seepython atarashi/imtihaan.py --helpfor moreCreating Debian packagesInstall dependencies# apt-get install python3-setuptools python3-all debhelper
# pip install stdebCreate Debian packages$ python3 setup.py --command-packages=stdeb.command bdist_debLocate the files underdeb_distLicenseSPDX-License-Identifier: GPL-2.0This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License version 2
as published by the Free Software Foundation.This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License for more details.You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.How to generate the documentation using sphinxGo to project directory 'atarashi'.Install Sphinx and m2rpip install sphinx m2r(Since this project is based on python sopipis already installed).Initialisedocs/directory withsphinx-quickstartmkdirdocscddocs/
sphinx-quickstartRoot path for the documentation [.]: .Separate source and build directories (y/n) [n]: nautodoc: automatically insert docstrings from modules (y/n) [n]: yintersphinx: link between Sphinx documentation of different projects (y/n) [n]: yElse use the default optionSetup theconf.pyand includeREADME.mdEnable the following lines and change the insert path:importosimportsyssys.path.insert(0,os.path.abspath('../'))Enablem2rto insert.mdfiles in Sphinx documentation:[...]extensions=[...'m2r',][...]source_suffix=['.rst','.md']IncludeREADME.mdby editingindex.rst..toctree::[...]
    readme..mdinclude::../README.mdAuto-generate the.rstfiles indocs/sourcewhich will be used to generate documentationcddocs/
sphinx-apidoc-osource/../atarashicd docsmake htmlThis will generate file indocs/_build/html. Go to: index.htmlYou can change the theme of the documentation by changinghtml_themein config.py file indocs/folder.
You can choose from {'alabaster', 'classic', 'sphinxdoc', 'scrolls', 'agogo', 'traditional', 'nature', 'haiku', 'pyramid', 'bizstyle'}Reference