HomeLearnCoursesHackathonsAccount
NLP Fundamentals
How NLP Approaches Evolved · 1/2

From hand-written rules to statistical learning

The earliest NLP systems were rule-based: linguists and engineers hand-wrote grammar rules and compiled word lists to tell a program how to parse sentences or respond to input. If you wanted a system to detect questions, you might write a rule looking for sentences starting with 'who', 'what', 'where', or ending in a question mark. This approach could work for narrow, well-defined tasks, but it was brittle. Real language is full of exceptions, sarcasm, slang, and structures nobody thought to write a rule for, and every new edge case required a human to go back and patch the rules by hand. It didn't generalize.

Statistical machine learning changed this by having systems learn patterns from labeled examples instead of being told the rules directly. Given thousands of sentences labeled with their correct part-of-speech tags, a statistical model could learn the probability that a given word is a noun versus a verb based on patterns in the data. This was a real leap forward, systems could now handle cases they hadn't explicitly been programmed for, but it still required humans to engineer useful features by hand, deciding things like 'does this word end in -ing' or 'is the previous word a determiner' for the model to learn from.