Paraphrase Generation¶
Paraphrase Generation modeling class
-
class
pororo.tasks.paraphrase_generation.
PororoParaphraseFactory
(task: str, lang: str, model: Optional[str])[source]¶ Bases:
pororo.tasks.utils.base.PororoFactoryBase
paraphrase generation using Transformer Seq2Seq
Multi (transformer.large.multi.mtpg)
dataset: Internal data
metric: BLEU score
Language
BLEU score
Average
33.00
English
54
Korean
50
Japanese
20
Chinese
8
Multi (transformer.large.multi.fast.mtpg)
dataset: Internal data
metric: BLEU score
Language
BLEU score
Average
33.50
English
56
Korean
50
Japanese
20
Chinese
8
- Parameters
- Returns
generated paraphrase
- Return type
Examples
>>> pg = Pororo(task="pg", lang="ko") >>> pg("노는게 제일 좋아. 친구들 모여라. 언제나 즐거워.") 노는 것이 가장 좋습니다. 친구들끼리 모여 주세요. 언제나 즐거운 시간 되세요. >>> pg = Pororo("pg", lang="zh") >>> pg("我喜欢足球") # 나는 축구를 좋아해 '我喜欢球球球' # 나는 공을 좋아해 >>> pg = Pororo(task="pg", lang="ja") >>> pg("雨の日を聞く良い音楽をお勧めしてくれ。") # 비오는 날 듣기 좋은 음악 가르쳐줘 '雨の日を聞くいい音楽を教えてください。' # 비오는 날 듣기 좋은 음악을 가르쳐 주세요 >>> pg = Pororo("pg", lang="en") >>> pg("There is someone at the door.") "Someone's at the door." >>> pg("I'm good, but thanks for the offer.") "I'm fine, but thanks for the deal."
-
class
pororo.tasks.paraphrase_generation.
PororoTransformerTransMulti
(model, config, tokenizer)[source]¶ Bases:
pororo.tasks.utils.base.PororoGenerationBase
-
class
pororo.tasks.paraphrase_generation.
PororoTransformerParaphrase
(model, config, tokenizer)[source]¶ Bases:
pororo.tasks.utils.base.PororoGenerationBase