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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Transformer_Text_AutoEncoder-0.0.4.tar.gz.
File metadata
- Download URL: Transformer_Text_AutoEncoder-0.0.4.tar.gz
- Upload date:
- Size: 4.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
038d04495cb0cb38ad6521a31f06f5712a6a2f633bf65ada4383bc6a18f7a0ec
|
|
| MD5 |
39768d469862fb6eb71f6d962b336603
|
|
| BLAKE2b-256 |
19f97dd9d36ec8d1b362238d71b12813a4e282aacab1fc1eeeb8040243c8f0b4
|
File details
Details for the file Transformer_Text_AutoEncoder-0.0.4-py3-none-any.whl.
File metadata
- Download URL: Transformer_Text_AutoEncoder-0.0.4-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.9.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
132bf0aacf2f5d9a9a696cde6f1757d68b7c7bab6e3f3ef90c5a8a370f8bed8b
|
|
| MD5 |
3b12ade8344db5b804c308c69edf0aad
|
|
| BLAKE2b-256 |
c00c91417d99b8968adc6ff8979ca0de471cee8057e28bb2a1650ee1f54c84ee
|