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
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
Built Distribution
Close
Hashes for document_embedding-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13f1e48734378f0d8b32cdbb8a5f659e40ae83aff3971d8dc33b9607bdaf4007 |
|
MD5 | 0d073d8af5402be81ef4e4be822c9361 |
|
BLAKE2b-256 | 172d737983a591c09999d27b2cd801eda15b786a3eef12afed8ba7119fc2871c |