haruyuu commited on
Commit
6e3bd04
1 Parent(s): 6a21264

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +13 -13
README.md CHANGED
@@ -25,19 +25,19 @@ Enhanced version from version 1.0 with larger dataset.
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:<br>
30
- &emsp; map = json.load(f)<br>
31
- &emsp; global map<br>
32
- &emsp; def mapping(text):<br>
33
- &emsp; for i in text:<br>
34
- &emsp; try:<br>
35
- &emsp; x = ' ' + map[i] + ' '<br>
36
- &emsp; text = text.replace(i, x)<br>
37
- &emsp; except:<br>
38
- &emsp; continue<br>
39
- &emsp; return text.strip()<br>
40
- </code>code>
41
 
42
  Step 2: Load model and generate
43
 
 
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
+ '''python
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
+ '''
41
 
42
  Step 2: Load model and generate
43