Search Engine
Search Engine is a simple, efficient engine that builds a reverse index for keyword searching and ranks results using the PageRank algorithm.
⚙️ Installation
Please create a virtual environment using venv, as the project is still in alpha testing and in its initial implementations.
python3 -m venv .env
source .env/bin/activate
pip install search-engine-cpp
🚀 Usage
from search_engine.crawler import Crawler
crawler = Crawler("https://en.wikipedia.org", "/wiki/", "Cat", test_mode=True)
graph = crawler.run(limit=10)
my_dict = graph.compute_page_rank()
top = sorted(my_dict.items(), key=lambda item: item[1], reverse=True)[:3]
print(top)
📋 Requirements for Contributions
Before compiling the project, ensure your environment meets the following requirements:
- CMake 3.10 or higher
- Google Test for unit testing
- A C++11 compatible compiler or higher
📂 Project Structure
The project is organized as follows:
src/: Main implementation of the search engine, including reverse indexing and the PageRank algorithm.tests/: Unit tests to verify the functionality of the system.CMakeLists.txt: Configuration file for building the project with CMake.
🔧 Building the Project
To compile the project, follow these steps:
-
Create a
builddirectory and navigate into it:mkdir build && cd build
-
Run CMake to generate the build files:
cmake .. -
Compile the project using make:
make
🧪 Running Tests for Contributions
Run unit tests to ensure the correctness of the system.
-
After building the project, navigate to the
builddirectory and execute:./tests/unit-tests/LibUnitTests
This will run the tests covering search engine functionality, reverse indexing, and the PageRank algorithm.
🏃 Running Examples for Contributions
The first step is building the project, for this to run:
poetry install
poetry build
After building it, run this command to see the library working:
poetry run python Examples/graph_example.py
⚙️ How It Works
- Reverse Indexing: Maps keywords to the documents where they appear.
- PageRank: An algorithm that assigns a relevance score to each document based on its links and structure.
- Querying: Searches for documents related to a keyword and ranks them according to their PageRank score.
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
👥 Contributors
We welcome all contributions to this project! Please make sure to follow the guidelines outlined in the CONTRIBUTING.md file.
Thanks to all contributors
Made with contrib.rocks.
Keep learning,
Pedro;)
Metadata
Release files for search-engine-cpp 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| search_engine_cpp-0.2.0.tar.gz | 197.4 kB | Without provenance | Details for search_engine_cpp-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| search_engine_cpp-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.39+ x86-64 | Details for search_engine_cpp-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl |
Total release size: 1.1 MB
Release files / search_engine_cpp-0.2.0.tar.gz
| Download URL | search_engine_cpp-0.2.0.tar.gz |
|---|---|
| Size | 197.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cf003b332d31b42ca94234adc3b04cca32b2e25dc13e5d6f499c272626b66192
|
|
BLAKE2b-256 checksum How to use checksums |
5f8a727b4fb5458dda9bd5300957cbcd69895f568b0df0f5bf18987adf27c560
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure
|
Release files / search_engine_cpp-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl
| Download URL | search_engine_cpp-0.2.0-cp311-cp311-manylinux_2_39_x86_64.whl |
|---|---|
| Size | 909.3 kB |
| Tags | CPython 3.11 Linux glibc 2.39+ x86-64 |
|
SHA-256 checksum How to use checksums |
aacb5e5a84e05d27548496eb908bf4496f4e9affa0d6d5465df5587c76930c8a
|
|
BLAKE2b-256 checksum How to use checksums |
a3550e763fd7e945a2b7cf92c1cd4b50d25d57929d5f0668242259164dfd0f54
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.0.1 CPython/3.11.11 Linux/6.8.0-1017-azure
|
Security for search-engine-cpp 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.