This project is a command-line application that allows users to search for movies by genre, rating, length, or name. The application uses an inverted index hash to store and retrieve movie data efficiently.
- Search for movies by genre, rating, length, or name.
- Display search results in a user-friendly format.
- Exit the application gracefully.
- Clone the repository:
git clone https://github.com/yourusername/moviesearchapp.git cd moviesearchapp
- Ensure you have Python installed (version 3.6 or higher).
- Run the application:
python main.py
- Follow the on-screen instructions to search for movies.
Reccomendation_Software.py
: Contains the main logic of the application.Inverted_Index_Hash.py
: Contains functions to create and query the inverted index.Movie_Data.py
: Contains the movie data used by the application.
- Initializes the hash table.
- Displays a welcome message.
- Prompts the user for search input and displays results.
- Prints a welcome message to the user.
- Determines the type of input (genre, rating, length, or name) based on the user's input.
- Prints the search results in a formatted manner.
- Creates dictionaries to store movie data indexed by genre, name, rating, and length.
- Returns a list of movies that match the specified genre.
- Returns a list of movies that match the specified rating.
- Returns a list of movies that fall within the specified length range.
- Returns a list of movies that match the specified name.
The movie data is stored in a list of lists, where each sublist contains the following information about a movie:
- Genre
- Name
- Rating
- Length
Example:
movie_data = [
['drama', 'The Shawshank Redemption', '9.3', '142'],
['crime', 'The Godfather', '9.2', '175'],
...
]
- Fork the repository.
- Create a new branch:
git checkout -b feature-branch
- Make your changes and commit them:
git commit -m 'Add some feature'
- Push to the branch:
git push origin feature-branch
- Open a pull request.