Skip to content

Arabic deep-learning based diacritization models (Shakkala, Shakkelha) ported to PyTorch

Notifications You must be signed in to change notification settings

nipponjo/arabic-vocalization

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Arabic deep-learning based diacritization models (Shakkala, Shakkelha) ported to PyTorch.

# %% load models
from models import Shakkala, Shakkelha

shakkala = Shakkala(sd_path='./data/shakkala_second_model6.pth')
shakkelha = Shakkelha(sd_path='./data/shakkelha_rnn_3_big_20.pth')

# %% unvocalized input
input_text = "اللغة العربية هي أكثر اللغات السامية تحدثا، وإحدى أكثر اللغات انتشارا في العالم، يتحدثها أكثر من 467 مليون نسمة"

# %% shakkala output
out_shakkala = shakkala.predict(input_text)
print(out_shakkala)
>> اللُّغَةُ الْعَرَبِيَّةُ هِيَ أَكْثَرُ اللُّغَاتِ السَّامِيَةِ تَحَدُّثًا، وَإِحْدَى أَكْثَرِ اللُّغَاتِ انْتِشَارًا فِي الْعَالِمِ، يَتَحَدَّثُهَا أَكْثَرُ مَنْ 467 مُلْيُونُ نُسْمَةَ

# %% shakkelha output
out_shakkelha = shakkelha.predict(input_text)
print(out_shakkelha)
>> اللُّغَةُ الْعَرَبِيَّةُ هِيَ أَكْثَرُ اللُّغَاتِ السَّامِيَةِ تَحَدُّثًا، وَإِحْدَى أَكْثَرِ اللُّغَاتِ انْتِشَارًا فِي الْعَالِمِ، يَتَحَدَّثُهَا أَكْثَرُ مِنْ 467 مَلْيُونٍ نَسَمَةً

About

Arabic deep-learning based diacritization models (Shakkala, Shakkelha) ported to PyTorch

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages