Letters within a Text
The Japanese language uses three different writing scripts.
In[1]:=
![Click for copyable input](assets.en/letters-within-a-text/In_65.png)
Entity["Language", "Japanese"]["WritingScripts"]
Out[1]=
![](assets.en/letters-within-a-text/O_50.png)
These are the hiragana characters.
In[2]:=
![Click for copyable input](assets.en/letters-within-a-text/In_66.png)
hiraganaCharacters =
Alphabet[Entity["WritingScript", "Hiragana::jx343"]]
Out[2]=
![](assets.en/letters-within-a-text/O_51.png)
Highlight hiragana characters in the following Japanese text.
In[3]:=
![Click for copyable input](assets.en/letters-within-a-text/In_67.png)
text = "汚れつちまつた悲しみに
今日も小雪の降りかかる
汚れつちまつた悲しみに
今日も風さへ吹きすぎる
汚れつちまつた悲しみは
たとへば狐の革裘
汚れつちまつた悲しみは
小雪のかかつてちぢこまる
汚れつちまつた悲しみは
なにのぞむなくねがふなく
汚れつちまつた悲しみは
倦怠のうちに死を夢む
汚れつちまつた悲しみに
いたいたしくも怖気づき
汚れつちまつた悲しみに
なすところもなく日は暮れ\[Ellipsis]\[Ellipsis]";
show complete Wolfram Language input
Out[4]=
![](assets.en/letters-within-a-text/O_52.png)
Use WordCloud to show the relative frequency of hiragana characters in the text.
In[5]:=
![Click for copyable input](assets.en/letters-within-a-text/In_69.png)
WordCloud[
StringCases[text,
x_ /; MatchQ[RemoveDiacritics[x],
Alternatives @@ hiraganaCharacters]]]
Out[5]=
![](assets.en/letters-within-a-text/O_53.png)