https://github.com/akpe12/JP-KR-ocr-translator-for-travel

- Usage
```
from transformers import(
    EncoderDecoderModel,
    PreTrainedTokenizerFast,
    # XLMRobertaTokenizerFast,
    BertTokenizerFast,
)

encoder_model_name = "cl-tohoku/bert-base-japanese-v2"
decoder_model_name = "skt/kogpt2-base-v2"

src_tokenizer = BertTokenizerFast.from_pretrained(encoder_model_name)
trg_tokenizer = PreTrainedTokenizerFast.from_pretrained(decoder_model_name)
model = EncoderDecoderModel.from_pretrained("figuringoutmine/translator-for-travel-jp-to-kr")
```

```
text = "豚骨ラーメン"
embeddings = src_tokenizer(text, return_attention_mask=False, return_token_type_ids=False, return_tensors='pt')
embeddings = {k: v for k, v in embeddings.items()}
output = model.generate(**embeddings)[0, 1:-1]

trg_tokenizer.decode(output.cpu())
```

- Quantitative evaluation using data related traveling in Japan
<br>
with BLEU score(1-gram)
<br>
Papago: 51.9
<br>
Google: 32.8
<br>
<strong>figuringoutmine/translator-for-travel-jp-to-kr: 52.7<strong/>

{"language": ["ja", "ko"], "tags": ["python", "transformer", "pytorch"], "pipeline_tag": "translation"}
transformers pytorch encoder-decoder text2text-generation python transformer translation ja ko autotrain_compatible endpoints_compatible region:us
TAGS
#transformers #pytorch #encoder-decoder #text2text-generation #python #transformer #translation #ja #ko #autotrain_compatible #endpoints_compatible #region-us 

URL

- Usage




- Quantitative evaluation using data related traveling in Japan
<br>
with BLEU score(1-gram)
<br>
Papago: 51.9
<br>
Google: 32.8
<br>
<strong>figuringoutmine/translator-for-travel-jp-to-kr: 52.7<strong/>

TAGS
#transformers #pytorch #encoder-decoder #text2text-generation #python #transformer #translation #ja #ko #autotrain_compatible #endpoints_compatible #region-us 

TAGS
#transformers #pytorch #encoder-decoder #text2text-generation #python #transformer #translation #ja #ko #autotrain_compatible #endpoints_compatible #region-us 
