If you have no idea of Boolean Search then follow the link below to Find about it before Proceeding.
What is Boolean Searching?
This Program is made in C++ which work on Basic principals of Boolean Expressions.Prerequisite Of Program:
- Advance Knowledge of File Handling
- Basic Knowledge of dll(dynamic link library) files how to create and use them.
- Well aware of String Functions
- Object Oriented Programming

Step By Step Work of Program:
This program perform Following operation on data which are stated below.
Preprocessing:
- Convert all alphabets to low order.
- Remove special Characters.
- Remove lines less then 3 words
Indexing:
Assign index to data of each File
For example there is data some thing like that in a File
"Programming is Core subject of Computer science"
so after indexing it save like below in file
so after indexing it save like below in file
Programming 1
is 1
Core 1
subject 1
of 1
computer 1
science 1
and in a final file named index file which contain all files data indexed some thing like below
Programming 1
games 23
play 7
hero 189
1,23,7,189 are file names from where these words are selected
Sorting:
In this step all data of indexed file is sorted in alphabetically order
Posting:
In this step all word are assigned their posting position with frequency For Example:
programming is appeared 5 times in all files so its frequency is 5 and it saved like below in posting file
programming 1,56,87,2,4
Search:
Now we are ready to give search queries to Program. we can give 4 types of queries to Program
- Single word
- word and word
- word or word
- word not word
1.For Single word query program shows the result of that query file name,position and frequency
2.For "and" operator e.g
"programming and fun"
Now it works on basic principles of boolean expressions the query will only be truw if both word are present in any file and it shows that file number and frequency
3.For "OR" operator if only one word is found then expression become true.
4.For "Not" operator now condition is true and search results of that files are shown who contain "Programming NOT game" mean that file have word programming and not game.
How to Run the program
- Download Rar file and Extract it
- Create New project using console application in Visual studio
- Now open boolean_search.cpp file using note pad and copy all the code and paste to your newly created project editor
- Copy search.dll and hellodll.h and all txt files to folder where your .cpp file is located usually in documents>>visualstudio>>projects>>projectname>>projectname>>and paste here
- Compile the Program and Run
0 comments:
Post a Comment