All Projects → suicao → Vn-Accent-Restorer

suicao / Vn-Accent-Restorer

Licence: other
This project applies multiple deep learning models to the problem of restoring diacritical marks to sentences in Vietnamese.

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Vn-Accent-Restorer

tensorflow-image-recognition-chrome-extension
Chrome browser extension for using TensorFlow image recognition on web pages
Stars: ✭ 88 (+282.61%)
Mutual labels:  tensorflow-experiments
RAE
基于tensorflow搭建的神经网络recursive autuencode,用于实现句子聚类
Stars: ✭ 12 (-47.83%)
Mutual labels:  tensorflow-experiments
OCR
Optical character recognition Using Deep Learning
Stars: ✭ 25 (+8.7%)
Mutual labels:  tensorflow-experiments
Machine-Learning
🌎 I created this repository for educational purposes. It will host a number of projects as part of the process .
Stars: ✭ 38 (+65.22%)
Mutual labels:  tensorflow-experiments
tensorflowjs-remove-background
Remove Background from the picture using WebAssembly & TensorFlow.js
Stars: ✭ 79 (+243.48%)
Mutual labels:  tensorflow-experiments
Awesome-Tensorflow2
基于Tensorflow2开发的优秀扩展包及项目
Stars: ✭ 45 (+95.65%)
Mutual labels:  tensorflow-experiments
Wgan
Tensorflow Implementation of Wasserstein GAN (and Improved version in wgan_v2)
Stars: ✭ 228 (+891.3%)
Mutual labels:  tensorflow-experiments
char-VAE
Inspired by the neural style algorithm in the computer vision field, we propose a high-level language model with the aim of adapting the linguistic style.
Stars: ✭ 18 (-21.74%)
Mutual labels:  tensorflow-experiments
hellotensor
f331 7h3 134rn
Stars: ✭ 17 (-26.09%)
Mutual labels:  tensorflow-experiments
Dog-or-Cat-TensorflowSharp-Example
An example for TensorflowSharp - classify an image as a dog or cat.
Stars: ✭ 15 (-34.78%)
Mutual labels:  tensorflow-experiments
TensorFlow-Multiclass-Image-Classification-using-CNN-s
Balanced Multiclass Image Classification with TensorFlow on Python.
Stars: ✭ 57 (+147.83%)
Mutual labels:  tensorflow-experiments
Age-Gender Estimation TF-Android
Age + Gender Estimation on Android with TensorFlow Lite
Stars: ✭ 34 (+47.83%)
Mutual labels:  tensorflow-experiments
neuroevolution-robots
Neuroevolution demo through TensorFlow.js, Neataptic, and Box2D
Stars: ✭ 31 (+34.78%)
Mutual labels:  tensorflow-experiments
EEG-Motor-Imagery-Classification-CNNs-TensorFlow
EEG Motor Imagery Tasks Classification (by Channels) via Convolutional Neural Networks (CNNs) based on TensorFlow
Stars: ✭ 125 (+443.48%)
Mutual labels:  tensorflow-experiments
deeper-traffic-lights
[repo not maintained] Check out https://diffgram.com if you want to build a visual intelligence
Stars: ✭ 91 (+295.65%)
Mutual labels:  tensorflow-experiments
Mixture Density Networks For Distribution And Uncertainty Estimation
A generic Mixture Density Networks (MDN) implementation for distribution and uncertainty estimation by using Keras (TensorFlow)
Stars: ✭ 249 (+982.61%)
Mutual labels:  tensorflow-experiments
stock-volatility-google-trends
Deep Learning Stock Volatility with Google Domestic Trends: https://arxiv.org/pdf/1512.04916.pdf
Stars: ✭ 74 (+221.74%)
Mutual labels:  tensorflow-experiments
VirtualBLU
A Virtual Assistant for Windows PC with wicked Qt Graphics.
Stars: ✭ 41 (+78.26%)
Mutual labels:  tensorflow-experiments
Tensorflow-Wide-Deep-Local-Prediction
This project demonstrates how to run and save predictions locally using exported tensorflow estimator model
Stars: ✭ 28 (+21.74%)
Mutual labels:  tensorflow-experiments
PSO in TensorFlow
PSO algorithm written in TensorFlow
Stars: ✭ 18 (-21.74%)
Mutual labels:  tensorflow-experiments

VN-Accent-Restorer

This project applies multiple deep learning models to the pointless problem of restoring diacritical marks to sentences in Vietnamese.

This is a work in progress.

E.g: do an dem trang beođồ ăn đêm trang béo

Beamsearch and Language Model

Using a language model, we basically try to guess the next word in the sequence using the previously decoded words to obtain one with the lowest perplexity. Since using a pure greedy algorithm will make us unable to correct a past mistake, beamsearch will be used along with it.

In this project I implemented two kind neural language models. The traditional RNN model [cite] and a modified version of the Transformer model (Vaswani et al), originally used for sequence to sequence tasks (Liu et al). Transformer vs Transformer-Decoder

Basically we throw away the encoder block, reducing training time and model size in half. Also in the final linear projection layer we try to re-use the word embedding table as the weight matrix (Press et al)

Although not explicitly mentioned in the original paper, without both attention blocks being masked i.e preventing information from the future to flow back to the current input, training a language model won't work. The model will cleverly learn to shift the input data to the left by one time step and converge very quickly, without actually understanding anything.

To test the result of Transformer language model:

python restore_accents.py --vocab_path ckpt_blog_td/vocab.txt --ckpt_path ckpt_blog_td --model t-d --saved_args_path ckpt_blog_td/args.pkl --prime "toi khong thich an gi ca"" --beam_size 3

To test the result of RNN language model:

python restore_accents.py --vocab_path ckpt_blog_gru/vocab.txt --ckpt_path ckpt_blog_gru --model rnn --saved_args_path ckpt_blog_gru/args.pkl --prime "toi khong thich an gi ca"" --beam_size 3

Sequence to Sequence Model

The same Transformer-Decoder can be used as a end-to-end solution to this problem by modifying the input and training target a little bit.

Transformer vs Transformer-Decoder

Note that we're not generating the output autoregressively like in the original Encoder-Decoder architecture. Instead we can simply generate the whole output sentence at once. This is fast, but at the cost of no flexibility e.g no beamsearch allowed.

python restore_accents.py --vocab_path ckpt_blog_td2/vocab.txt --ckpt_path ckpt_blog_td2 --model t-d-s2s --saved_args_path ckpt_blog_td2/args.pkl --prime "toi khong thich an gi ca""

Dataset and Training

Coming soon

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].