# Summer Search
**summer-search** is a Python package that provides a simple interface for searching the web, extracting relevant content, and generating a summary based on the extracted information. The package leverages popular libraries such as `requests`, `BeautifulSoup`, and `transformers` to achieve its functionality.
## Installation
You can install the package using pip:
```cmd
pip install summer-search
```
### Requirements:
- **bs4 (Beautiful Soup 4):**
- **requests:**
- **transformers:**
- **sentencepiece:**
- **tensorflow:**
- **torch:**
> checkout the [requirements.txt](https://github.com/Cozmeh/SummerSearch/blob/main/requirements.txt)
```bash
pip install -r requirements.txt
```
Make sure to install these dependencies before using the `summer-search` package to ensure all the required libraries are available.
## Usage
```python
from SummerSearch import summerSearch
# Create an instance
searcher = summerSearch()
print("Ready to search and summarize!")
# Perform a search
while True:
# query to search
search_query = input("Enter a search query: ")
raw_paragraph = searcher.search(search_query=search_query,filter="fixed_index",filter_value=1)
print("Generating summary...")
#specifying the model
model = "t5-small"
#summerization
result = searcher.summarize(raw_paragraph, model)
# Print the results
print("\nSearch Query:", result["search_query"])
print("\nSummary:", result["summary"])
print("\nReference Link:", result["reference"])
print("\nLearn More Links:", result["learn_more"])
print("\nAdditional Links:", result["all_links"])
```
## Documentation
- `summerSearch` Class
#### Methods
- `search(search_query, filter="accuracy", filter_value=2)`: Performs a search and returns the raw paragraph.
- `search_query`: The user's search query.
- `filter`: Filtering option ("accuracy" or "fixed_index").
- `filter_value`: Value based on the selected filter (default is 2).
- `summarize(raw_paragraph, model)`: Summarizes the raw paragraph using a specified model.
- `raw_paragraph`: The raw text to be summarized.
- `model`: The summarization model to use.
## Summarization Models
The `summerSearch` class supports the following summarization models:
- **t5-small**: A small variant of the T5 (Text-to-Text Transfer Transformer) model for general and basic summaries.
- **facebook/bart-large-cnn**: The BART (BART: Denoising Sequence-to-Sequence Pre-training) model, specifically the large CNN variant, for general and more proper summaries.
- **kabita-choudhary/finetuned-bart-for-conversation-summary**: A fine-tuned BART model for conversation summaries.
Feel free to choose the model that best fits your requirements and experiment with different models to observe variations in summarization results.
## Notes
Feel free to explore and experiment with the package
- You can always contribute to the package!
- The package uses a combination of web scraping and summarization techniques to provide relevant information based on the user's search query.
- The `filter` and `filter_value` parameters in the `search` method allow users to customize the search process based on accuracy or a fixed index.
- The `summarize` method utilizes the Hugging Face Transformers library for text summarization.
Raw data
{
"_id": null,
"home_page": "",
"name": "summer-search",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,search,summerisation,summary,ml,information",
"author": "Cozmic (Hem Sainath)",
"author_email": "hemsainath15@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bc/1c/051e83fcdef9ae98c9a228693d018bb42ba4467ea9ff8bdcd76edc4350cf/summer-search-0.0.4.tar.gz",
"platform": null,
"description": "\r\n# Summer Search\r\n\r\n\r\n\r\n**summer-search** is a Python package that provides a simple interface for searching the web, extracting relevant content, and generating a summary based on the extracted information. The package leverages popular libraries such as `requests`, `BeautifulSoup`, and `transformers` to achieve its functionality.\r\n\r\n\r\n\r\n## Installation\r\n\r\n\r\n\r\nYou can install the package using pip:\r\n\r\n\r\n\r\n```cmd\r\n\r\npip install summer-search\r\n\r\n```\r\n\r\n\r\n\r\n\r\n\r\n### Requirements:\r\n\r\n\r\n\r\n- **bs4 (Beautiful Soup 4):**\r\n\r\n- **requests:**\r\n\r\n- **transformers:**\r\n\r\n- **sentencepiece:**\r\n\r\n- **tensorflow:**\r\n\r\n- **torch:**\r\n\r\n> checkout the [requirements.txt](https://github.com/Cozmeh/SummerSearch/blob/main/requirements.txt)\r\n\r\n ```bash\r\n\r\n pip install -r requirements.txt\r\n\r\n ```\r\n\r\n \r\n\r\n\r\n\r\nMake sure to install these dependencies before using the `summer-search` package to ensure all the required libraries are available.\r\n\r\n\r\n\r\n## Usage\r\n\r\n\r\n\r\n```python\r\n\r\nfrom SummerSearch import summerSearch\r\n\r\n\r\n\r\n# Create an instance\r\n\r\nsearcher = summerSearch()\r\n\r\nprint(\"Ready to search and summarize!\")\r\n\r\n\r\n\r\n# Perform a search\r\n\r\nwhile True:\r\n\r\n\r\n\r\n # query to search \r\n\r\n search_query = input(\"Enter a search query: \")\r\n\r\n raw_paragraph = searcher.search(search_query=search_query,filter=\"fixed_index\",filter_value=1)\r\n\r\n print(\"Generating summary...\")\r\n\r\n\r\n\r\n #specifying the model\r\n\r\n model = \"t5-small\"\r\n\r\n\r\n\r\n #summerization\r\n\r\n result = searcher.summarize(raw_paragraph, model)\r\n\r\n\r\n\r\n # Print the results\r\n\r\n print(\"\\nSearch Query:\", result[\"search_query\"])\r\n\r\n print(\"\\nSummary:\", result[\"summary\"])\r\n\r\n print(\"\\nReference Link:\", result[\"reference\"])\r\n\r\n print(\"\\nLearn More Links:\", result[\"learn_more\"])\r\n\r\n print(\"\\nAdditional Links:\", result[\"all_links\"])\r\n\r\n```\r\n\r\n\r\n\r\n## Documentation\r\n\r\n\r\n\r\n- `summerSearch` Class\r\n\r\n\r\n\r\n#### Methods\r\n\r\n\r\n\r\n- `search(search_query, filter=\"accuracy\", filter_value=2)`: Performs a search and returns the raw paragraph.\r\n\r\n - `search_query`: The user's search query.\r\n\r\n - `filter`: Filtering option (\"accuracy\" or \"fixed_index\").\r\n\r\n - `filter_value`: Value based on the selected filter (default is 2).\r\n\r\n\r\n\r\n- `summarize(raw_paragraph, model)`: Summarizes the raw paragraph using a specified model.\r\n\r\n - `raw_paragraph`: The raw text to be summarized.\r\n\r\n - `model`: The summarization model to use.\r\n\r\n \r\n\r\n\r\n\r\n## Summarization Models\r\n\r\n\r\n\r\nThe `summerSearch` class supports the following summarization models:\r\n\r\n\r\n\r\n- **t5-small**: A small variant of the T5 (Text-to-Text Transfer Transformer) model for general and basic summaries.\r\n\r\n\r\n\r\n- **facebook/bart-large-cnn**: The BART (BART: Denoising Sequence-to-Sequence Pre-training) model, specifically the large CNN variant, for general and more proper summaries.\r\n\r\n\r\n\r\n- **kabita-choudhary/finetuned-bart-for-conversation-summary**: A fine-tuned BART model for conversation summaries.\r\n\r\n\r\n\r\n\r\n\r\nFeel free to choose the model that best fits your requirements and experiment with different models to observe variations in summarization results.\r\n\r\n\r\n\r\n## Notes\r\n\r\nFeel free to explore and experiment with the package\r\n\r\n- You can always contribute to the package!\r\n\r\n- The package uses a combination of web scraping and summarization techniques to provide relevant information based on the user's search query.\r\n\r\n- The `filter` and `filter_value` parameters in the `search` method allow users to customize the search process based on accuracy or a fixed index.\r\n\r\n- The `summarize` method utilizes the Hugging Face Transformers library for text summarization.\r\n\r\n",
"bugtrack_url": null,
"license": "",
"summary": "Search and summarize the web with ease!",
"version": "0.0.4",
"project_urls": null,
"split_keywords": [
"python",
"search",
"summerisation",
"summary",
"ml",
"information"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "053cee2a5ea52a3e75daa9db601e0dc4269edaac90b876c82ec62e2757748cc2",
"md5": "acb037ee22b81ccfe777f8cac410bcca",
"sha256": "f4bb518d8b1ea61f2d6d90fd0e5642cf1aa18f0cfc5e7d56de048b633e7e2386"
},
"downloads": -1,
"filename": "summer_search-0.0.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "acb037ee22b81ccfe777f8cac410bcca",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4691,
"upload_time": "2023-11-12T10:27:15",
"upload_time_iso_8601": "2023-11-12T10:27:15.734306Z",
"url": "https://files.pythonhosted.org/packages/05/3c/ee2a5ea52a3e75daa9db601e0dc4269edaac90b876c82ec62e2757748cc2/summer_search-0.0.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bc1c051e83fcdef9ae98c9a228693d018bb42ba4467ea9ff8bdcd76edc4350cf",
"md5": "4e118737e98ca5e219cc977489f58577",
"sha256": "ff022ed9ab4d822c794ae0a344be2b74f06c10ce54b2c65712416b68072d3c12"
},
"downloads": -1,
"filename": "summer-search-0.0.4.tar.gz",
"has_sig": false,
"md5_digest": "4e118737e98ca5e219cc977489f58577",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4721,
"upload_time": "2023-11-12T10:27:17",
"upload_time_iso_8601": "2023-11-12T10:27:17.348224Z",
"url": "https://files.pythonhosted.org/packages/bc/1c/051e83fcdef9ae98c9a228693d018bb42ba4467ea9ff8bdcd76edc4350cf/summer-search-0.0.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-12 10:27:17",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "summer-search"
}