How to verbalise code in Mathematica? [on hold]Extract DownValues used in function evaluationHow do I plot a variable against another variable in Mathematica?I cannot execute this codeGenerating multiple choice questions with a random list of operations and rational numbersIs Mathematica worth it for me?Mathematica Progression Path from Apprentice to GuruHow to visualise Mathematica code and how to become a better coderHighschool teachers based in Australia using Mathematica ?Mathematica problem- consecutive integerswhy my code doesn't workCode reduction using Block

Type-check an expression

Would glacier 'trees' be plausible?

Would a 1/1 token with persist dying trigger on death effects a second time?

How to improve/restore vintage Peugeot bike, or is it even worth it?

I caught several of my students plagiarizing. Could it be my fault as a teacher?

Unknowingly ran an infinite loop in terminal

Can Ghost kill White Walkers or Wights?

How can I get a job without pushing my family's income into a higher tax bracket?

Why is Arya visibly scared in the library in S8E3?

Did we get closer to another plane than we were supposed to, or was the pilot just protecting our delicate sensibilities?

My ID is expired, can I fly to the Bahamas with my passport?

Why is C# in the D Major Scale?

How to make a newline without autoindent

Would "lab meat" be able to feed a much larger global population

Is it cheaper to drop cargo than to land it?

How to 'Let Go' in Meditation?

Pressure inside an infinite ocean?

SFDX Can query Package Installation Status, can we?

How do I tell my manager that his code review comment is wrong?

Is induction neccessary for proving that every injective mapping of a finite set into itself is a mapping onto itself?

What happens if I start too many background jobs?

How to give very negative feedback gracefully?

Airbnb - host wants to reduce rooms, can we get refund?

Has any spacecraft ever had the ability to directly communicate with civilian air traffic control?



How to verbalise code in Mathematica? [on hold]


Extract DownValues used in function evaluationHow do I plot a variable against another variable in Mathematica?I cannot execute this codeGenerating multiple choice questions with a random list of operations and rational numbersIs Mathematica worth it for me?Mathematica Progression Path from Apprentice to GuruHow to visualise Mathematica code and how to become a better coderHighschool teachers based in Australia using Mathematica ?Mathematica problem- consecutive integerswhy my code doesn't workCode reduction using Block













10












$begingroup$


How do you read an expression like?



x + y /. x -> 2


Looking up /. and -> in Mathematica docs it says ReplaceAll and Rule. But you would not pronounce the expression above as



x plus y replace all x rule 2. 


Instead you would say something like



x plus y where x goes to two. 


The operators /. and -> are just two examples, there are a lot of others in Mathematica. Is there some resource that addresses pronunciations in Mathematica.










share|improve this question











$endgroup$



put on hold as primarily opinion-based by Michael E2, m_goldberg, bbgodfrey, AccidentalFourierTransform, MarcoB yesterday


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

















  • $begingroup$
    @C.E Of course there must be several ways to pronounce an expression, depending on the context. I am not after one true way to pronounce, but more a list of examples how you could pronounce some not obvious expressions. Maybe no one thinks this is worthwhile and that's OK, but if anybody has discussed this I would like a link to it.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:14










  • $begingroup$
    This is a topic in any programming language, as they have not been designed to become acoustic streams. Are you primarily interested in communicating vocally to other people, or are you interested in clarifying your inner monologue while working on code? Some of us are more visual-oriented and a symbol like -> never makes it beyond the visual stage, never becomes an acoustic event.
    $endgroup$
    – Roman
    Apr 27 at 9:16










  • $begingroup$
    @Roman I am primarily interested in communicating vocally to other people. When it comes to other programming languages there is some discussion, see for instance stackoverflow.com/questions/7746894/…
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:23










  • $begingroup$
    I know that pronunciations are opinion based and that there are no true answers, but still it makes sense to me that have some way of communication vocally to other people when the need arises, so the discussion in Haskell was of great help to me, even though it is opinion based.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:31










  • $begingroup$
    How about you get a list started, like the Haskell example, and everybody chips in? Something like a table with three columns: "symbol", "pronounciations" (many lines), and "voters" where everybody can put in their name to vote for a particular pronounciation.
    $endgroup$
    – Roman
    Apr 27 at 10:13















10












$begingroup$


How do you read an expression like?



x + y /. x -> 2


Looking up /. and -> in Mathematica docs it says ReplaceAll and Rule. But you would not pronounce the expression above as



x plus y replace all x rule 2. 


Instead you would say something like



x plus y where x goes to two. 


The operators /. and -> are just two examples, there are a lot of others in Mathematica. Is there some resource that addresses pronunciations in Mathematica.










share|improve this question











$endgroup$



put on hold as primarily opinion-based by Michael E2, m_goldberg, bbgodfrey, AccidentalFourierTransform, MarcoB yesterday


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.

















  • $begingroup$
    @C.E Of course there must be several ways to pronounce an expression, depending on the context. I am not after one true way to pronounce, but more a list of examples how you could pronounce some not obvious expressions. Maybe no one thinks this is worthwhile and that's OK, but if anybody has discussed this I would like a link to it.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:14










  • $begingroup$
    This is a topic in any programming language, as they have not been designed to become acoustic streams. Are you primarily interested in communicating vocally to other people, or are you interested in clarifying your inner monologue while working on code? Some of us are more visual-oriented and a symbol like -> never makes it beyond the visual stage, never becomes an acoustic event.
    $endgroup$
    – Roman
    Apr 27 at 9:16










  • $begingroup$
    @Roman I am primarily interested in communicating vocally to other people. When it comes to other programming languages there is some discussion, see for instance stackoverflow.com/questions/7746894/…
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:23










  • $begingroup$
    I know that pronunciations are opinion based and that there are no true answers, but still it makes sense to me that have some way of communication vocally to other people when the need arises, so the discussion in Haskell was of great help to me, even though it is opinion based.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:31










  • $begingroup$
    How about you get a list started, like the Haskell example, and everybody chips in? Something like a table with three columns: "symbol", "pronounciations" (many lines), and "voters" where everybody can put in their name to vote for a particular pronounciation.
    $endgroup$
    – Roman
    Apr 27 at 10:13













