haruyuu commited on
Commit
40f8c84
·
1 Parent(s): 4e0427a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +15 -1
README.md CHANGED
@@ -21,10 +21,24 @@ Finetuned model from viT5 for Chinese MMORPG translation.
21
  Enhanced version from version 1.0 with larger dataset.
22
 
23
  ## Uses
24
-
25
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
26
  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
27
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  Step 2: Load model and generate
29
 
30
  ## Training Data
 
21
  Enhanced version from version 1.0 with larger dataset.
22
 
23
  ## Uses
24
+ ### Default
25
  <!-- Address questions around how the model is intended to be used, including the foreseeable users of the model and those affected by the model. -->
26
  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
27
 
28
+ <code>
29
+ with open('/kaggle/input/chingchongdingdong/map.json', encoding = 'utf-8') as f:
30
+ map = json.load(f)
31
+ global map
32
+ def mapping(text):
33
+ for i in text:
34
+ try:
35
+ x = ' ' + map[i] + ' '
36
+ text = text.replace(i, x)
37
+ except:
38
+ continue
39
+ return text.strip()
40
+ </code>
41
+
42
  Step 2: Load model and generate
43
 
44
  ## Training Data