# How to list all possible string arguments of a specific function?

For example, to learn the function Alphabet, we can read its document. But it's rather ambiguous, like "Some languages have extra properties". How to find all the languages that can be used in Alphabet ? And how to find all the extra properties of those languages, like "index characters" of "spanish" Alphabet["Spanish", "IndexCharacters"]?

Which means how to find all possible strings that can be passed into Alphabet[#]& ,or can be passed into Alphabet["Spanish",#]& ?

For more examples, how to find all possible strings that can be used in Entity[#]& , or in Entity["PlaneCurve",#]&, or in Entity["PlaneCurve","Cardiod",#]&?.

How to find all possible strings that can be used in SystemModel["Modelica.Electrical.Analog.Basic", #]&?

This question is not specified in those three functions. Is there a more general way to find all those strings which can be used as arguments or options in any functions?

My first attempt involved trying Alphabet on every language from EntityList@"Language", all 9211 of them. I also dug around with GeneralUtilitiesPrintDefinitions@Alphabet and found a few more.

b3m2a1's comment gets most or all of those languages with his one-liner:

EntityValue[EntityClass["Alphabet",All],"FullCharacters","Association"]


It's hard to compare his code to my results, since the alphabets given don't match with the results of Alphabet in every case. Consider StringJoin@Alphabet@"Korean" (no different with the Entity vs "Korean")

ㄱㄲㄴㄷㄸㄹㅁㅂㅃㅅㅆㅇㅈㅉㅊㅋㅌㅍㅎㅏㅐㅑㅒㅓㅔㅕㅖㅗㅘㅙㅚㅛㅜㅝㅞㅟㅠㅡㅢㅣ


vs what is returned by EntityValue

Entity["Alphabet","Korean::2v535"] ->
"ㄱᄀ-ᄒ伽佳假價加可...廊朗浪狼來ㅁㅂㅅㅇ樂ㅈㅊ車ㅋㅌㅍㅎ滑ᅡ-ᅵᆨ-ᇂ郎"


(I've added the ellipsis and stringjoin)

Are you more interested in which language/curve/other entities exist, or are you interested in what are all the valid inputs and outputs of functions like Alphabet? They're not the same thing.

• EntityValue can be used to extract all property values more efficiently. E.g. EntityValue[EntityClass["Alphabet", All], "FullCharacters", "Association"] May 13, 2022 at 6:30
• Thanks a lot. Actually, I'm more interested in all the valid inputs of functions. May 14, 2022 at 10:34
• Alphabet calls SystemCharacterFunctionsDumpiAlphabet which calls either (1) SystemCharacterFunctionsDumpiWritingScriptData for Entity["WritingScript",_] inputs, (2) SystemCharacterFunctionsDumpiAlphabetScriptData for String inputs, or (3) SystemCharacterFunctionsDumpgetLanguageAlphabet for Entity["Language",_] inputs. The first two are hardcoded. The last one looks up Entity properties. This is it; there is an explicit Except@Alternatives[...]` definition which throws an error if it's not a String or appropriate Entity.