10












10








10


6



$begingroup$


How do you read an expression like?



x + y /. x -> 2


Looking up /. and -> in Mathematica docs it says ReplaceAll and Rule. But you would not pronounce the expression above as



x plus y replace all x rule 2. 


Instead you would say something like



x plus y where x goes to two. 


The operators /. and -> are just two examples, there are a lot of others in Mathematica. Is there some resource that addresses pronunciations in Mathematica.










share|improve this question











$endgroup$




How do you read an expression like?



x + y /. x -> 2


Looking up /. and -> in Mathematica docs it says ReplaceAll and Rule. But you would not pronounce the expression above as



x plus y replace all x rule 2. 


Instead you would say something like



x plus y where x goes to two. 


The operators /. and -> are just two examples, there are a lot of others in Mathematica. Is there some resource that addresses pronunciations in Mathematica.







education






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Apr 27 at 9:14









Carl Lange

5,83411445




5,83411445










asked Apr 27 at 8:53









Bob UelandBob Ueland

395111




395111




put on hold as primarily opinion-based by Michael E2, m_goldberg, bbgodfrey, AccidentalFourierTransform, MarcoB yesterday


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.









put on hold as primarily opinion-based by Michael E2, m_goldberg, bbgodfrey, AccidentalFourierTransform, MarcoB yesterday


Many good questions generate some degree of opinion based on expert experience, but answers to this question will tend to be almost entirely based on opinions, rather than facts, references, or specific expertise. If this question can be reworded to fit the rules in the help center, please edit the question.













  • $begingroup$
    @C.E Of course there must be several ways to pronounce an expression, depending on the context. I am not after one true way to pronounce, but more a list of examples how you could pronounce some not obvious expressions. Maybe no one thinks this is worthwhile and that's OK, but if anybody has discussed this I would like a link to it.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:14










  • $begingroup$
    This is a topic in any programming language, as they have not been designed to become acoustic streams. Are you primarily interested in communicating vocally to other people, or are you interested in clarifying your inner monologue while working on code? Some of us are more visual-oriented and a symbol like -> never makes it beyond the visual stage, never becomes an acoustic event.
    $endgroup$
    – Roman
    Apr 27 at 9:16










  • $begingroup$
    @Roman I am primarily interested in communicating vocally to other people. When it comes to other programming languages there is some discussion, see for instance stackoverflow.com/questions/7746894/…
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:23










  • $begingroup$
    I know that pronunciations are opinion based and that there are no true answers, but still it makes sense to me that have some way of communication vocally to other people when the need arises, so the discussion in Haskell was of great help to me, even though it is opinion based.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:31










  • $begingroup$
    How about you get a list started, like the Haskell example, and everybody chips in? Something like a table with three columns: "symbol", "pronounciations" (many lines), and "voters" where everybody can put in their name to vote for a particular pronounciation.
    $endgroup$
    – Roman
    Apr 27 at 10:13
















  • $begingroup$
    @C.E Of course there must be several ways to pronounce an expression, depending on the context. I am not after one true way to pronounce, but more a list of examples how you could pronounce some not obvious expressions. Maybe no one thinks this is worthwhile and that's OK, but if anybody has discussed this I would like a link to it.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:14










  • $begingroup$
    This is a topic in any programming language, as they have not been designed to become acoustic streams. Are you primarily interested in communicating vocally to other people, or are you interested in clarifying your inner monologue while working on code? Some of us are more visual-oriented and a symbol like -> never makes it beyond the visual stage, never becomes an acoustic event.
    $endgroup$
    – Roman
    Apr 27 at 9:16










  • $begingroup$
    @Roman I am primarily interested in communicating vocally to other people. When it comes to other programming languages there is some discussion, see for instance stackoverflow.com/questions/7746894/…
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:23










  • $begingroup$
    I know that pronunciations are opinion based and that there are no true answers, but still it makes sense to me that have some way of communication vocally to other people when the need arises, so the discussion in Haskell was of great help to me, even though it is opinion based.
    $endgroup$
    – Bob Ueland
    Apr 27 at 9:31










  • $begingroup$
    How about you get a list started, like the Haskell example, and everybody chips in? Something like a table with three columns: "symbol", "pronounciations" (many lines), and "voters" where everybody can put in their name to vote for a particular pronounciation.
    $endgroup$
    – Roman
    Apr 27 at 10:13















$begingroup$
@C.E Of course there must be several ways to pronounce an expression, depending on the context. I am not after one true way to pronounce, but more a list of examples how you could pronounce some not obvious expressions. Maybe no one thinks this is worthwhile and that's OK, but if anybody has discussed this I would like a link to it.
$endgroup$
– Bob Ueland
Apr 27 at 9:14




$begingroup$
@C.E Of course there must be several ways to pronounce an expression, depending on the context. I am not after one true way to pronounce, but more a list of examples how you could pronounce some not obvious expressions. Maybe no one thinks this is worthwhile and that's OK, but if anybody has discussed this I would like a link to it.
$endgroup$
– Bob Ueland
Apr 27 at 9:14












$begingroup$
This is a topic in any programming language, as they have not been designed to become acoustic streams. Are you primarily interested in communicating vocally to other people, or are you interested in clarifying your inner monologue while working on code? Some of us are more visual-oriented and a symbol like -> never makes it beyond the visual stage, never becomes an acoustic event.
$endgroup$
– Roman
Apr 27 at 9:16




$begingroup$
This is a topic in any programming language, as they have not been designed to become acoustic streams. Are you primarily interested in communicating vocally to other people, or are you interested in clarifying your inner monologue while working on code? Some of us are more visual-oriented and a symbol like -> never makes it beyond the visual stage, never becomes an acoustic event.
$endgroup$
– Roman
Apr 27 at 9:16












