Giter Club home page Giter Club logo

say-what-you-will's Introduction

Autocomplete Problem

To Run

ruby lookup_file.rb list of strings to auto complete separated by spaces

Create a Ruby library that can autocomplete word fragments using a text file as the data source.

  • You should be able to index the autocomplete-able words from any text file (feel free to ignore non-word entities like numbers)
  • When returning the list of autocompleted words for a word fragment, it should order the words by their frequency (most frequent first)
  • It should also return the frequency of each word as part of the results
  • It should return no more than 25 results for any word fragment
  • Use the provided complete works of Shakespeare and include your results for the following fragments: th, fr, pi, sh, wu, ar, il, ne, se, pl

There are various decisions and minor differences that go into different solutions, so don't worry about precise results matching up with our own โ€“ we're not going to evaluate it like that. Also, I'm not going to give you specific class/module structure since I think these decisions are part of the problem. We'll be evaluating your solution based on your approach to the problem (algorithm), readability/maintainability/style, and performance characteristics. Only include any tests if it helps you, we won't penalize or judge you for not having them.

Just send back a tar'd gzip of your solution, with any instructions if necessary with how to use it. If you have any questions, feel free to Skype or email me.

NOTE: You must use pure Ruby - no third-party gems, data stores, etc. However, feel free to use any reference resources, just make sure to cite anything you use (aside from the obvious Ruby docs, etc).

say-what-you-will's People

Contributors

blue-dog-archolite avatar

Watchers

 avatar James Cloos 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.