With fvextra that allows mathescape and the help of https://tex.stackexchange.com/a/385068/4427, we can also set the math symbols in typewriter type.
\documentclass{article}
\usepackage{fvextra} % loads also fancyvrb
\usepackage{xpatch}
\DeclareMathVersion{ttmath}
\DeclareSymbolFont{latinletters}{OT1}{\ttdefault}{m}{n}
%\SetSymbolFont{latinletters}{ttmath}{OT1}{\ttdefault}{m}{n}
\SetSymbolFont{letters}{ttmath}{OML}{ccm}{m}{it}
\SetSymbolFont{symbols}{ttmath}{OMS}{ccsy}{m}{n}
\SetSymbolFont{largesymbols}{ttmath}{OMX}{ccex}{m}{n}
\newcommand{\changeletters}{%
\count255=`A
\advance\count255 -1
\loop\ifnum\count255<`Z
\advance\count255 1
\mathcode\count255=\numexpr\number\symlatinletters*256+\count255\relax
\repeat
\count255=`a
\advance\count255 -1
\loop\ifnum\count255<`z
\advance\count255 1
\mathcode\count255=\numexpr\number\symlatinletters*256+\count255\relax
\repeat
\count255=`0
\advance\count255 -1
\loop\ifnum\count255<`9
\advance\count255 1
\mathcode\count255=\numexpr\number\symlatinletters*256+\count255\relax
\repeat
}
\xapptocmd{\ttfamily}{\mathversion{ttmath}\changeletters}{}{}
\begin{document}
\begin{Verbatim}[mathescape,commandchars=\\\{\}]
1 - Train triggers model $X_i \to Y_j$ ($X_i$: source phrase
composed of $i$ words, $Y_j$: target phrase composed of $j$ words
\end{Verbatim}
\end{document}

If you prefer the math letters to be in italics, just change the line after \DeclareMathVersion{ttmath} into
\DeclareSymbolFont{latinletters}{OT1}{\ttdefault}{m}{n}

Also alltt can be used (here I show italic symbols)
\documentclass{article}
\usepackage{alltt}
\usepackage{xpatch}
\DeclareMathVersion{ttmath}
\DeclareSymbolFont{latinletters}{OT1}{\ttdefault}{m}{it}
%\SetSymbolFont{latinletters}{ttmath}{OT1}{\ttdefault}{m}{n}
\SetSymbolFont{letters}{ttmath}{OML}{ccm}{m}{it}
\SetSymbolFont{symbols}{ttmath}{OMS}{ccsy}{m}{n}
\SetSymbolFont{largesymbols}{ttmath}{OMX}{ccex}{m}{n}
\newcommand{\changeletters}{%
\count255=`A
\advance\count255 -1
\loop\ifnum\count255<`Z
\advance\count255 1
\mathcode\count255=\numexpr\number\symlatinletters*256+\count255\relax
\repeat
\count255=`a
\advance\count255 -1
\loop\ifnum\count255<`z
\advance\count255 1
\mathcode\count255=\numexpr\number\symlatinletters*256+\count255\relax
\repeat
\count255=`0
\advance\count255 -1
\loop\ifnum\count255<`9
\advance\count255 1
\mathcode\count255=\numexpr\number\symlatinletters*256+\count255\relax
\repeat
}
\xapptocmd{\ttfamily}{\mathversion{ttmath}\changeletters}{}{}
\begin{document}
\begin{alltt}
1 - Train triggers model \(X\sb{i}\to{}Y\sb{j}\) (\(X\sb{i}\): source phrase
composed of \(i\) words, \(Y\sb{j}\): target phrase composed of \(j\) words
\end{alltt}
\end{document}
The output is the same as the second picture above; however, this has disadvantages as the math input needs to be very careful so as not to introduce unwanted spaces.
\begin{alltt}not\begin{verbatim}. Theallttpackage does not modify theverbatimenvironment. It provides a new environment that acts likeverbatimbut that allows to use maths mode etc. Read the documentation forallttfor other information. – Bakuriu Dec 22 '13 at 11:57verbatim? It does not look like a typical example for verbatim text. – Heiko Oberdiek Jan 29 '14 at 07:04