24.1.1. 文字のカウント
日本国憲法前文の英文版のアルファベットの出現頻度を測定してみましょう.
集計には Google sheet を使います.他の表計算ソフトウェアを使う場合は,適宜読み替えてください.
- 表計算
シートの準備 #
次のボタンから,この演習用のシートのテンプレートを開きます.
Google sheet: Entropy開いたファイルは,読み込み専用なので,複製して自分用のファイルを作ってください.
File メニューから Make a copy を選びます.

出現回数の計測 #
次の日本国憲法前文の冒頭について,計測してみましょう.
We, the Japanese people, acting through our duly elected
representatives in the National Diet, determined that we shall
secure for ourselves and our posterity the fruits of peaceful
cooperation with all nations and the blessings of liberty
throughout this land, and resolved that never again shall we be
visited with the horrors of war through the action of government,
do proclaim that sovereign power resides with the people and do
firmly establish this Constitution. Government is a sacred trust
of the people, the authority for which is derived from the
people, the powers of which are exercised by the representatives
of the people, and the benefits of which are enjoyed by the
people. This is a universal principle of mankind upon which this
Constitution is founded. We reject and revoke all constitutions,
laws, ordinances, and rescripts in conflict herewith.
計測は,次のボタンで開くページを利用します.
計測ページ- 「計測対象の英文」の下の入力欄に計測対象の英文を入力 (copy-paste) しましょう
- 「Count」ボタンをクリックすると計測結果が文字と出現回数の組で表示されます.
- 「N Only」ボタンをクリックすると出現回数のみが表示され,
- 「Clear」ボタンをクリックすると入力欄の内容が消えます.
各文字の出現回数を,準備で開いたシートに入力してください. B列の B3 から B28 に数を入れます.まとめてコピーして,B3にペーストするとだいたいうまくいきます.
B3に全部の数が入ってしまった場合は,消して,別のセルをアクティブにしてから,また試してみましょう.
