Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).
Project description
Deep Text Search - AI Based Text Search & Recommendation System
Deep Text Search is an AI-powered multilingual text search and recommendation engine with state-of-the-art transformer-based multilingual text embedding (50+ languages).
Creators
Nilesh Verma
Features
- Faster Search.
- High Accurate Text Recommendation and Search Output Result.
- Best for Implementing on python based web application or APIs.
- Best implementation for College students and freshers for project creation.
- Applications are Text-based News, Social media post, E-commerce Product recommendation and other text-based platforms that want to implement text recommendation and search.
Installation
This library is compatible with both windows and Linux system you can just use PIP command to install this library on your system:
pip install DeepTextSearch
How To Use?
We have provided the Demo folder under the GitHub repository, you can find the example in both .py and .ipynb file. Following are the ideal flow of the code:
1. Importing the Important Classes
There are three important classes you need to load LoadData - for data loading, TextEmbedder - for embedding the text to data, TextSearch - For searching the text.
# Importing the proper classes
from DeepTextSearch import LoadData,TextEmbedder,TextSearch
2. Loading the Texts Data
For loading the Texts data we need to use the LoadData object, from there we can import text data as python list object from the CSV/Text file.
# Load data from CSV file
data = LoadData().from_csv("../your_file_name.csv")
# Load data from Text file
data = LoadData().from_text("../your_file_name.txt")
3. Embedding and Saving The File in Local Folder
For Embedding we are using state of the art multilingual Sentence Transformer Embedding, We also store the information of the Embedding for further use on the local path [embedding-data/] folder.
You can also use the load embedding() method in a TextEmbedder() class to load saved embedding data.
# To use Serching, we must first embed data. After that, we must save all of the data on the local path.
TextEmbedder().embed(corpus_list=data)
# Loading Embedding data
corpus_embedding = TextEmbedder().load_embedding()
3. Searching
We compare Cosian Similarity for searching and recommending, and then the corpus is sorted according to the similarity score:
# You must include the query text and the quantity of comparable texts you want to search for.
TextSearch().find_similar(query_text="What are the key features of Node.js?",top_n=10)
Complete Code
# Importing the proper classes
from DeepTextSearch import LoadData,TextEmbedder,TextSearch
# Load data from CSV file
data = LoadData().from_csv("../your_file_name.csv")
# To use Serching, we must first embed data. After that, we must save all of the data on the local path
TextEmbedder().embed(corpus_list=data)
# You must include the query text and the quantity of comparable texts you want to search for
TextSearch().find_similar(query_text="What are the key features of Node.js?",top_n=10)
License
MIT License
Copyright (c) 2021 Nilesh Verma
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please do STAR the repository, if it helped you in anyway.
More cool features will be added in future. Feel free to give suggestions, report bugs and contribute.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file DeepTextSearch-0.3.tar.gz
.
File metadata
- Download URL: DeepTextSearch-0.3.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 874f7105389a147f1d8d3d6d0c02607e0d20d5d433edfadc94447c60d0ec3c9b |
|
MD5 | ad263e1f84e73fc1c14a84aedaab82de |
|
BLAKE2b-256 | 897a9ae8e9e3c2476cdeebd4a9372ef2be8b45941453445202c86483b2075369 |