Learning what words can occur before or after a given word. Such learning is a focus of machine learning and artificial intelligence more generally.
See Artificial intelligence (AI), Grammaticization (or grammaticalization), Language development, Statistical learning