Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Show kana with a piece of Japanese text that indicates the pronunciation of kanji
ResourceFunction["FuriganaForm"]["string"] shows the Japanese text "string" along with kana that indicate the pronounciation of the kanji in "string". |
"Direction" | "Horizontal" | which direction to display text in |
"EmptyFuriganaStyle" | {FontSize→0.5×Inherited} | styles for the empty spaces between furigana characters |
"FuriganaStyle" | {FontSize→0.5×Inherited} | styles for the furigana characters |
"GridOptions" | {} | options for the underlying Grid |
"IncludeAudio" | False | include a button to play audio from SpeechSynthesize |
"Reading" | "Hiragana" | which writing system to use for writing furigana |
"Romaji" | Tooltip | how to display romaji readings |
"TextStyle" | {FontSize→1.5×Inherited} | overall text style |
"Voice" | Automatic | a voice from VoiceStyleData to use when setting "IncludeAudio"→True |
View Japanese text with furigana inserted above kanji:
In[1]:= | ![]() |
Out[1]= | ![]() |
In[2]:= | ![]() |
Out[2]= | ![]() |
In[3]:= | ![]() |
Out[3]= | ![]() |
Use custom styling:
In[4]:= | ![]() |
Out[4]= | ![]() |
In[5]:= | ![]() |
Out[5]= | ![]() |
Display vertical text (縦書き):
In[6]:= | ![]() |
Out[6]= | ![]() |
In[7]:= | ![]() |
Out[7]= | ![]() |
Use "Horizontal" or Right for horizontal text (横書き):
In[8]:= | ![]() |
Out[8]= | ![]() |
In[9]:= | ![]() |
Out[9]= | ![]() |
Use "Vertical" or Bottom for vertical text (縦書き):
In[10]:= | ![]() |
Out[10]= | ![]() |
In[11]:= | ![]() |
Out[11]= | ![]() |
Specify which writing system to use for furigana text:
In[12]:= | ![]() |
Out[12]= | ![]() |
In[13]:= | ![]() |
Out[13]= | ![]() |
In[14]:= | ![]() |
Out[14]= | ![]() |
Show romaji text underneath:
In[15]:= | ![]() |
Out[15]= | ![]() |
See a tooltip when hovering over each word:
In[16]:= | ![]() |
Out[16]= | ![]() |
Change the styling of the furigana text:
In[17]:= | ![]() |
Out[17]= | ![]() |
Use multiple style specifications:
In[18]:= | ![]() |
Out[18]= | ![]() |
Control the display of the empty space between furigana characters:
In[19]:= | ![]() |
Out[19]= | ![]() |
In[20]:= | ![]() |
Out[20]= | ![]() |
Format the overall text:
In[21]:= | ![]() |
Out[21]= | ![]() |
Specify options for the grid:
In[22]:= | ![]() |
Out[22]= | ![]() |
Include spoken audio for the text:
In[23]:= | ![]() |
Out[23]= | ![]() |
Use a specific voice for the audio:
In[24]:= | ![]() |
Out[24]= | ![]() |
In[25]:= | ![]() |
Out[25]= | ![]() |
Display some text with furigana and romaji:
In[26]:= | ![]() |
In[27]:= | ![]() |
Out[27]= | ![]() |
Use IntegerString to get Japanese numbers with their pronunciations:
In[28]:= | ![]() |
Out[28]= | ![]() |
FuriganaForm is just a formatting wrapper and should only be used for display purposes:
In[29]:= | ![]() |
Out[29]= | ![]() |
In[30]:= | ![]() |
Out[30]= | ![]() |
The resource function JapaneseTextTokenizer is better suited to extract computable data from Japanese text:
In[31]:= | ![]() |
Out[31]= | ![]() |
FuriganaForm can be slow the first time running in a session since it needs to initialize JapaneseTextTokenizer:
In[32]:= | ![]() |
In[33]:= | ![]() |
Out[33]= | ![]() |
Subsequent evaluations will be much faster:
In[34]:= | ![]() |
Out[34]= | ![]() |
There will not be any furigana to display if there is no kanji in the text:
In[35]:= | ![]() |
Out[35]= | ![]() |
FuriganaForm can still be used to display the romaji transliteration, however:
In[36]:= | ![]() |
Out[36]= | ![]() |
Here’s a pretty neat example:
In[37]:= | ![]() |
Out[37]= | ![]() |
This work is licensed under a Creative Commons Attribution 4.0 International License