I realised that it was working perfectly. learned_chains will show more than three words when the value of the dictionary has a length greater than 1
Cleared the wrong file