staka/fugumt-en-ja

Model

54

stars

11

commits

3

linked in READMEs

Aug 15, 2023

updated

endpoints_compatible
marian
pytorch
text2text-generation
transformers
translation

README

FuguMT

This is a translation model using Marian-NMT. For more details, please see my repository.

  • source language: en
  • target language: ja

How to use

This model uses transformers and sentencepiece.

!pip install transformers sentencepiece

You can use this model directly with a pipeline:

from transformers import pipeline
fugu_translator = pipeline('translation', model='staka/fugumt-en-ja')
fugu_translator('This is a cat.')

If you want to translate multiple sentences, we recommend using pySBD.

!pip install transformers sentencepiece pysbd

import pysbd
seg_en = pysbd.Segmenter(language="en", clean=False)

from transformers import pipeline
fugu_translator = pipeline('translation', model='staka/fugumt-en-ja')
txt = 'This is a cat. It is very cute.'
print(fugu_translator(seg_en.segment(txt)))

Eval results

The results of the evaluation using tatoeba(randomly selected 500 sentences) are as follows:

sourcetargetBLEU(*1)
enja32.7

(*1) sacrebleu --tokenize ja-mecab

Contributors

staka

10 commits

SFconvertbot

1 commits

staka/fugumt-en-ja

Model

54

stars

11

commits

3

linked in READMEs

Aug 15, 2023

updated

endpoints_compatible
marian
pytorch
text2text-generation
transformers
translation

README

FuguMT

This is a translation model using Marian-NMT. For more details, please see my repository.

  • source language: en
  • target language: ja

How to use

This model uses transformers and sentencepiece.

!pip install transformers sentencepiece

You can use this model directly with a pipeline:

from transformers import pipeline
fugu_translator = pipeline('translation', model='staka/fugumt-en-ja')
fugu_translator('This is a cat.')

If you want to translate multiple sentences, we recommend using pySBD.

!pip install transformers sentencepiece pysbd

import pysbd
seg_en = pysbd.Segmenter(language="en", clean=False)

from transformers import pipeline
fugu_translator = pipeline('translation', model='staka/fugumt-en-ja')
txt = 'This is a cat. It is very cute.'
print(fugu_translator(seg_en.segment(txt)))

Eval results

The results of the evaluation using tatoeba(randomly selected 500 sentences) are as follows:

sourcetargetBLEU(*1)
enja32.7

(*1) sacrebleu --tokenize ja-mecab

Contributors

staka

10 commits

SFconvertbot

1 commits