Downloads · 30 days
0
savath/laonlp-enhanced
laonlp-enhanced is a machine learning model from savath. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as mit.
A dictionary-based tokenizer for the Lao language, compatible with laonlp for POS tagging.
Downloads · 30 days
0
Access
Public
Updated Feb 21, 2025
Repo size
—
Likes
0
Public
Click a slice to open those files.
.json2.1 MB · 100%
From the Hugging Face model README
A dictionary-based tokenizer for the Lao language, compatible with laonlp for POS tagging.
Download the tokenizer file lao_tokenizer.json and use it with the PreTrainedTokenizerFast class from the transformers library. The tokenizer is built with a dictionary-based maximal matching approach.
from transformers import PreTrainedTokenizerFast
from laonlp_enhanced import tokenize, pos_tag
# Direct HF tokenizer (for encoding, less relevant here)
tokenizer = PreTrainedTokenizerFast(tokenizer_file="lao_tokenizer.json")
# Use laonlp-enhanced for actual tokenization
tokens = tokenize("ສະບາຍດີ 2025")
print(tokens)
print(pos_tag(tokens))
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.