The baby has learned that only when he is distraught will the parent reliably come to his aid.
( ( The baby ) ( ( has ( learned ( that ( ( only ( when ( he ( is distraught ) ) ) ) ( ( will ( ( the parent ) reliably ) ) ( come ( to ( his aid ) ) ) ) ) ) ) ) . ) )
(ROOT (S (NP (DT The) (NN baby)) (VP (VBZ has) (VP (VBN learned) (SBAR (IN that) (S (SBAR (RB only) (WHADVP (WRB when)) (S (NP (PRP he)) (VP (VBZ is) (ADJP (JJ distraught))))) (VP (MD will) (ADVP (NP (DT the) (NN parent)) (RB reliably)) (VP (VB come) (PP (TO to) (NP (PRP$ his) (NN aid))))))))) (. .)))
The baby eventually knows that he will only get help from the parent if he is distraught.
( ( The baby ) ( eventually ( ( knows ( that ( he ( ( will only ) ( ( ( get help ) ( from ( the parent ) ) ) ( if ( he ( is distraught ) ) ) ) ) ) ) ) . ) ) )
(ROOT (S (NP (DT The) (NN baby)) (ADVP (RB eventually)) (VP (VBZ knows) (SBAR (IN that) (S (NP (PRP he)) (VP (MD will) (ADVP (RB only)) (VP (VB get) (NP (NN help)) (PP (IN from) (NP (DT the) (NN parent))) (SBAR (IN if) (S (NP (PRP he)) (VP (VBZ is) (ADJP (JJ distraught)))))))))) (. .)))