17
$\begingroup$

Bug introduced in 10.2 and fixed in 10.3


The new function Alphabet introduced in Mathematica 10.2 gives the wrong list of letters for the Spanish language in my system (Windows 7 64 bits).

Alphabet[Entity["Language", "Spanish"]]
{"a", "b", "c", "d", "e", "f", "g", "h", "i", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "z"}

That list is missing {"j", "k", "w", "x", "y"} and special characters.

The list provided by LanguageData its also wrong

LanguageData["Spanish", "Letters"]
{"a", "á", "b", "c", "d", "e", "é", "f", "g", "h", "i", "í", "j", "l", "m", "n", "ñ", "o", "ó", "p", "q", "r", "s", "t", "u", "ú", "ü", "v", "x", "y", "z"}

as its missing {"k","w"}.

Can anybody reproduce this behaviour in other systems and other languages?

I have filed a report with Wolfram Technical Support [CASE:3388733]

The correct list as given by the Spanish Royal Academy of Language is

a, b, c, d, e, f, g, h, i, j, k, l, m, n, ñ, o, p, q, r, s, t, u, v, w, x, y, z.

$\endgroup$
4
  • 1
    $\begingroup$ I'm in the process of installing 10.2 presently, but in 10.1, LanguageData["Spanish", "Letters"] produces the same result you get, which is missing k and w $\endgroup$ Commented Jul 20, 2015 at 17:18
  • 1
    $\begingroup$ I get this in 10.2 too, so I will be adding the "bugs" tag, as we have sufficient confirmation this is a bug. $\endgroup$ Commented Jul 20, 2015 at 18:50
  • 4
    $\begingroup$ It's a bug, and it's being looked into. $\endgroup$
    – Stefan R
    Commented Jul 20, 2015 at 21:53
  • 7
    $\begingroup$ You can use LanguageData["Spanish", "BasicAlphabet"] while it gets fixed. $\endgroup$
    – FJRA
    Commented Jul 20, 2015 at 22:06

2 Answers 2

3
$\begingroup$

Just an extended comment:

The problem seems not to be fixed in v11.1.1 for other "latin" alphabet based languages. Here are some differences between what is returned by Alphabet and LanguageData[lang, "Letters"] for some european countries.

Alphabet seems to do OK, but the problem is that "Letters" do not always include at least all characters returned by Alphabet (below in red).

({#, Grid@
   List@(SequenceAlignment @@ 
      StringJoin /@ 
       Sort /@ {Alphabet[#], 
         LanguageData[#, "Letters"]})} & /@ {"Czech", "Danish", 
 "Dutch", "Finnish", "French", "German", "Hungarian", "Italian", 
 "Polish", "Portuguese", "Romanian", "Slovak", "Slovenian", 
 "Spanish", "Swedish"} // Grid[#, Frame -> All] &) /. {expr : {_, ""} :> Style[expr, Red, Bold], expr : {"", _} :> Style[expr, Blue, Bold]}

enter image description here

For example, here is what is returned for "Danish":

Sort /@ {Alphabet[#], LanguageData[#, "Letters"]} &@"Danish" // Column

Blockquote

where you can see "q","w","x","z" are not returned by LanguageData as indicated in red in the table above.

$\endgroup$
2
  • 1
    $\begingroup$ Have you reported this? $\endgroup$ Commented Aug 3, 2017 at 14:19
  • 1
    $\begingroup$ @AlexeyPopkov No, never done that. Please do so if you can. By the way, the problem with the missing letters is that this propagates to other LanguageData properties like "LetterFrequency" where these letters are also missing... $\endgroup$
    – SquareOne
    Commented Aug 3, 2017 at 14:31
2
$\begingroup$

This was reported to Wolfram Technical Support [CASE:3388733] and acknowledged as a bug.

The problem was fixed in Mathematica 10.3.

Alphabet[Entity["Language", "Spanish"]]
{"a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "ñ", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z"}
LanguageData["Spanish", "Letters"]
{"a", "á", "b", "c", "d", "e", "é", "f", "g", "h", "i", "í", "j", "k", "l", "m", "n", "ñ", "o", "ó", "p", "q", "r", "s", "t", "u", "ú", "ü", "v", "w", "x", "y", "z"}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.