Update README.md
Browse files
README.md
CHANGED
@@ -77,6 +77,24 @@ This model was trained and evaluated on the [Corpus of Contemporary Taiwanese Ma
|
|
77 |
- **驗證資料**:COCT 資料集的 20%
|
78 |
</details>
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
## Training Procedure
|
81 |
|
82 |
### Training Hyperparameters
|
|
|
77 |
- **驗證資料**:COCT 資料集的 20%
|
78 |
</details>
|
79 |
|
80 |
+
## Example
|
81 |
+
|
82 |
+
```python
|
83 |
+
from transformers import pipeline
|
84 |
+
|
85 |
+
model_checkpoint = "agentlans/zhtw-en"
|
86 |
+
translator = pipeline("translation", model=model_checkpoint)
|
87 |
+
|
88 |
+
# From Chinese Wikipedia's article of the day (摘自中文維基百科的今日文章)
|
89 |
+
translator("《阿奇大戰鐵血戰士》是2015年4至7月黑馬漫畫和阿奇漫畫在美國發行的四期限量連環漫畫圖書,由亞歷克斯·德坎皮創作,費爾南多·魯伊斯繪圖,屬跨公司跨界作品。")[0]['translation_text']
|
90 |
+
|
91 |
+
# Output (輸出)
|
92 |
+
# Acer's Iron Blood Fighter is a four-year series of comic books published in the United States by Black Horse and Ah Chi comics from April to July of that year. The book was created by Alexander d'Campie and painted by Philnanto Ruiz. It is a cross-firm work.
|
93 |
+
|
94 |
+
# Compare with my own gold standard translation: (與我自己的黃金標準翻譯比較:)
|
95 |
+
# "Archie vs. Predator" is a limited four-issue comic book series published by Black Horse and Archie Comics from April to July 2015. It was created by Alex de Campi and drawn by Fernando Ruiz. It's a crossover work.
|
96 |
+
```
|
97 |
+
|
98 |
## Training Procedure
|
99 |
|
100 |
### Training Hyperparameters
|