N-gramに基づいたキー配列練習文章 (ChatGPTによる試行1)

投稿日: 2023/01/19 23:46:09

カテゴリ: N-gram

サムネイル: なし


www.typingbolt.com

Typing Boltの頻出パターン生成が素晴らしいので、自分でも生成を試みてみることにする。今回はその初回の実験。

まずは英語

www3.nd.edu

こちらのデータを元に、キー配列を高速で上達するためのワード集を構築してみたい。ChatGPTをうまく利用して作成する。

letter bigram

  1. th (92535489, 3.882543%)
  2. he (87741289, 3.681391%)
  3. in (54433847, 2.283899%)
  4. er (51910883, 2.178042%)
  5. an (51015163, 2.140460%)
  6. re (41694599, 1.749394%)
  7. nd (37466077, 1.571977%)
  8. on (33802063, 1.418244%)
  9. en (32967758, 1.383239%)
  10. at (31830493, 1.335523%)
  11. ou (30637892, 1.285484%)
  12. ed (30406590, 1.275779%)
  13. ha (30381856, 1.274742%)
  14. to (27877259, 1.169655%)
  15. or (27434858, 1.151094%)
  16. it (27048699, 1.134891%)
  17. is (26452510, 1.109877%)
  18. hi (26033632, 1.092302%)
  19. es (26033602, 1.092301%)
  20. ng (25106109, 1.053385%)

生成した文章

「th, he, in, er, an, re, nd, on, en を含む単語をできるだけ複数種類使い、それぞれ頭の中で列挙した上で、それらで最短の文章をそれぞれ作ってください。タイピング練習の文章にしたいと思っています。」 とChatGPTに聞く形で作成した。

th: The thread unraveled as the tailor sewed the cloth, but he was able to fix it with his deft fingers.

he: He felt the weight of the world on his shoulders, as he walked through the city streets. He knew he had to keep moving, to overcome the hurdles.

in: In the end, it was the little things that mattered, the moments of joy, the memories that were made.

er: He never wavered, never faltered, never hesitated, he was determined to succeed, and he never wavered.

an: The man stood on the platform, looking out at the vast expanse of the canyon, the grandeur of nature, the vastness of the landscape, the harmony of the colors.

re: He knew that the only way to move on was to let go of the past, to reflect, to renew, to reshape the future.

nd: He understood the importance of expanding his knowledge, of understanding the trends and demands of the market, of being able to adapt and be flexible in a constantly changing industry, so he took the initiative to learn and grow, to explore new opportunities, to make connections and build networks, to be ready for whatever challenges came his way.

on: On one hand, he was optimistic, on the other hand, he was realistic, he knew that consistency, persistence, and planning were key to achieving his goals.

en: He was determined to make a difference, to have an impact, to make it happen, he had the energy and enthusiasm, he just needed the right opportunity, the right encouragement..

at: The cat sat on the mat, watching the rat, scratching its fat paw, before it took a nap.

ou: You should shout out your doubts, and work out your issues, before you figure out your route, and head out on your journey.

ed: He needed to be fed, he wanted to be led, he was determined to succeed, he was well-bred and well-educated.

ha: I had a hat, I saw a rat, I heard a cat, I chased a bat, I caught a rat.

to: I have to go, I want to know, I need to show, I am ready to grow, I am able to flow.

or: He had to restore the old door, before he could install the new one, and he had to explore the shore, before he could go on a tour.

it: It was a bit, of a hit and miss, but it was still, a worthwhile experience, it was a bit, of a challenge, but it was also, a lot of fun.

is: Is it time, to make a decision, is it wise, to take a chance, is it right, to stand up for what you believe, is it wrong, to change your mind.

hi: He hit the high notes perfectly, singing with precision and skill, as the audience cheered and applauded.

es: She was impressed by his expertise, his ability to make complex tasks look easy, his attention to detail and his eagerness to learn new skills.

ng: The king was reigning over the kingdom, ruling with wisdom, fairness and compassion, ensuring the well-being of his people, and maintaining peace and prosperity.

my typingに一応公開してみた。文字数制限の関係で割愛せざるをえず、ちょっと微妙な出来だけど、それでも十分に役に立つはず。

typing.twi1.me

次に日本語

kouy.exblog.jp

リストが長いので一部抜粋

文字 2gram

15033 ょう 7484 てい 6341 しょ 6117 って 5998 ゅう 5875 して 5588 ない 5389 かい 5357 よう 5318 こう 5196 った 5075 かん 5059 うし 5009 した 4765 こと 4724 せい 4691 たい 4319 じょ 4239 す。 4040 た。 3950 する 3904 から 3840 とい 3804 いし 3743 ます 3740 しゅ 3661 は、 3632 んし 3497 です 3469 る。 3448 んの 3443 きょ 3382 いる 3352 いの 3326 いう 3299 うに 3279 さい 3206 ある 3169 しん

生成した文章

ChatGPTに何度もパターンを変えてあたってみたが、うまい文章が生成されなかった。一応以下に結果を添付。

「ょう」: 洋貨を買うようにしましょう。
「てい」: 程度が高いです。
「しょ」: 書類を提出しよう。
「って」: 一度聞いてみて。
「ゅう」: 雨が降る予報だ。
「して」: しっかりしていなさい。
「ない」: 役に立たないこと
「かい」: 会議が終わった
「よう」: 様子を見に行こう
「こう」: こう言った意見がある
「った」: 言った通りにやって
「かん」: 管理すること
「うし」: 牛を飼うこと
「した」: した事に対する責任
「こと」: 今後のことについて
「せい」: 正義のため
「たい」: 目標を達成するため
「じょ」: 女性のこと

あまりにひどい出来なので、自分が考えたバージョンを以下に加えておく。

「ょう」: 少々故障が多いでしょう。
「てい」: っていっても程度が低下している。
「しょ」: 正直障子は処理でしょう。
「って」: っていってもって感じって。
「ゅう」: 吸収中の九州中央琉球乳牛。
「して」: 指定した人をして、大してしていないとして。
「ない」: 家内には案内させないので家内は来ない。
「かい」: 開会式の会場を回顧かい。
「よう」: 様子をみようとしよう。
「こう」: 高校に高効率に試行。
「った」: 去ったり打ったり立ったり。
「かん」: あかん、これはカンカンになって管理されてる感。
「うし」: 講師の後ろで牛が調子にのってるし。
「した」: 死体に大した支度もしたことない。
「こと」: ことの発端を隠したことはそことここ。
「せい」: せいぜい考えて生徒とせい。
「たい」: 大抵のガタイの良い体育の大会は行きたい。
「じょ」: 徐々に女性が上手に上達する。

こちらは良い出来で、練習になりそうなので、mytypingに追加しておいた。 typing.twi1.me

ただ、あまりに作為的なので英語版に比べて不自然な文章なのが要改善か。

まとめ

今回はいまいちうまくいかなかったけれど、やはり2-gram (bigram) 等を利用した、digraphの活用は効率を上げることができるという体感は得られた。次は文字に限らず、2キーの対応のdigraphの作成をしつつ、効率的な練習文章の本格生成を進めたい。

typing.twi1.me

typing.twi1.me