Downloads · 30 days
32
17% of all-time downloads
shantipriya/OdiaTokenizer
OdiaTokenizer is a machine learning model from shantipriya. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as cc-by-nc-sa-4.0.
This repository hosts the SentencePiece tokenizer model for the Odia language, created to support the efficient tokenization of Odia text in NLP applications. The tokenizer was built using a diverse dataset of Odia te…
Downloads · 30 days
32
17% of all-time downloads
All-time downloads
193
Public
Repo size
1.4 MB
Likes
1
Public
Click a slice to open those files.
.model1.4 MB · 51%
From the Hugging Face model README
This repository hosts the SentencePiece tokenizer model for the Odia language, created to support the efficient tokenization of Odia text in NLP applications. The tokenizer was built using a diverse dataset of Odia text, ensuring comprehensive language coverage and accurate tokenization.
odia_tokenizers_testodia_tokenizers_test.model: SentencePiece tokenizer model file.odia_tokenizers_test.vocab: Vocabulary file containing all token mappings.To load and use this tokenizer model, make sure you have the sentencepiece package installed:
pip install sentencepiece
import sentencepiece as spm
from huggingface_hub import hf_hub_download
# Download the model file from Hugging Face
model_path = hf_hub_download(repo_id="shantipriya/OdiaTokenizer", filename="odia_tokenizers_test.model")
# Load the tokenizer model
sp = spm.SentencePieceProcessor()
sp.load(model_path)
# Sample text for tokenization
text = "ଦୀପାବଳି ଏକ ଭାରତୀୟ ପର୍ବ ।"
# Tokenize the text into pieces (subwords or tokens)
tokens = sp.encode_as_pieces(text)
# Tokenize the text into token IDs (integer representations of the tokens)
token_ids = sp.encode_as_ids(text)
# Print the tokenized output
print("Tokens:", tokens)
print("Token IDs:", token_ids)
The model has been specifically trained on a diverse corpus of Odia text, ensuring high-quality tokenization results. Here’s an example of how the model tokenizes Odia sentences:
Input: ଦୀପାବଳି ଏକ ଭାରତୀୟ ପର୍ବ ।
Tokens: ['▁ଦୀପାବଳି', '▁ଏକ', '▁ଭାରତୀୟ', '▁ପର୍ବ', '▁।']
Token IDs: [1234, 5678, 91011, 121314, 1516] (example IDs)
The vocabulary size was chosen to balance memory efficiency with language coverage, making it suitable for applications ranging from language modeling to text classification.
The tokenizer was trained using the SentencePiece library with the following configurations:
Model Training Parameters:
shuffle_input_sentence=Truesplit_by_unicode_script=Truesplit_by_whitespace=Truebyte_fallback=TrueThis model is intended for use in various NLP applications involving the Odia language, such as:
This model is released under the cc-by-nc-sa-4.0 License.
This model was developed as part of a project to support low-resource language processing. Thanks to OdiaGenAI for providing the initial training data, which made this model possible.