Skip to main content

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, ...])

Release files for document-embedding 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for document-embedding 0.0.1
File Size Uploaded
document-embedding-0.0.1.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for document-embedding 0.0.1
File Interpreter ABI Platform
document_embedding-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.7 kB

Release files / document-embedding-0.0.1.tar.gz

Download URL document-embedding-0.0.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
13da018fc42635ca56e72ed259ff729fcd20e46fb2016594ce56f8638e6453df
BLAKE2b-256 checksum
How to use checksums
fc1d10cdab5d52ae1c7bf234510ac8e5445234517b5359f7caaef32dcb38d692
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release files / document_embedding-0.0.1-py3-none-any.whl

Download URL document_embedding-0.0.1-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
13f1e48734378f0d8b32cdbb8a5f659e40ae83aff3971d8dc33b9607bdaf4007
BLAKE2b-256 checksum
How to use checksums
172d737983a591c09999d27b2cd801eda15b786a3eef12afed8ba7119fc2871c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/4.0.2 CPython/3.11.6

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page