IgnoreDiacritics

IgnoreDiacritics

is an option for string, grammar, and related functions that specifies whether diacritics should be ignored in strings.

Details

  • In grammar functions, IgnoreDiacritics->True specifies that simple transformations such as adding or removing diacritics should automatically be made in attempting to apply grammar rules.
  • In string functions such as AlphabeticSort, IgnoreDiacritics->True ignores diacritics only on characters that do not appear in the base alphabet of the language used.

Examples

Basic Examples  (5)

Deploy a grammar that ignores diacritics:

In[1]:=
Click for copyable input
Out[1]=

Apply the grammar to text that is missing the diacritic:

In[2]:=
Click for copyable input
Out[2]=

Apply the grammar to text that has the diacritic:

In[3]:=
Click for copyable input
Out[3]=

Require the diacritic while applying the grammar:

In[4]:=
Click for copyable input
Out[4]=
In[5]:=
Click for copyable input
Out[5]=

Deploy a grammar that does not ignore diacritics:

In[1]:=
Click for copyable input
Out[1]=

Apply the grammar to text that is missing the diacritic:

In[2]:=
Click for copyable input
Out[2]=

Apply the grammar to text that has the diacritic:

In[3]:=
Click for copyable input
Out[3]=

Deploy a grammar that contains no diacritics and that ignores diacritics when applied:

In[1]:=
Click for copyable input
Out[1]=

Apply the grammar to text that has a diacritic:

In[2]:=
Click for copyable input
Out[2]=

Sort alphabetically without considering diacritics:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Check alphabetic ordering independent of diacritics or ligatures:

In[1]:=
Click for copyable input
Out[1]=

See Also

RemoveDiacritics  IgnoreCase  AllowLooseGrammar  GrammarRules  GrammarApply  GrammarToken

Introduced in 2015
(10.1)