Create README.md
Browse files
README.md
ADDED
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: mit
|
3 |
+
datasets:
|
4 |
+
- oscar
|
5 |
+
- mc4
|
6 |
+
language:
|
7 |
+
- am
|
8 |
+
library_name: transformers
|
9 |
+
---
|
10 |
+
# Amharic WordPiece Tokenizer
|
11 |
+
This repo contains a **WordPiece** tokenizer trained on the **Amharic** subset of the [oscar](https://huggingface.co/datasets/oscar) and [mc4](https://huggingface.co/datasets/mc4) datasets. It's the same as the **BERT** tokenizer but trained from scratch on an amharic dataset with a vocabulary size of `30522`.
|
12 |
+
|
13 |
+
# How to use
|
14 |
+
You can load the tokenizer from huggingface hub as follows.
|
15 |
+
```python
|
16 |
+
from transformers import AutoTokenizer
|
17 |
+
|
18 |
+
tokenizer = AutoTokenizer.from_pretrained("rasyosef/bert-amharic-tokenizer")
|
19 |
+
tokenizer.tokenize("α¨αααα αα αα» ααα΅ αα΅ααα΅ α΅α
αα΅α αααΈαα α αα°α¨αα α΅αα α αα± α αα αα£αͺα« ααα αα»α α₯α α¨αααααα΅ αα³α ααα’")
|
20 |
+
```
|
21 |
+
|
22 |
+
Output:
|
23 |
+
```python
|
24 |
+
['α¨ααα', '##α αα', 'αα»', 'ααα΅', 'αα΅ααα΅', 'α΅α
αα΅α', 'αααΈαα', 'α αα°α¨αα', 'α΅αα', 'α αα±', 'α αα', 'αα£αͺα«', 'ααα', 'αα»α', 'α₯α', 'α¨αααααα΅', 'αα³α', 'αα', 'α’']
|
25 |
+
```
|