$begingroup$
@Roman I am primarily interested in communicating vocally to other people. When it comes to other programming languages there is some discussion, see for instance stackoverflow.com/questions/7746894/…
$endgroup$
– Bob Ueland
Apr 27 at 9:23




$begingroup$
@Roman I am primarily interested in communicating vocally to other people. When it comes to other programming languages there is some discussion, see for instance stackoverflow.com/questions/7746894/…
$endgroup$
– Bob Ueland
Apr 27 at 9:23












$begingroup$
I know that pronunciations are opinion based and that there are no true answers, but still it makes sense to me that have some way of communication vocally to other people when the need arises, so the discussion in Haskell was of great help to me, even though it is opinion based.
$endgroup$
– Bob Ueland
Apr 27 at 9:31




$begingroup$
I know that pronunciations are opinion based and that there are no true answers, but still it makes sense to me that have some way of communication vocally to other people when the need arises, so the discussion in Haskell was of great help to me, even though it is opinion based.
$endgroup$
– Bob Ueland
Apr 27 at 9:31












$begingroup$
How about you get a list started, like the Haskell example, and everybody chips in? Something like a table with three columns: "symbol", "pronounciations" (many lines), and "voters" where everybody can put in their name to vote for a particular pronounciation.
$endgroup$
– Roman
Apr 27 at 10:13




$begingroup$
How about you get a list started, like the Haskell example, and everybody chips in? Something like a table with three columns: "symbol", "pronounciations" (many lines), and "voters" where everybody can put in their name to vote for a particular pronounciation.
$endgroup$
– Roman
Apr 27 at 10:13










2 Answers
2






active

oldest

votes


















18












$begingroup$

Starting a brain dump of ideas, listening to my inner monologue. Please feel free to edit and add suggestions. Here is a list of most operators.



