Transformer Text AutoEncoder: An autoencoder is a type of artificial neural network used to learn efficient encodings of unlabeled data, the same is employed for textual data employing pre-trained models from the hugging-face library.
Project description
Transformer-Text-AutoEncoder
Transformer Text AutoEncoder: An autoencoder is a type of artificial neural network used to learn efficient encodings of unlabeled data, the same is employed for textual data employing pre-trained models from the hugging-face library.
Installation:
pip install Transformer-Text-AutoEncoder
Execution:
from Transformer_Text_AutoEncoder.AutoEncoder import TTAE
def read(path='./data/FinancialNews.txt'):
with open(path, "r", encoding='utf-8', errors='ignore') as f:
data = [i.strip() for i in f.readlines()]
return data
sentences = read()
print(sentences[:3])
ttae = TTAE(sentences)
ttae.train(10, batch_size=1)
print(ttae.predict("According to Gran , the company has no plans to move all production to Russia , although that is where the company is growing ."))
returns the predicted sentence
as well as the embeddings
.
Cite Work:
@inproceedings{ttae,
title = {Transformer-Text-AutoEncoder},
author = {Aman Priyanshu},
year = {2022},
publisher = {{GitHub}},
url = {https://github.com/AmanPriyanshu/Transformer-Text-AutoEncoder/}
}
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
Built Distribution
Close
Hashes for Transformer_Text_AutoEncoder-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2496bc116978a50759158e56a7efa1e5e7b4af491d396a304583122767a65412 |
|
MD5 | 5f4aafbdc8a3a5e554034e6cd18be910 |
|
BLAKE2b-256 | cee52b328733a6b3dc4e77203fac6649d683ffeb2bc7c5c7a72f832cac2d67aa |
Close
Hashes for Transformer_Text_AutoEncoder-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b4ef0f8a2f035dccd42d9f968b710cea891ad860a9ebfe5090e56d37219ca25d |
|
MD5 | 90aefc1a12427d68c67ef4078bee1248 |
|
BLAKE2b-256 | c9e5f05743ff3edc6415555c85119f99cd98fbbe6552f6cbe2d653a4687c5bb3 |