VOOZH about

URL: https://huggingface.co/ModelsLab/punctuate-indic-v1

⇱ ModelsLab/punctuate-indic-v1 · Hugging Face


This is based on Kredor's work. But the languages are: Telugu, Tamil, Malayalam, Kannada, Gujarathi, Panjabi, Marathi and Bengali.

----- report -----

 precision recall f1-score support

 0 0.99 0.99 0.99 18156530
 . 0.95 0.95 0.95 987478
 , 0.82 0.79 0.80 1064002
 ? 0.97 0.96 0.97 316902
 - 0.94 0.86 0.90 226991
 : 0.94 0.96 0.95 262314

accuracy 0.97 21014217
macro avg 0.93 0.92 0.93 21014217
weighted avg 0.97 0.97 0.97 21014217

----- confusion matrix -----

 t/p 0 . , ? - : 
 0 1.0 0.0 0.0 0.0 0.0 0.0 
 . 0.0 1.0 0.0 0.0 0.0 0.0 
 , 0.2 0.0 0.8 0.0 0.0 0.0 
 ? 0.0 0.0 0.0 1.0 0.0 0.0 
 - 0.1 0.0 0.0 0.0 0.9 0.0 
 : 0.0 0.0 0.0 0.0 0.0 1.0

Install

To get started install the package from pypi:

pip install deepmultilingualpunctuation

Restore Punctuation

from deepmultilingualpunctuation import PunctuationModel

model = PunctuationModel('ModelsLab/punctuate-indic-v1')
text = "హ్యారీ చాలా చిన్న వ్యవసాయ కలిగి ఒక పెద్ద పొలం కావాలని కలలు కనేవాడు ఒకసారి తన తండ్రి బిల్ ను అడిగాడు అక్కడి భూమి నాకు కావాలి నేను దాన్ని ఎలా పొందగలను"
result = model.restore_punctuation(text)
print(result)

output

హ్యారీ చాలా చిన్న వ్యవసాయ కలిగి ఒక పెద్ద పొలం కావాలని కలలు కనేవాడు ఒకసారి తన తండ్రి బిల్ ను అడిగాడు, అక్కడి భూమి నాకు కావాలి, నేను దాన్ని ఎలా పొందగలను?

Predict Labels

from deepmultilingualpunctuation import PunctuationModel

model = PunctuationModel('ModelsLab/punctuate-indic-v1')
text = "హ్యారీ చాలా చిన్న వ్యవసాయ కలిగి ఒక పెద్ద పొలం కావాలని కలలు కనేవాడు ఒకసారి తన తండ్రి బిల్ ను అడిగాడు అక్కడి భూమి నాకు కావాలి నేను దాన్ని ఎలా పొందగలను"
clean_text = model.preprocess(text)
labled_words = model.predict(clean_text)
print(labled_words)

output

['హ్యారీ', '0', 0.7721978], ['చాలా', '0', 0.9996537], ['చిన్న', '0', 0.9703038], ['వ్యవసాయ', '0', 0.99389863], ['కలిగి', '0', 0.66695035], ['ఒక', '0', 0.99995697], ['పెద్ద', '0', 0.9995778], ['పొలం', '0', 0.999982], ['కావాలని', '0', 0.9995049], ['కలలు', '0', 0.99998343], ['కనేవాడు', '0', 0.3442819], ['ఒకసారి', '0', 0.925744], ['తన', '0', 0.9999279], ['తండ్రి', '0', 0.82426786], ['బిల్', '0', 0.9998516], ['ను', '0', 0.99997056], ['అడిగాడు', ',', 0.55599153], ['అక్కడి', '0', 0.9996816], ['భూమి', '0', 0.9978115], ['నాకు', '0', 0.9999769], ['కావాలి', ',', 0.873619], ['నేను', '0', 0.99976164], ['దాన్ని', '0', 0.999979], ['ఎలా', '0', 0.99997866], ['పొందగలను', '?', 0.9895349]

Downloads last month
216
Safetensors
Model size
0.3B params
Tensor type
F32
·

Model tree for ModelsLab/punctuate-indic-v1

Quantizations
1 model

Dataset used to train ModelsLab/punctuate-indic-v1

Spaces using ModelsLab/punctuate-indic-v1 2