To give Stochastic Context Free Grammar as an input the user specify a set of productions, one on each line. Each production specifies firstly the probability of this productions, then the non-terminal that we will be replacing, a symbol -> followed by any sequence of terminals and non-terminals. The user does not have to specify which symbols are terminals as the program assumes that any symbol without a production attached to it is a terminal. For an example SCFG shown on the fig. 3, the only terminal is and the non-terminals are , and .
A formal grammar of the input language for Stochastic Context Free Grammar s is defined in 4.3.