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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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