Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Test if a string is composed of kanji characters
| IgnorePunctuation | False | whether to ignore PunctuationCharacter in the string |
| "IgnoreWhitespace" | False | whether to ignore WhitespaceCharacter in the string |
Test whether a character is kanji:
| In[1]:= |
| Out[1]= |
| In[2]:= |
| Out[2]= |
| In[3]:= |
| Out[3]= |
Test if a string contains only kanji characters:
| In[4]:= |
| Out[4]= |
| In[5]:= |
| Out[5]= |
| In[6]:= |
| Out[6]= |
| In[7]:= |
| Out[7]= |
KanjiQ yields False when given spaces:
| In[8]:= |
| Out[8]= |
| In[9]:= |
| Out[9]= |
KanjiQ yields False when given punctuation characters:
| In[10]:= |
| Out[10]= |
KanjiQ threads over lists:
| In[11]:= |
| Out[11]= |
By default, the presence of characters that match PunctuationCharacter will cause KanjiQ to yield False:
| In[12]:= |
| Out[12]= |
Ignore punctuation:
| In[13]:= |
| Out[13]= |
By default, the presence of characters that match WhitespaceCharacter will cause KanjiQ to yield False:
| In[14]:= |
| Out[14]= |
Ignore whitespace characters:
| In[15]:= |
| Out[15]= |
The empty string will yield True:
| In[16]:= |
| Out[16]= |
Get a list of kanji characters:
| In[17]:= |
| Out[17]= | ![]() |
Test if a character name corresponds to a kanji character:
| In[18]:= |
| Out[18]= |
| In[19]:= |
| Out[19]= |
| In[20]:= |
| Out[20]= |
Although there are over 50,000 kanji in existence[1], KanjiQ only identifies characters in the Unicode blocks 3400–4DB6 and 4E00–9FAF:
| In[21]:= | ![]() |
| Out[21]= | ![]() |
| In[22]:= |
| Out[22]= |
SpeechSynthesize a piece of text, but use a Japanese voice for Japanese characters:
| In[23]:= |
| Out[23]= |
| In[24]:= |
| Out[24]= |
| In[25]:= | ![]() |
| Out[25]= |
| In[26]:= |
| Out[26]= | ![]() |
| In[27]:= |
| Out[27]= | ![]() |
Wolfram Language 11.3 (March 2018) or above
This work is licensed under a Creative Commons Attribution 4.0 International License