GPT-4にブラケティングを教えてScrapboxページを良い感じに翻訳する
2023年春ごろ、翻訳機能を作っている時に書いたページを/Nota/GPT-4にブラケティングを教えてScrapboxページを良い感じに翻訳するから持ってきましたshokai.icon
以下コピペ
行の下に翻訳テキストを併記するではDeepLを使っているが、問題があったshokai.icon
ただのテキストの翻訳の精度は問題ないのだが
下のような複雑なテキストを翻訳すると
https://www.w3.org/TR/jlreq/#japanese_and_western_mixed_text_composition とか読んでると、常に半角スペースを挿入するのは微妙なきもちになる(少なくとも、構造と見た目の分離に失敗してる感がある)。
リンク記法が壊れてしまう
When I read https://www.w3.org/TR/jlreq/#japanese_and_western_mixed_text_composition and others, I have a delicate feeling to always insert one-byte spaces (at least, I feel like I'm failing to separate structure and appearance).
別のページへのリンクになってしまうshokai.icon
GPT-4で例やルールを教えてから翻訳すると
こうなった
https://www.w3.org/TR/jlreq/#japanese_and_western_mixed_text_composition, it feels somewhat off to always insert a half-width space (at the very least, it seems to fail in separating structure and appearance(構造と見た目の分離)).`
翻訳結果の中に[構造と見た目の分離]へのリンク記法が残る
読みやすさとリンク記法とが両立された形式で翻訳できたshokai.icon
事前にルールをいくつか教えたりしていた
code:prompt
以下の文章を、改行とインデントを保ったまま、英語に翻訳してください。
と の間にあるテキストを翻訳する時は、末尾に元のテキストを付けて出力してください
以下に例を示します
- 組版 → typesetting(組版)
- 活版印刷 → letterpress printing(活版印刷)
- 翻訳 → translation(翻訳)
- 週末の会議 → weekend meeting(週末の会議)
なんかVB.NETのコードとしてレンダリングされてしまったりする
https://gyazo.com/be09f5604738d2ae233072a8ea2f3625
ちなみにGPT-3.5だと、例を無視して超普通の翻訳になってしまったshokai.icon
良い感じになってきた気がするshokai.icon
code:prompt
以下ルールに従って、入力された文章を英語に翻訳してください。
## 翻訳ルール
- 改行を保って出力する
- 行頭のスペース文字によるインデントを保って出力する
- コードブロックを使わずに出力する
## ブラケット内のテキストの翻訳ルール
と の間にあるテキストを翻訳する時は、末尾に元のテキストを付けて出力してください
以下に例を示します
- 組版 → 組版 (typesetting)
- 活版印刷 → 活版印刷 (letterpress printing)
- 翻訳 → 翻訳 (translation)
- 週末の会議 → 週末の会議 (weekend meeting)
- いいかえくん v3.5 → いいかえくん v3.5 (Iikaekun v3.5)
---
ここに日本語のテキスト
工夫
行頭インデントを保つ
VB.NETのコードブロックにさせない
これが
code:input
Gyazoプロダクトマネージャーのyuisekiです
ブリコラージュについて
Gyazoのような息の長いプロダクトだと、理想の実現までの道のりが遠いことがある
意識していること
いきなり完成形を目指さない
いきなり理想像を構想しない
身近にある「ありもの」を組み合わせてアイデアを形にしながら考える
例:ScrapboxのUserJS
ブリコラージュ→ワイヤーフレーム+プロトタイピング
ChatGPTを組み合わせればもっと高速にブリコラージュ&プロトタイピングができるかもしれない?
日記
沖縄で開催された言語処理学会2023に参加しました!
こうなる
code:output
I am yuiseki, the Gyazo Product Manager
ブリコラージュ (bricolage) related
Sometimes, for long-lasting products like Gyazo, the path to realizing the ideal can be long
Things I'm conscious of
Not aiming for a perfect end product right away
Not envisioning the ideal image immediately
Combining and shaping ideas using the "available" resources around me
Example: Scrapbox's UserJS
Bricolage → Wireframing + Prototyping
Maybe combining ChatGPT could make bricolage & prototyping even faster?
Diary
I attended the 言語処理学会2023 (Natural Language Processing Conference 2023) held in Okinawa!
内部的にはインデントが保持されているが、スペースはHTMLでは画面に表示されない為、クリップボードにコピーできないshokai.icon
ので可視化する
code:prompt
行頭のスペース文字によるインデントを ■ に置換して出力してください
■でインデントを可視化した結果
code:output
■I am yuiseki, the Gyazo Product Manager
■ブリコラージュ (bricolage) related
■■Sometimes, for long-lasting products like Gyazo, the path to realizing the ideal can be long
■■Things I'm conscious of
■■■Not aiming for a perfect end product right away
■■■Not envisioning the ideal image immediately
■■■Combining and shaping ideas using the "available" resources around me
■■■■Example: Scrapbox's UserJS
■■■Bricolage → Wireframing + Prototyping
■■■Maybe combining ChatGPT could make bricolage & prototyping even faster?
■Diary
■■I attended the 言語処理学会2023 (Natural Language Processing Conference 2023) held in Okinawa!