- The main function in keywordcounter.java reads the input file name, opens it and creates a write file called “output_file.txt”.
- If a line starts with $, it reads the string as an input, else as a query.
- If the keyword in input already exists, it calls increaseKey for that keyword, else it creates a new Node object and calls insert.
- If it is a query, it tries to parse it as an integer. If an exception occurs, it closes the files and exits else it calls removeMax for the number of times mentioned in the query. It inserts the obtained max again into the Fibonacci Heap after writing them to the output file.
-
Notifications
You must be signed in to change notification settings - Fork 0
Implemented Max Fibonacci Heap in Java to fetch most frequently searched keywords in a search engine. New keywords that appear in a search query are added to the Max Fibonacci heap with occurrence count as 1 and the occurrence count of a keyword is incremented if it reappears in a search query. At any instance, the Max Fibonacci heap can return …
sourabhparvatikar/keyword-frequency-in-search-engine
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
Implemented Max Fibonacci Heap in Java to fetch most frequently searched keywords in a search engine. New keywords that appear in a search query are added to the Max Fibonacci heap with occurrence count as 1 and the occurrence count of a keyword is incremented if it reappears in a search query. At any instance, the Max Fibonacci heap can return …
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published