Coder Social home page Coder Social logo

anagram's Introduction

Anagram Detection

Status GitHub Issues GitHub Pull Requests License


List all anagrams of words contained within a file

๐Ÿ“ Table of Contents

Additional Documentation

About

Two words are defined as anagrams if they do share the same letters, but are in a different order (i.e. the English words race and care are anagrams).
Given an input file which contains one word per line, as an output construct a list of all anagrams from that input file. Print those words to the console, where all words that are an anagram should each other should be on the same line.

For ease of coding i reduced the language of words to english

This project contains 2 solutions now and 1 additional implementation example

I reimplemented parts of the solution found in the module solution in a new module requestresponse.

I felt that was necessary because, during writing the tests i discovered that the initial solution was to complicated, and did not even fulfill my requirements on a good service.

But as you can see, i only change the App with the main class, and the controlling service. I also had to change the interface here, so i could not use an alternative.

I used the initial module solution as a dependency on the new module requestresponse. As i was using a new weld se implementation, the namespace was already migrated to Jakarta.

But in the Quarkus example, i sadly had to copy all classes into the module, as quarkus does not have Jakartanamespace changes ready for now (or i was not apble to find it).

Github Pages

More Details on exploration, decision and implementation: Github - Github Pages

๐Ÿ Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Prerequisites

This project is based on:

  • jdk17
  • git
  • Apache Maven 3.8.4

To get the code please clone from Github: https://github.com/dragondiver/anagram.git

git clone https://github.com/dragondiver/anagram.git

Installing

Change into folder anagram and build using maven

mvn clean package

๐Ÿ”ง Setting up testdata

CChange into folder testdata. There is a file called setup.sh, ensure that you can execute it. This file uses the english dictionary, that is build into macos.

If you are running another OS please check, if you can find this file somewhere in the internet and dowonload it. Adjust setup.sh afterwards.

After you executed setup.sh you should find 3 files in folder testdata:

./setup.sh
rm: englishwords.txt: No such file or directory
rm: manyenglishwords.txt: No such file or directory
rm: awholelotofenglishwords.txt: No such file or directory
  235886 englishwords.txt
 11794300 manyenglishwords.txt
       7 sample.txt
       4 setup.sh
 12030197 total
Name Wordcount
sample.txt 7
englishwords.txt 235886
manyenglishwords.txt 11794300

๐Ÿ”ง Running the tests

mvn clean verify

๐ŸŽˆ Usage

Run Anagram with a testdatafile from anagram project root folder:

./scripts/runSolution.sh testdata/englishwords.txt

๐Ÿชฒ Troubleshooting

You can check the logfiles in ./logs

โ›๏ธ Built Using

  • Weld SE - CDI Implementation for Java SE
  • VueJs - Web Framework for Documentation

โœ๏ธ Authors

anagram's People

Contributors

dragondiver avatar

Watchers

 avatar

anagram's Issues

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.