Giter Site home page Giter Site logo

fridaychallenge's Introduction

Friday Coding Challenge

How to run:

  • Via Gradle:
    Use $ ./gradlew run --args="\"<address input here>\""" (dont forget the escaped quotes)
    The resulting JSON will be printed out to the command line.

    Use $ ./ gradlew test to run tests.

  • Via IDE (IntelliJ):
    Run the main class with the input string as the parameter, wrapped in quotes.
    You will need to enable annotation processing for Lombok to work, I would also
    recommend to install the Lombok plugin for IntelliJ.

Thoughts on the task:

The way I realized the task is via Regex. This is not an ideal solution of course, because there
are nearly infinitely many address formats in the world which cannot be covered completely
this way.
It would also be possible to use some kind of heuristic on the tokenized string, which would run
into similar problems as the regex.
The best way would be to have a database of existing addresses and to query the input string against it to find a best match.
In any case, the best way would be to just call an existing Geocoding API, but that
felt a little like cheating :) In a real world scenario this would have been my preferred option, though.

fridaychallenge's People

Watchers

Maximilian Lösch avatar

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.