filfreire / anagram

Two string checker for anagrams (with hardcore static analysis)

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

anagram

License: MIT Build Status codecov Codacy Badge

Two string checker for anagrams

Details

Two strings are anagrams if they are written using the same exact letters. For example, ‘Eleven plus two’ and ‘Twelve plus one’ are meaningful anagrams of each other.

Requirements

  • Maven 3 (using mvn 3.5.2 version)
  • Java 8 (using 1.8.0_131)

How to build

In terminal run command:

mvn clean install

How to run

After building, run:

./run.sh <first_sentence> <second_sentence>

# Example:
./run.sh "Eleven plus two" "Twelve plus one"

Or calling jar directly:

java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar <first_sentence> <second_sentence>

Examples:

java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar aaaa aaaa

Exact anagram: TRUE
Meaningful anagram: TRUE
java -jar target/anagram-1.0-SNAPSHOT-jar-with-dependencies.jar "Eleven plus two" "Twelve plus one"

Exact anagram: FALSE
Meaningful anagram: TRUE

Notes:

  • Using Cactoos library (link);
  • Using Qulice for "hardcore" static analysis (link);

About

Two string checker for anagrams (with hardcore static analysis)

License:MIT License


Languages

Language:Java 98.9%Language:Shell 1.1%