savath commited on
Commit
8375f5a
·
1 Parent(s): 0638d01

Initial commit of Lao tokenizer

Browse files
Files changed (2) hide show
  1. README.md +33 -3
  2. lao_tokenizer.json +0 -0
README.md CHANGED
@@ -1,3 +1,33 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Lao Tokenizer
2
+
3
+ A dictionary-based tokenizer for the Lao language, compatible with `laonlp` for POS tagging.
4
+
5
+ ## Usage
6
+ ```python
7
+ from transformers import PreTrainedTokenizerFast
8
+ from laonlp import pos_tag
9
+ from laonlp_enhanced import tokenize # Optional: use the library
10
+
11
+ # Direct HF tokenizer (for encoding, less relevant here)
12
+ tokenizer = PreTrainedTokenizerFast(tokenizer_file="lao_tokenizer.json")
13
+ # Use laonlp-enhanced for actual tokenization
14
+ tokens = tokenize("ສະບາຍດີ 2025")
15
+ print(tokens)
16
+ print(pos_tag(tokens))
17
+ ```
18
+ ## Reference
19
+ - [laonlp](Wannaphong Phatthiyaphaibun. (2022). LaoNLP: Lao language Natural Language Processing. Zenodo. https://doi.org/10.5281/zenodo.6833407)
20
+
21
+
22
+ ## License
23
+ Licensed under the Apache License, Version 2.0 (the "License");
24
+ you may not use this file except in compliance with the License.
25
+ You may obtain a copy of the License at
26
+
27
+ http://www.apache.org/licenses/LICENSE-2.0
28
+
29
+ Unless required by applicable law or agreed to in writing, software
30
+ distributed under the License is distributed on an "AS IS" BASIS,
31
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
32
+ See the License for the specific language governing permissions and
33
+ limitations under the License.
lao_tokenizer.json ADDED
The diff for this file is too large to render. See raw diff