Giter Club home page Giter Club logo

file-indexing's Introduction

file-indexing

a small / simple search engine

objective : the tool analyses a text file and returns information about it's content , it can be considered as a simple search engine

illustration : this code uses an in-order linked list to build a file indexing and search engine service. The program will be passed a text file name and a file that contains commands. the code is expected to

  • read the input file word-by-word
  • each word is then inserted into the in-order list, along with the line number in which it exists in the file. First line in the file is line #1. Note: words are considered to be case insensitive

examples :

  • wordCount input: a4.exe FileName CommandsFile wordCount exists in the CommandsFile output: 1010 words

  • distWords input: a4.exe FileName CommandsFile distWords exists in the CommandsFile output: 10 distinct words

  • charCount input: a4.exe FileName CommandsFile charCount exists in the CommandsFile output: 50121 characters

  • frequentWord input: a4.exe FileName CommandsFile frequentWord exists in the CommandsFile output: Most frequent word is: book good

  • countWord input: a4.exe FileName CommandsFile countWord Nile exists in the CommandsFile output: Nile is repeated 50 times

  • starting input: a4.exe FileName CommandsFile starting Te exists in the CommandsFile output: Temporary 10 Tease 5

  • containing input: a4.exe FleName CommandsFile containing al exists in the CommandsFile output: al 5 shall 2

  • search input: a4.exe FileName CommandsFile search ne exists in the CommandsFile output: (separate word and line occurrences by tabs) neighbor: lines 5 62 123 network: lines 12 17 278 next: lines 110 114 119 1234

NOTES:

  • The following is a sample CommandFile wordCount distWords charCount containing mega countWord Biology ending migo ==> should produce "Unde�ned command" error search class

  • error handling is done using the following error messages
    File not found Undefined command Incorrect number of arguments

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.