Skip to main content

No project description provided

Project description

Document Embeddings

Based on the results of: https://arxiv.org/abs/2304.14796

Implemented Methods

  • Average Pooling, with adjustable range for sentences used.
  • PERT weighted average pooling

Usage

Wrapper for Sentence-Embedding, which is used to provide embedding functionality

from sentence_transformers import SentenceTransformer

sentence_model = SentenceTransformer("paraphrase-multilingual-MiniLM-L12-v2")

document_model = AverageDocumentEmbedding(sentence_model, language='german')


doc1 = "Arbitrary text"
doc2 = "..."

document_model.encode([doc1, doc2, ...])

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

document-embedding-0.0.1.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

document_embedding-0.0.1-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file document-embedding-0.0.1.tar.gz.

File metadata

  • Download URL: document-embedding-0.0.1.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.6

File hashes

Hashes for document-embedding-0.0.1.tar.gz
Algorithm Hash digest
SHA256 13da018fc42635ca56e72ed259ff729fcd20e46fb2016594ce56f8638e6453df
MD5 3d543a002099f61758d63312f7fe2532
BLAKE2b-256 fc1d10cdab5d52ae1c7bf234510ac8e5445234517b5359f7caaef32dcb38d692

See more details on using hashes here.

File details

Details for the file document_embedding-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for document_embedding-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 13f1e48734378f0d8b32cdbb8a5f659e40ae83aff3971d8dc33b9607bdaf4007
MD5 0d073d8af5402be81ef4e4be822c9361
BLAKE2b-256 172d737983a591c09999d27b2cd801eda15b786a3eef12afed8ba7119fc2871c

See more details on using hashes here.

Supported by

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