Code Monkey home page Code Monkey logo

text-search's Introduction

Text Search

How To Run

  • This is a Spring Boot Maven project using java 8.
  • Project is running on port 8080.
  • The API call is endpoint is
    http://localhost:8080/api/v1/words?similar=
  • The word whose frequency and similar words are to be determined is the Request Parameter similar= e.g similar=Word
  • The Request Body should be
    {
        "text":"Word Word Word word"
    }
  • The Response should be
    {
        "similarWords": [
            "word"
        ],
        "wordFrequency": 3
    }

Scope of Project

  • I've implemented text search using Apache Lucene which has a lot of features.
  • The time taken for me to develop this API was 3 hours which mostly involved reading Apache Lucene docs and testing different implementations.
  • It is intentionally case-senstive e.g word and Word are currently considered as similar but not equal.
  • The reason for choosing Apache Lucene is that even if we want to make changes later on e.g to add case sensitivity, it would be easy to do so by just changing the tokenizer.

How to bring solution further

  • I took the liberty to make an extra change of disregarding commas while detecting words.
  • Currently the API can detect words regardless of commas, e.g in text word, Word frequency of word would be 1;
  • Given more time I would have liked to test it using further punctuations like . ? : " " etc.

text-search's People

Contributors

mhdzaid avatar

Watchers

 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.