Repository Public License Research preview
1% S01-F03 — Distribution du mot suivant, calculée sur le mini-corpus de 12 phrases, pour deux tailles de contexte.2% DONNÉES : S01-F03-donnees.tex, généré par demos/src/atlas_s01/exporter_donnees_figure.py (jamais saisi à la main).3% Idée : avec un seul mot de contexte, « chat » est le plus probable après « ... sur le », ce qui est absurde ;4% deux mots de contexte suffisent à corriger. Plus de contexte = meilleures prédictions.5\input{S01-F03-donnees.tex}6\begin{tikzpicture}7 % Catégories fantômes : même espacement vertical des barres dans les deux graphiques.8 \edef\atlaspad{\AtlasFigMotsDeuxMots,v1,v2,v3,v4,v5}9 \begin{axis}[atlas probability bars, name=un, width=60mm, height=50mm, xmax=0.78,10 xtick={0,0.2,0.4,0.6}, symbolic y coords/.expand once=\AtlasFigMotsUnMot,11 title={Contexte de 1 mot : « … le \rule{5mm}{.5pt} »}]12 \edef\atlasplot{\noexpand\addplot[atlas bar flow] coordinates {\AtlasFigCoordsUnMot};}\atlasplot13 \node[atlas tag=atlasHazard, anchor=south east] at (rel axis cs:1,.33) {« dort sur le chat » ?};14 \node[atlas note, anchor=north east, align=right, fill=atlasBg, inner sep=2pt] at (rel axis cs:1,.31) {le plus probable,\\ mais absurde};15 \end{axis}16 \begin{axis}[atlas probability bars, name=deux, at={($(un.south east)+(25mm,0)$)}, anchor=south west,17 width=60mm, height=50mm, xmax=0.78, xtick={0,0.2,0.4,0.6},18 symbolic y coords/.expand once=\atlaspad, ymax=v5,19 title={Contexte de 2 mots : « … sur le \rule{5mm}{.5pt} »}]20 \edef\atlasplot{\noexpand\addplot[atlas bar valid] coordinates {\AtlasFigCoordsDeuxMots};}\atlasplot21 \node[atlas tag=atlasValid, anchor=south east] at (rel axis cs:1,.33) {« dort sur le tapis »};22 \node[atlas note, anchor=north east, align=right, fill=atlasBg, inner sep=2pt] at (rel axis cs:1,.31) {un mot de contexte de plus\\ suffit à corriger};23 \end{axis}24\end{tikzpicture}25