Update README.md
Browse files
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 |
-
|
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 |
|
|
|
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 |
+
  map = json.load(f)<br>
|
31 |
+
  global map<br>
|
32 |
+
  def mapping(text):<br>
|
33 |
+
  for i in text:<br>
|
34 |
+
  try:<br>
|
35 |
+
  x = ' ' + map[i] + ' '<br>
|
36 |
+
  text = text.replace(i, x)<br>
|
37 |
+
  except:<br>
|
38 |
+
  continue<br>
|
39 |
+
  return text.strip()<br>
|
40 |
+
</code>code>
|
41 |
|
42 |
Step 2: Load model and generate
|
43 |
|