Skip to main content

A semantic search package for hotel data

Project description

Traversaal

Traversaal is a Python package that provides a simple semantic search functionality for hotel data. It leverages large language models such as BERT to encode hotel descriptions and reviews, allowing users to perform semantic search queries and retrieve relevant results based on the provided search query.

Features

  • Efficient semantic search for hotel data based on descriptions and reviews.
  • Utilizes state-of-the-art language models to encode and compare text embeddings.
  • Returns relevant search results with corresponding scores for ranking.
  • Supports GPU acceleration for faster encoding and search performance.

Installation

You can install Traversaal using pip:

pip install traversaal

import pandas as pd
import traversaal

model_name = 'bert-base-uncased'
search = traversaal.SemanticSearch(model_name)

df = pd.read_csv('hotels.csv')
query = 'great location and service'

embedding_df, results = search.search(df, query)

print("Embedding DataFrame:")
print(embedding_df.head())

print("\nSearch Results:")
print(results.head())


For more detailed usage examples and API documentation, please refer to the GitHub repository.

Contributing
Contributions to Traversaal are welcome! If you encounter any issues, have suggestions, or would like to contribute enhancements or new features, please feel free to submit a pull request on the GitHub repository.

License
Traversaal is licensed under the MIT License. See the LICENSE file for more details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

traversaal-0.5.tar.gz (1.9 kB view details)

Uploaded Source

Built Distribution

traversaal-0.5-py3-none-any.whl (1.8 kB view details)

Uploaded Python 3

File details

Details for the file traversaal-0.5.tar.gz.

File metadata

  • Download URL: traversaal-0.5.tar.gz
  • Upload date:
  • Size: 1.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for traversaal-0.5.tar.gz
Algorithm Hash digest
SHA256 54a126013ee148f90e71ea87292f1b622084164ec696ff377915cfb7a4d216d6
MD5 22249f9d15ddf2bf8a39bc6404d53463
BLAKE2b-256 f6c6da8d53965345701e13315538cabc4e5e9fa46ba40b521de9c12038306dfc

See more details on using hashes here.

File details

Details for the file traversaal-0.5-py3-none-any.whl.

File metadata

  • Download URL: traversaal-0.5-py3-none-any.whl
  • Upload date:
  • Size: 1.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for traversaal-0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 045bc085889e2adbf078b1594a31f6b96790027b4de52c7b3b5250b8115e4324
MD5 0c01c1dfb93fc5a7c9991aa889a2daf5
BLAKE2b-256 d9ef5d4dafba9b364c11452124f9e10aba72becd7533df340549f4634859d24f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page