Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

This program is a practical assignment focused on building a search engine for the poem "Rubaiyat" by Omar Khayyam. It involves several steps to achieve this:

Data Collection: Read words from 101 separate text files (one for each verse). Store each word along with its verse number in an ArrayList of WordLocation objects.

Sorting: Sort the ArrayList of WordLocation objects alphabetically by word using a Merge Sort algorithm.

Index Creation: Create an index that stores unique words along with their verse locations using a linked list. The linked list contains unique verse numbers and is sorted.

Search Processing: Implement a binary search to find words in the index. Perform an intersection merge on the linked lists to find common verses containing all search terms.

User Interaction: Continuously prompt the user for search terms. Display verses that contain all provided search terms by loading and showing the relevant files.

Tasks involve implementing different steps of the process, including reading files, sorting, inserting into linked lists, searching, and merging lists to enable efficient search functionality.

About

This program builds a search engine for Omar Khayyam's "Rubaiyat." It reads words from 101 text files, storing them with their verse numbers. It sorts the words, creates an index with linked lists, and uses binary search to find terms. It merges linked lists for search terms, displaying verses containing all terms.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages