In spoken language, there are no gaps between words; where to place the word boundary often depends on what choice makes the most sense grammatically and given the context.
The grammar for natural languages is not unambiguous[?], i.e. there are often multiple possible parse trees for a given sentence. Choosing the most appropriate one usually requires semantic and contextual information.
Imperfect or irregular input
Foreign or regional accents and vocal impediments in speech; typing or grammatical errors, OCR errors in texts.
Sentences often don't mean what they literally say; for instance a good answer to "Can you pass the salt" is to pass the salt; in most contexts "Yes" is not a good answer, although "No" is better and "I'm afraid that I can't see it" is better yet. Or again, if a class was not offered last year, "The class was not offered last year" is a better answer to the question "How many students failed the class last year?" than "None" is.
... Charles became joint-king of Castile with his mother (who was insane), and also inherited Aragon, Navarre, Granada, Naples, Sicily, Sardinia, and Spanish America[?]. ...