| sym | example | pronunciation | votes, comments, rants
|––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––––––––
| :: | x::y | x says y |
| # | # | slot |
| ## | ## | all slots |
| & | x& | x end-of-function |
| % | % | previous output |
| : | x:_ | x-pattern |
| | | anything, call it x |
| /; | x_/;y | x-pattern that y |
| | | anything that y, call it x |
| ? | x_?yQ | x-pattern that is y |
| | | anything y, call it x |
| _ | x_ | x-pattern |
| | | anything, call it x |
| _ | x_y | x-pattern of type y |
| | | anything of type y, call it x |
| __ | x__ | x-patterns |
| | | any sequence, call it x |
| ___ | x___ | x-maybepatterns |
| | | any sequence, even empty, call it x |
| _. | x_. | x-defaultpattern |
| | | anything, call it x, with default |
| : | x_:y | x-pattern defaults to y |
| | | anything, call it x, with default y |
| .. | x.. | one or more x |
| ... | x... | zero or more x |
| | 1,2,3 | list of 1, 2, 3 |
| [[]] | x[[y]] | element y of x |
| ;; | x;;y;;z | from x to y in steps of z |
| == | x==y | x equal to y |
| != | x!=y | x not equal to y |
| === | x===y | x same as y |
| =!= | x=!=y | x not same as y |
| ++ | x++ | x and then increment it |
| ++ | ++x | x but increment it first |
| -- | x-- | x and then decrement it |
| -- | --x | x but decrement it first |
| [] | x[y] | x of y |
| | x[y,z] | x of y and z |
| @* | x@*y | x of y |
| // | x//y | x then do y |
| /* | x/*y | y of x |
| | x//y/*z | x then do y then do z |
| @ | x@y | x of y |
| ~ | x~f~y | f of x and y |
| /@ | x/@y | map x onto y |
| //@ | x//@y | mapall x onto y |
| | | map x onto all levels of y |
| @@ | x@@y | x-head on y |
| @@@ | x@@@y | map x-head onto y |
| -> | x->y | x becomes y |
| | | x goes to y |
| :> | x:>y | x will become y |
| | | x will go to y |
| /. | x/.y | x where y |
| //. | x//.y | x where repeatedly y |
| = | x=y | x is y |
| := | x:=y | x will be y |
| ^= | x[y]^=z | y remembers x[y] is z |
| ^:= | x[y]^:=z | y remembers x[y] will be z |
| /: | x/:y=z | x remembers y is z |
| /: | x/:y:=z | x remembers y will be z |
| . | x=. | x is cleared |
|––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––





share|improve this answer











$endgroup$












  • $begingroup$
    thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
    $endgroup$
    – Bob Ueland
    Apr 27 at 16:52






  • 1




    $begingroup$
    As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
    $endgroup$
    – bobthechemist
    Apr 27 at 17:25










  • $begingroup$
    @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
    $endgroup$
    – Roman
    Apr 27 at 18:34










  • $begingroup$
    Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
    $endgroup$
    – Bob Ueland
    Apr 27 at 19:39










  • $begingroup$
    Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
    $endgroup$
    – Roman
    Apr 27 at 21:37


















13












$begingroup$

You could try using SpokenString:



SpokenString[HoldForm[x + y /. x->2]]



"x plus y slash dot x goes to 2"




Addendum



If you don't mind messing with internal functions, it is possible to customize the output of SpokenString. For this purpose, it is convenient to make use of my ExtractDownValues function reproduced below:



SetAttributes[ExtractDownValues, HoldAll]

ExtractDownValues[sym_[args__]] := ExtractDownValues[sym,args]
ExtractDownValues[sym_,args__] := Cases[
DownValues[sym],_[h_,_] /; MatchQ[Unevaluated[sym[args]],h]
]


The internal function that does most of the heavy lifting is SpokenStringDump`SSText:



TracePrint[SpokenString[HoldForm[x + y /. x -> 2]], _SpokenStringDump`SSText]



SpokenStringDump`SSText[x+y/. x->2]



SpokenStringDump`SSText[x+y]



SpokenStringDump`SSText[x]



SpokenStringDump`SSText[y]



SpokenStringDump`SSText[2]



SpokenStringDump`SSText[x->2]



SpokenStringDump`SSText[x]



SpokenStringDump`SSText[2]



"x plus y slash dot x goes to 2"




Using ExtractDownValues we find:



ExtractDownValues @ SpokenStringDump`SSText[x + y /. x -> 2]



HoldPattern[
SpokenStringDump`SSText[SpokenStringDump`a_ /. SpokenStringDump`b_]] :>
SpokenStringDump`SpeakQuantity[SpokenStringDump`a, ReplaceAll, True] ~~
" slash dot " ~~
If[ListQ[Unevaluated[SpokenStringDump`b]],
SpokenStringDump`SpeakListContents[SpokenStringDump`b],
SpokenStringDump`SpeakQuantity[SpokenStringDump`b, ReplaceAll, True]],
HoldPattern[
SpokenStringDump`SSText[SpokenStringDump`f_[SpokenStringDump`a___]]] :>
Module[SpokenStringDump`ans =
SpokenStringDump`SSText0[SpokenStringDump`f[SpokenStringDump`a]],
If[Head[SpokenStringDump`ans] =!= SpokenStringDump`SSText0 && !
MemberQ[SpokenStringDump`ans, $Failed, 0, 1], SpokenStringDump`ans,
SpokenStringDump`SSTextFallThrough[
Unevaluated[SpokenStringDump`f[SpokenStringDump`a]]]]]




Notice the " slash dot " string. So, modifying this downvalue to:



SpokenStringDump`SSText[a_ /. b_] := SpokenStringDump`SpeakQuantity[a,ReplaceAll,True] ~~ 
" where " ~~
If[ListQ[Unevaluated[b]],
SpokenStringDump`SpeakListContents[b],
SpokenStringDump`SpeakQuantity[b,ReplaceAll,True]
]


will produce:



SpokenString[HoldForm[x + y /. x->2]]



"x plus y where x goes to 2"







share|improve this answer











$endgroup$



















    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    18












    $begingroup$

    Starting a brain dump of ideas, listening to my inner monologue. Please feel free to edit and add suggestions. Here is a list of most operators.



    | sym | example | pronunciation | votes, comments, rants
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––––––––
    | :: | x::y | x says y |
    | # | # | slot |
    | ## | ## | all slots |
    | & | x& | x end-of-function |
    | % | % | previous output |
    | : | x:_ | x-pattern |
    | | | anything, call it x |
    | /; | x_/;y | x-pattern that y |
    | | | anything that y, call it x |
    | ? | x_?yQ | x-pattern that is y |
    | | | anything y, call it x |
    | _ | x_ | x-pattern |
    | | | anything, call it x |
    | _ | x_y | x-pattern of type y |
    | | | anything of type y, call it x |
    | __ | x__ | x-patterns |
    | | | any sequence, call it x |
    | ___ | x___ | x-maybepatterns |
    | | | any sequence, even empty, call it x |
    | _. | x_. | x-defaultpattern |
    | | | anything, call it x, with default |
    | : | x_:y | x-pattern defaults to y |
    | | | anything, call it x, with default y |
    | .. | x.. | one or more x |
    | ... | x... | zero or more x |
    | | 1,2,3 | list of 1, 2, 3 |
    | [[]] | x[[y]] | element y of x |
    | ;; | x;;y;;z | from x to y in steps of z |
    | == | x==y | x equal to y |
    | != | x!=y | x not equal to y |
    | === | x===y | x same as y |
    | =!= | x=!=y | x not same as y |
    | ++ | x++ | x and then increment it |
    | ++ | ++x | x but increment it first |
    | -- | x-- | x and then decrement it |
    | -- | --x | x but decrement it first |
    | [] | x[y] | x of y |
    | | x[y,z] | x of y and z |
    | @* | x@*y | x of y |
    | // | x//y | x then do y |
    | /* | x/*y | y of x |
    | | x//y/*z | x then do y then do z |
    | @ | x@y | x of y |
    | ~ | x~f~y | f of x and y |
    | /@ | x/@y | map x onto y |
    | //@ | x//@y | mapall x onto y |
    | | | map x onto all levels of y |
    | @@ | x@@y | x-head on y |
    | @@@ | x@@@y | map x-head onto y |
    | -> | x->y | x becomes y |
    | | | x goes to y |
    | :> | x:>y | x will become y |
    | | | x will go to y |
    | /. | x/.y | x where y |
    | //. | x//.y | x where repeatedly y |
    | = | x=y | x is y |
    | := | x:=y | x will be y |
    | ^= | x[y]^=z | y remembers x[y] is z |
    | ^:= | x[y]^:=z | y remembers x[y] will be z |
    | /: | x/:y=z | x remembers y is z |
    | /: | x/:y:=z | x remembers y will be z |
    | . | x=. | x is cleared |
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––





    share|improve this answer











    $endgroup$












    • $begingroup$
      thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 16:52






    • 1




      $begingroup$
      As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
      $endgroup$
      – bobthechemist
      Apr 27 at 17:25










    • $begingroup$
      @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
      $endgroup$
      – Roman
      Apr 27 at 18:34










    • $begingroup$
      Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 19:39










    • $begingroup$
      Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
      $endgroup$
      – Roman
      Apr 27 at 21:37















    18












    $begingroup$

    Starting a brain dump of ideas, listening to my inner monologue. Please feel free to edit and add suggestions. Here is a list of most operators.



    | sym | example | pronunciation | votes, comments, rants
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––––––––
    | :: | x::y | x says y |
    | # | # | slot |
    | ## | ## | all slots |
    | & | x& | x end-of-function |
    | % | % | previous output |
    | : | x:_ | x-pattern |
    | | | anything, call it x |
    | /; | x_/;y | x-pattern that y |
    | | | anything that y, call it x |
    | ? | x_?yQ | x-pattern that is y |
    | | | anything y, call it x |
    | _ | x_ | x-pattern |
    | | | anything, call it x |
    | _ | x_y | x-pattern of type y |
    | | | anything of type y, call it x |
    | __ | x__ | x-patterns |
    | | | any sequence, call it x |
    | ___ | x___ | x-maybepatterns |
    | | | any sequence, even empty, call it x |
    | _. | x_. | x-defaultpattern |
    | | | anything, call it x, with default |
    | : | x_:y | x-pattern defaults to y |
    | | | anything, call it x, with default y |
    | .. | x.. | one or more x |
    | ... | x... | zero or more x |
    | | 1,2,3 | list of 1, 2, 3 |
    | [[]] | x[[y]] | element y of x |
    | ;; | x;;y;;z | from x to y in steps of z |
    | == | x==y | x equal to y |
    | != | x!=y | x not equal to y |
    | === | x===y | x same as y |
    | =!= | x=!=y | x not same as y |
    | ++ | x++ | x and then increment it |
    | ++ | ++x | x but increment it first |
    | -- | x-- | x and then decrement it |
    | -- | --x | x but decrement it first |
    | [] | x[y] | x of y |
    | | x[y,z] | x of y and z |
    | @* | x@*y | x of y |
    | // | x//y | x then do y |
    | /* | x/*y | y of x |
    | | x//y/*z | x then do y then do z |
    | @ | x@y | x of y |
    | ~ | x~f~y | f of x and y |
    | /@ | x/@y | map x onto y |
    | //@ | x//@y | mapall x onto y |
    | | | map x onto all levels of y |
    | @@ | x@@y | x-head on y |
    | @@@ | x@@@y | map x-head onto y |
    | -> | x->y | x becomes y |
    | | | x goes to y |
    | :> | x:>y | x will become y |
    | | | x will go to y |
    | /. | x/.y | x where y |
    | //. | x//.y | x where repeatedly y |
    | = | x=y | x is y |
    | := | x:=y | x will be y |
    | ^= | x[y]^=z | y remembers x[y] is z |
    | ^:= | x[y]^:=z | y remembers x[y] will be z |
    | /: | x/:y=z | x remembers y is z |
    | /: | x/:y:=z | x remembers y will be z |
    | . | x=. | x is cleared |
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––





    share|improve this answer











    $endgroup$












    • $begingroup$
      thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 16:52






    • 1




      $begingroup$
      As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
      $endgroup$
      – bobthechemist
      Apr 27 at 17:25










    • $begingroup$
      @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
      $endgroup$
      – Roman
      Apr 27 at 18:34










    • $begingroup$
      Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 19:39










    • $begingroup$
      Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
      $endgroup$
      – Roman
      Apr 27 at 21:37













    18












    18








    18





    $begingroup$

    Starting a brain dump of ideas, listening to my inner monologue. Please feel free to edit and add suggestions. Here is a list of most operators.



    | sym | example | pronunciation | votes, comments, rants
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––––––––
    | :: | x::y | x says y |
    | # | # | slot |
    | ## | ## | all slots |
    | & | x& | x end-of-function |
    | % | % | previous output |
    | : | x:_ | x-pattern |
    | | | anything, call it x |
    | /; | x_/;y | x-pattern that y |
    | | | anything that y, call it x |
    | ? | x_?yQ | x-pattern that is y |
    | | | anything y, call it x |
    | _ | x_ | x-pattern |
    | | | anything, call it x |
    | _ | x_y | x-pattern of type y |
    | | | anything of type y, call it x |
    | __ | x__ | x-patterns |
    | | | any sequence, call it x |
    | ___ | x___ | x-maybepatterns |
    | | | any sequence, even empty, call it x |
    | _. | x_. | x-defaultpattern |
    | | | anything, call it x, with default |
    | : | x_:y | x-pattern defaults to y |
    | | | anything, call it x, with default y |
    | .. | x.. | one or more x |
    | ... | x... | zero or more x |
    | | 1,2,3 | list of 1, 2, 3 |
    | [[]] | x[[y]] | element y of x |
    | ;; | x;;y;;z | from x to y in steps of z |
    | == | x==y | x equal to y |
    | != | x!=y | x not equal to y |
    | === | x===y | x same as y |
    | =!= | x=!=y | x not same as y |
    | ++ | x++ | x and then increment it |
    | ++ | ++x | x but increment it first |
    | -- | x-- | x and then decrement it |
    | -- | --x | x but decrement it first |
    | [] | x[y] | x of y |
    | | x[y,z] | x of y and z |
    | @* | x@*y | x of y |
    | // | x//y | x then do y |
    | /* | x/*y | y of x |
    | | x//y/*z | x then do y then do z |
    | @ | x@y | x of y |
    | ~ | x~f~y | f of x and y |
    | /@ | x/@y | map x onto y |
    | //@ | x//@y | mapall x onto y |
    | | | map x onto all levels of y |
    | @@ | x@@y | x-head on y |
    | @@@ | x@@@y | map x-head onto y |
    | -> | x->y | x becomes y |
    | | | x goes to y |
    | :> | x:>y | x will become y |
    | | | x will go to y |
    | /. | x/.y | x where y |
    | //. | x//.y | x where repeatedly y |
    | = | x=y | x is y |
    | := | x:=y | x will be y |
    | ^= | x[y]^=z | y remembers x[y] is z |
    | ^:= | x[y]^:=z | y remembers x[y] will be z |
    | /: | x/:y=z | x remembers y is z |
    | /: | x/:y:=z | x remembers y will be z |
    | . | x=. | x is cleared |
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––





    share|improve this answer











    $endgroup$



    Starting a brain dump of ideas, listening to my inner monologue. Please feel free to edit and add suggestions. Here is a list of most operators.



    | sym | example | pronunciation | votes, comments, rants
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––––––––
    | :: | x::y | x says y |
    | # | # | slot |
    | ## | ## | all slots |
    | & | x& | x end-of-function |
    | % | % | previous output |
    | : | x:_ | x-pattern |
    | | | anything, call it x |
    | /; | x_/;y | x-pattern that y |
    | | | anything that y, call it x |
    | ? | x_?yQ | x-pattern that is y |
    | | | anything y, call it x |
    | _ | x_ | x-pattern |
    | | | anything, call it x |
    | _ | x_y | x-pattern of type y |
    | | | anything of type y, call it x |
    | __ | x__ | x-patterns |
    | | | any sequence, call it x |
    | ___ | x___ | x-maybepatterns |
    | | | any sequence, even empty, call it x |
    | _. | x_. | x-defaultpattern |
    | | | anything, call it x, with default |
    | : | x_:y | x-pattern defaults to y |
    | | | anything, call it x, with default y |
    | .. | x.. | one or more x |
    | ... | x... | zero or more x |
    | | 1,2,3 | list of 1, 2, 3 |
    | [[]] | x[[y]] | element y of x |
    | ;; | x;;y;;z | from x to y in steps of z |
    | == | x==y | x equal to y |
    | != | x!=y | x not equal to y |
    | === | x===y | x same as y |
    | =!= | x=!=y | x not same as y |
    | ++ | x++ | x and then increment it |
    | ++ | ++x | x but increment it first |
    | -- | x-- | x and then decrement it |
    | -- | --x | x but decrement it first |
    | [] | x[y] | x of y |
    | | x[y,z] | x of y and z |
    | @* | x@*y | x of y |
    | // | x//y | x then do y |
    | /* | x/*y | y of x |
    | | x//y/*z | x then do y then do z |
    | @ | x@y | x of y |
    | ~ | x~f~y | f of x and y |
    | /@ | x/@y | map x onto y |
    | //@ | x//@y | mapall x onto y |
    | | | map x onto all levels of y |
    | @@ | x@@y | x-head on y |
    | @@@ | x@@@y | map x-head onto y |
    | -> | x->y | x becomes y |
    | | | x goes to y |
    | :> | x:>y | x will become y |
    | | | x will go to y |
    | /. | x/.y | x where y |
    | //. | x//.y | x where repeatedly y |
    | = | x=y | x is y |
    | := | x:=y | x will be y |
    | ^= | x[y]^=z | y remembers x[y] is z |
    | ^:= | x[y]^:=z | y remembers x[y] will be z |
    | /: | x/:y=z | x remembers y is z |
    | /: | x/:y:=z | x remembers y will be z |
    | . | x=. | x is cleared |
    |––––––|–––––––––––––|–––––––––––––––––––––––––––––––––––––|–––––––––––––––––––






    share|improve this answer














    share|improve this answer



    share|improve this answer








    edited Apr 27 at 21:51

























    answered Apr 27 at 15:57









    RomanRoman

    6,71511134




    6,71511134











    • $begingroup$
      thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 16:52






    • 1




      $begingroup$
      As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
      $endgroup$
      – bobthechemist
      Apr 27 at 17:25










    • $begingroup$
      @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
      $endgroup$
      – Roman
      Apr 27 at 18:34










    • $begingroup$
      Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 19:39










    • $begingroup$
      Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
      $endgroup$
      – Roman
      Apr 27 at 21:37
















    • $begingroup$
      thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 16:52






    • 1




      $begingroup$
      As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
      $endgroup$
      – bobthechemist
      Apr 27 at 17:25










    • $begingroup$
      @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
      $endgroup$
      – Roman
      Apr 27 at 18:34










    • $begingroup$
      Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
      $endgroup$
      – Bob Ueland
      Apr 27 at 19:39










    • $begingroup$
      Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
      $endgroup$
      – Roman
      Apr 27 at 21:37















    $begingroup$
    thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
    $endgroup$
    – Bob Ueland
    Apr 27 at 16:52




    $begingroup$
    thank you for a nice beginning. I often pronounce x_ as "anything, call it x". I guess you could pronounce x__ as "any sequence, call it x". And maybe you could pronounce x___ as "any sequence including empty, call it x".
    $endgroup$
    – Bob Ueland
    Apr 27 at 16:52




    1




    1




    $begingroup$
    As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
    $endgroup$
    – bobthechemist
    Apr 27 at 17:25




    $begingroup$
    As I spend a fair amount of time teaching Mathematica to students who have never done programming, having a list of terms to use for the language's typography - if only to be self-consistent - is very helpful.
    $endgroup$
    – bobthechemist
    Apr 27 at 17:25












    $begingroup$
    @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
    $endgroup$
    – Roman
    Apr 27 at 18:34




    $begingroup$
    @bobthechemist please feel free to add the way you would pronounce things to the list! I teach Mathematica too and would be keen to have a consistent list.
    $endgroup$
    – Roman
    Apr 27 at 18:34












    $begingroup$
    Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
    $endgroup$
    – Bob Ueland
    Apr 27 at 19:39




    $begingroup$
    Do you have _h in your table? It represents any expression having the h as its head. For instance f[x_Integer] :=... defines a function that takes any integer as a parameter. I would pronounce x_Integer as "any integer call it x".
    $endgroup$
    – Bob Ueland
    Apr 27 at 19:39












    $begingroup$
    Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
    $endgroup$
    – Roman
    Apr 27 at 21:37




    $begingroup$
    Yes @BobUeland I had extrapolated your earlier comment to include x_y as "anything of type y, call it x".
    $endgroup$
    – Roman
    Apr 27 at 21:37











    13












    $begingroup$

    You could try using SpokenString:



    SpokenString[HoldForm[x + y /. x->2]]



    "x plus y slash dot x goes to 2"




    Addendum



    If you don't mind messing with internal functions, it is possible to customize the output of SpokenString. For this purpose, it is convenient to make use of my ExtractDownValues function reproduced below:



    SetAttributes[ExtractDownValues, HoldAll]

    ExtractDownValues[sym_[args__]] := ExtractDownValues[sym,args]
    ExtractDownValues[sym_,args__] := Cases[
    DownValues[sym],_[h_,_] /; MatchQ[Unevaluated[sym[args]],h]
    ]


    The internal function that does most of the heavy lifting is SpokenStringDump`SSText:



    TracePrint[SpokenString[HoldForm[x + y /. x -> 2]], _SpokenStringDump`SSText]



    SpokenStringDump`SSText[x+y/. x->2]



    SpokenStringDump`SSText[x+y]



    SpokenStringDump`SSText[x]



    SpokenStringDump`SSText[y]



    SpokenStringDump`SSText[2]



    SpokenStringDump`SSText[x->2]



    SpokenStringDump`SSText[x]



    SpokenStringDump`SSText[2]



    "x plus y slash dot x goes to 2"




    Using ExtractDownValues we find:



    ExtractDownValues @ SpokenStringDump`SSText[x + y /. x -> 2]



    HoldPattern[
    SpokenStringDump`SSText[SpokenStringDump`a_ /. SpokenStringDump`b_]] :>
    SpokenStringDump`SpeakQuantity[SpokenStringDump`a, ReplaceAll, True] ~~
    " slash dot " ~~
    If[ListQ[Unevaluated[SpokenStringDump`b]],
    SpokenStringDump`SpeakListContents[SpokenStringDump`b],
    SpokenStringDump`SpeakQuantity[SpokenStringDump`b, ReplaceAll, True]],
    HoldPattern[
    SpokenStringDump`SSText[SpokenStringDump`f_[SpokenStringDump`a___]]] :>
    Module[SpokenStringDump`ans =
    SpokenStringDump`SSText0[SpokenStringDump`f[SpokenStringDump`a]],
    If[Head[SpokenStringDump`ans] =!= SpokenStringDump`SSText0 && !
    MemberQ[SpokenStringDump`ans, $Failed, 0, 1], SpokenStringDump`ans,
    SpokenStringDump`SSTextFallThrough[
    Unevaluated[SpokenStringDump`f[SpokenStringDump`a]]]]]




    Notice the " slash dot " string. So, modifying this downvalue to:



    SpokenStringDump`SSText[a_ /. b_] := SpokenStringDump`SpeakQuantity[a,ReplaceAll,True] ~~ 
    " where " ~~
    If[ListQ[Unevaluated[b]],
    SpokenStringDump`SpeakListContents[b],
    SpokenStringDump`SpeakQuantity[b,ReplaceAll,True]
    ]


    will produce:



    SpokenString[HoldForm[x + y /. x->2]]



    "x plus y where x goes to 2"







    share|improve this answer











    $endgroup$

















      13












      $begingroup$

      You could try using SpokenString:



      SpokenString[HoldForm[x + y /. x->2]]



      "x plus y slash dot x goes to 2"




      Addendum



      If you don't mind messing with internal functions, it is possible to customize the output of SpokenString. For this purpose, it is convenient to make use of my ExtractDownValues function reproduced below:



      SetAttributes[ExtractDownValues, HoldAll]

      ExtractDownValues[sym_[args__]] := ExtractDownValues[sym,args]
      ExtractDownValues[sym_,args__] := Cases[
      DownValues[sym],_[h_,_] /; MatchQ[Unevaluated[sym[args]],h]
      ]


      The internal function that does most of the heavy lifting is SpokenStringDump`SSText:



      TracePrint[SpokenString[HoldForm[x + y /. x -> 2]], _SpokenStringDump`SSText]



      SpokenStringDump`SSText[x+y/. x->2]



      SpokenStringDump`SSText[x+y]



      SpokenStringDump`SSText[x]



      SpokenStringDump`SSText[y]



      SpokenStringDump`SSText[2]



      SpokenStringDump`SSText[x->2]



      SpokenStringDump`SSText[x]



      SpokenStringDump`SSText[2]



      "x plus y slash dot x goes to 2"




      Using ExtractDownValues we find:



      ExtractDownValues @ SpokenStringDump`SSText[x + y /. x -> 2]



      HoldPattern[
      SpokenStringDump`SSText[SpokenStringDump`a_ /. SpokenStringDump`b_]] :>
      SpokenStringDump`SpeakQuantity[SpokenStringDump`a, ReplaceAll, True] ~~
      " slash dot " ~~
      If[ListQ[Unevaluated[SpokenStringDump`b]],
      SpokenStringDump`SpeakListContents[SpokenStringDump`b],
      SpokenStringDump`SpeakQuantity[SpokenStringDump`b, ReplaceAll, True]],
      HoldPattern[
      SpokenStringDump`SSText[SpokenStringDump`f_[SpokenStringDump`a___]]] :>
      Module[SpokenStringDump`ans =
      SpokenStringDump`SSText0[SpokenStringDump`f[SpokenStringDump`a]],
      If[Head[SpokenStringDump`ans] =!= SpokenStringDump`SSText0 && !
      MemberQ[SpokenStringDump`ans, $Failed, 0, 1], SpokenStringDump`ans,
      SpokenStringDump`SSTextFallThrough[
      Unevaluated[SpokenStringDump`f[SpokenStringDump`a]]]]]




      Notice the " slash dot " string. So, modifying this downvalue to:



      SpokenStringDump`SSText[a_ /. b_] := SpokenStringDump`SpeakQuantity[a,ReplaceAll,True] ~~ 
      " where " ~~
      If[ListQ[Unevaluated[b]],
      SpokenStringDump`SpeakListContents[b],
      SpokenStringDump`SpeakQuantity[b,ReplaceAll,True]
      ]


      will produce:



      SpokenString[HoldForm[x + y /. x->2]]



      "x plus y where x goes to 2"







      share|improve this answer











      $endgroup$















        13












        13








        13





        $begingroup$

        You could try using SpokenString:



        SpokenString[HoldForm[x + y /. x->2]]



        "x plus y slash dot x goes to 2"




        Addendum



        If you don't mind messing with internal functions, it is possible to customize the output of SpokenString. For this purpose, it is convenient to make use of my ExtractDownValues function reproduced below:



        SetAttributes[ExtractDownValues, HoldAll]

        ExtractDownValues[sym_[args__]] := ExtractDownValues[sym,args]
        ExtractDownValues[sym_,args__] := Cases[
        DownValues[sym],_[h_,_] /; MatchQ[Unevaluated[sym[args]],h]
        ]


        The internal function that does most of the heavy lifting is SpokenStringDump`SSText:



        TracePrint[SpokenString[HoldForm[x + y /. x -> 2]], _SpokenStringDump`SSText]



        SpokenStringDump`SSText[x+y/. x->2]



        SpokenStringDump`SSText[x+y]



        SpokenStringDump`SSText[x]



        SpokenStringDump`SSText[y]



        SpokenStringDump`SSText[2]



        SpokenStringDump`SSText[x->2]



        SpokenStringDump`SSText[x]



        SpokenStringDump`SSText[2]



        "x plus y slash dot x goes to 2"




        Using ExtractDownValues we find:



        ExtractDownValues @ SpokenStringDump`SSText[x + y /. x -> 2]



        HoldPattern[
        SpokenStringDump`SSText[SpokenStringDump`a_ /. SpokenStringDump`b_]] :>
        SpokenStringDump`SpeakQuantity[SpokenStringDump`a, ReplaceAll, True] ~~
        " slash dot " ~~
        If[ListQ[Unevaluated[SpokenStringDump`b]],
        SpokenStringDump`SpeakListContents[SpokenStringDump`b],
        SpokenStringDump`SpeakQuantity[SpokenStringDump`b, ReplaceAll, True]],
        HoldPattern[
        SpokenStringDump`SSText[SpokenStringDump`f_[SpokenStringDump`a___]]] :>
        Module[SpokenStringDump`ans =
        SpokenStringDump`SSText0[SpokenStringDump`f[SpokenStringDump`a]],
        If[Head[SpokenStringDump`ans] =!= SpokenStringDump`SSText0 && !
        MemberQ[SpokenStringDump`ans, $Failed, 0, 1], SpokenStringDump`ans,
        SpokenStringDump`SSTextFallThrough[
        Unevaluated[SpokenStringDump`f[SpokenStringDump`a]]]]]




        Notice the " slash dot " string. So, modifying this downvalue to:



        SpokenStringDump`SSText[a_ /. b_] := SpokenStringDump`SpeakQuantity[a,ReplaceAll,True] ~~ 
        " where " ~~
        If[ListQ[Unevaluated[b]],
        SpokenStringDump`SpeakListContents[b],
        SpokenStringDump`SpeakQuantity[b,ReplaceAll,True]
        ]


        will produce:



        SpokenString[HoldForm[x + y /. x->2]]



        "x plus y where x goes to 2"







        share|improve this answer











        $endgroup$



        You could try using SpokenString:



        SpokenString[HoldForm[x + y /. x->2]]



        "x plus y slash dot x goes to 2"




        Addendum



        If you don't mind messing with internal functions, it is possible to customize the output of SpokenString. For this purpose, it is convenient to make use of my ExtractDownValues function reproduced below:



        SetAttributes[ExtractDownValues, HoldAll]

        ExtractDownValues[sym_[args__]] := ExtractDownValues[sym,args]
        ExtractDownValues[sym_,args__] := Cases[
        DownValues[sym],_[h_,_] /; MatchQ[Unevaluated[sym[args]],h]
        ]


        The internal function that does most of the heavy lifting is SpokenStringDump`SSText:



        TracePrint[SpokenString[HoldForm[x + y /. x -> 2]], _SpokenStringDump`SSText]



        SpokenStringDump`SSText[x+y/. x->2]



        SpokenStringDump`SSText[x+y]



        SpokenStringDump`SSText[x]



        SpokenStringDump`SSText[y]



        SpokenStringDump`SSText[2]



        SpokenStringDump`SSText[x->2]



        SpokenStringDump`SSText[x]



        SpokenStringDump`SSText[2]



        "x plus y slash dot x goes to 2"




        Using ExtractDownValues we find:



        ExtractDownValues @ SpokenStringDump`SSText[x + y /. x -> 2]



        HoldPattern[
        SpokenStringDump`SSText[SpokenStringDump`a_ /. SpokenStringDump`b_]] :>
        SpokenStringDump`SpeakQuantity[SpokenStringDump`a, ReplaceAll, True] ~~
        " slash dot " ~~
        If[ListQ[Unevaluated[SpokenStringDump`b]],
        SpokenStringDump`SpeakListContents[SpokenStringDump`b],
        SpokenStringDump`SpeakQuantity[SpokenStringDump`b, ReplaceAll, True]],
        HoldPattern[
        SpokenStringDump`SSText[SpokenStringDump`f_[SpokenStringDump`a___]]] :>
        Module[SpokenStringDump`ans =
        SpokenStringDump`SSText0[SpokenStringDump`f[SpokenStringDump`a]],
        If[Head[SpokenStringDump`ans] =!= SpokenStringDump`SSText0 && !
        MemberQ[SpokenStringDump`ans, $Failed, 0, 1], SpokenStringDump`ans,
        SpokenStringDump`SSTextFallThrough[
        Unevaluated[SpokenStringDump`f[SpokenStringDump`a]]]]]




        Notice the " slash dot " string. So, modifying this downvalue to:



        SpokenStringDump`SSText[a_ /. b_] := SpokenStringDump`SpeakQuantity[a,ReplaceAll,True] ~~ 
        " where " ~~
        If[ListQ[Unevaluated[b]],
        SpokenStringDump`SpeakListContents[b],
        SpokenStringDump`SpeakQuantity[b,ReplaceAll,True]
        ]


        will produce:



        SpokenString[HoldForm[x + y /. x->2]]



        "x plus y where x goes to 2"








        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited Apr 27 at 19:18

























        answered Apr 27 at 13:51









        Carl WollCarl Woll

        76.6k3100201




        76.6k3100201













            Popular posts from this blog

            Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

            Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

            Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form