|
--- |
|
license: apache-2.0 |
|
language: |
|
- vi |
|
- zh |
|
metrics: |
|
- bleu |
|
library_name: transformers |
|
pipeline_tag: translation |
|
--- |
|
# viT5 for Sino-Vietnamese transliteration |
|
|
|
<!-- Provide a quick summary of what the model is/does. --> |
|
|
|
Finetuned model from viT5 for Chinese MMORPG translation. |
|
|
|
## Model Description |
|
|
|
<!-- Provide a longer summary of what this model is. --> |
|
|
|
Enhanced version from version 1.0 with larger dataset. |
|
|
|
## Uses |
|
### Default |
|
<!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. --> |
|
Step 1: Map all Chinese word from original text to Sino-Vietnamese with [map.json](https://huggingface.co/haruyuu/viT5_han-vie_v1.1/blob/main/map.json) file |
|
|
|
```python |
|
with open('/kaggle/input/chingchongdingdong/map.json', encoding = 'utf-8') as f: |
|
map = json.load(f) |
|
global map |
|
def mapping(text): |
|
for i in text: |
|
try: |
|
x = ' ' + map[i] + ' ' |
|
text = text.replace(i, x) |
|
except: |
|
continue |
|
return text.strip() |
|
``` |
|
|
|
Step 2: Load model and generate |
|
|
|
## Training Data |
|
|
|
<!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. --> |
|
|
|
450k rows of system notifications, names and conversations translated from Chinese MMORPG games. |