GithubHelp home page GithubHelp logo

t-adedotun / inverted-index Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 127 KB

Contains an implementation of the Inverted Index data structure

Home Page: https://ta-inverted-index-production.herokuapp.com/

HTML 20.74% JavaScript 70.61% CSS 8.66%

inverted-index's Introduction

Inverted-Index

Build Status Coverage Status Code Climate

Staging App

Production App

This app allows users create inverted indices for documents in JSON files.

Technologies:

  • JavaScript
  • AngularJS
  • Twitter Bootstrap
  • Node.js

Features

  • Upload JSON file whose contents you want indexed
  • Indices are stored
  • Doesn't allow duplicate documents in JSON file
  • Keeps history of indexed files
  • Separate search queries with any character (punctation, whitespace etc.)

USING THE APP

There is a structure to JSON files this app accepts.

A valid JSON file is one that has this (EXACT) structure:

[
  {
    "title": "Alice in Wonderland",
    "text": "Alice falls into a rabbit hole and enters a world full of imagination."
  },
  {
    "title": "The Lord of the Rings: The Fellowship of the Ring.",
    "text": "An unusual alliance of man, elf, dwarf, wizard and hobbit seek to destroy a powerful ring."
  },
  {
    "title": "The Lord of the Rings: The Fellowship of the Ring.",
    "text": "An unusual alliance of man, elf, dwarf, wizard and hobbit seek to destroy a powerful ring."
  }
]
Uploading and Creating Index
  • Click on the 'Upload JSON' button
  • The 'Create Index' button and a selection of files uploaded appears after you upload valid file(s)
  • Select any file you want indexed and click on the 'Create Index' button
The Output

Once you've performed the above, a table is displayed containing a mapping of words and documents they appear in: Inverted Index Table

For files with duplicates like the example valid file above, duplicates are treated as one.

Duplicates in File

If, for example, one of the 'The Lord of the Rings: The Fellowship of the Ring.' has different content from the other, the table looks like this:

Duplicates with Different Contents

Documents with the same content but different titles, like in the first picture, are treated as separate documents. 'The Lord of the Rings: The Fellowship of the Ring.' and 'The Lord of the Rings' have the same content

Searching Through Indexed Documents
  • A selection of indexed files appears after creating indices, together with a search box.
  • Select a file whose documents you want to search through and type your search queries. (Search queries can be separated by any character. 'Alice,the-ring/el' is a valid search query.) You can also select 'All Files' to search through all indexed files.
  • Live search is implemented. You'll see search results as you type.
The Output

Search through one file: Search Result for One File

Search through all indexed files:

Search Result for All Files

Viewing History of Indexed Files

If, after using the app for the first time, you use it again, you don't have to upload already indexed files again to view or search through their indices. The app keeps a history of 15 most recently indexed files for you. A 'Recently Indexed' button appears on the next visit that contains a dropdown that contains your history.

Issue Tracker:

https://github.com/andela-tAdedotun/Inverted-Index/issues

Support

If you are having issues, please let me know. Mail me at: [email protected]

inverted-index's People

Watchers

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.