Skip to content

Usage Guide

Ayush Bhardwaj edited this page Jul 9, 2020 · 1 revision

Example Usage

To use our command-line tool for scanning licenses we have few set of example usage to get you started.

  • Running DLD agent

    atarashi -a DLD /path/to/file

  • Running wordFrequencySimilarity agent

    atarashi -a wordFrequencySimilarity /path/to/file

  • Running tfidf agent

    atarashi -a tfidf /path/to/file

  • tfidf With Cosine similarity

    atarashi -a tfidf -s CosineSim /path/to/file

  • tfidf With Score similarity

    atarashi -a tfidf -s ScoreSim /path/to/file

  • Running Ngram agent

    atarashi -a Ngram /path/to/file

  • Ngram With Cosine similarity

    atarashi -a Ngram -s CosineSim /path/to/file

  • Ngram With Dice similarity

    atarashi -a Ngram -s DiceSim /path/to/file

  • With Bigram Cosine similarity

    atarashi -a Ngram -s BigramCosineSim /path/to/file

  • Running in verbose mode

    atarashi -a DLD -v /path/to/file

  • Running with custom CSVs and JSONs

  • Please refer to the build instructions to get the CSV and JSON understandable by atarashi.

    atarashi -a DLD -l /path/to/processedList.csv /path/to/file

    atarashi -a Ngram -l /path/to/processedList.csv -j /path/to/ngram.json /path/to/file


Running Docker image

  • Pull Docker image

    docker pull fossology/atarashi:latest

  • Run the image

    docker 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 /project in the container. Simply pass the options and path to the file relative to the mounted path.


Test

  • Run imtihaan (meaning Exam in Hindi) with the name of the Agent.

eg. python atarashi/imtihaan.py /path/to/processedList.csv <DLD|tfidf|Ngram> <testfile>

See python atarashi/imtihaan.py --help for more