From ecological to lexical diversity: measuring ‘vocabulary richness’ in linguistic corpora