#1 India's Top IT Training Institute
×

About Uncodemy

Know more about who we are and what we stand for.

About Us

About Us

Discover our mission to equip individuals with essential IT skills and industry expertise.

Read More →
UnCodeMy Gallery

UnCodeMy Gallery

Explore highlights from our IT training sessions and success stories.

Read More →
Mentors

Mentors

Meet the industry experts who train and guide you through your course.

Read More →
Free Resources

Free Resources

Free tutorials, interview questions, tools and calculators to help you learn.

Explore →
×

Free Resources

Learn, practice and plan your career — bilkul free.

Tutorials

Tutorials

Step-by-step written tutorials to learn any technology at your own pace.

Read More →
Free Counselling

Free Counselling

Book a free video counselling session and pick the right course for you.

Read More →
Online Compiler

Online Compiler

Write, run and test your code online — no setup required.

Read More →
Home / Blog /

Approaches in NLP

Symbolic, Statistical, Connectionist

Published
4 min read
Scroll Down

Approaches in NLP: overview

Natural language processing (NLP) systems can be built in three broad ways, which also roughly follow the history of the field:

  1. Symbolic (rule-based) approach: experts write grammars, dictionaries and rules.
  2. Statistical approach: probabilistic models learn patterns from large collections of text (corpora).
  3. Connectionist (neural) approach: neural networks learn representations of words and sentences directly from data.

Most practical systems today are hybrids that combine a neural model with some rules or statistical components.

1. Symbolic (rule-based) approach

The symbolic approach represents language knowledge explicitly: grammar rules for parsing, a lexicon of words and their properties, and hand-written rules for meaning. Systems from the 1960s to the 1980s, such as ELIZA and SHRDLU, worked this way, and meaning representations like conceptual dependency belong to this tradition.

  • Strengths: transparent and explainable; needs no training data; precise for narrow, well-defined tasks (for example extracting dates, phone numbers or product codes with patterns).
  • Limitations: rules are slow to write and maintain, break on unexpected wording, slang and spelling mistakes, and do not scale to the variety of real language.

2. Statistical approach

From the late 1980s, NLP shifted to learning from data. Statistical methods estimate probabilities from corpora: n-gram language models predict the next word, hidden Markov models tag parts of speech, and classifiers such as Naive Bayes and logistic regression label documents.

  • Strengths: learns from examples instead of hand-written rules; handles ambiguity by choosing the most probable interpretation; works across domains if data is available.
  • Limitations: needs labelled data; usually relies on hand-designed features such as word counts; treats words as unrelated symbols, so "good" and "great" share nothing unless the data shows it.

3. Connectionist (neural) approach

Connectionist methods use neural networks. Words are represented as dense vectors (embeddings) learned from text, so words with similar meanings end up close together. Recurrent networks such as LSTMs read sentences word by word; since 2017, transformer models, which use attention to relate every word to every other word, have become the standard. Large language models are transformers trained on very large text collections and then adapted to tasks.

  • Strengths: learns features automatically; captures context and similarity of meaning; achieves the best accuracy on most tasks, including translation, summarisation and question answering.
  • Limitations: needs large amounts of data and computing power; hard to explain; can reproduce biases in its training data and can produce fluent but wrong output.

Rules vs statistics on the same task

A tiny sentiment classifier makes the difference concrete. The rule-based version uses a word list plus a negation rule; the statistical version is Naive Bayes trained on six labelled sentences.

import math
from collections import Counter

# Symbolic approach: hand-written rules (a tiny sentiment lexicon plus a negation rule)
POSITIVE, NEGATIVE = {"good", "great", "love", "excellent"}, {"bad", "poor", "hate", "boring"}
def rule_based(text):
    words, score = text.lower().split(), 0
    for i, w in enumerate(words):
        s = (w in POSITIVE) - (w in NEGATIVE)
        if i > 0 and words[i - 1] == "not":
            s = -s                                   # rule: "not good" flips the polarity
        score += s
    return "pos" if score > 0 else "neg" if score < 0 else "neutral"

# Statistical approach: Naive Bayes learned from labelled examples
train = [("great acting and a lovely story", "pos"), ("i loved every minute", "pos"),
         ("a fun and moving film", "pos"), ("dull plot and weak acting", "neg"),
         ("i fell asleep it was dull", "neg"), ("weak story and awful ending", "neg")]
counts = {"pos": Counter(), "neg": Counter()}
for text, label in train:
    counts[label].update(text.split())
vocab = set(counts["pos"]) | set(counts["neg"])
def naive_bayes(text):
    best, best_lp = None, -math.inf
    for label, c in counts.items():
        total = sum(c.values())
        lp = math.log(0.5) + sum(math.log((c[w] + 1) / (total + len(vocab))) for w in text.split())
        if lp > best_lp:
            best, best_lp = label, lp
    return best

for t in ["the film was not good", "a lovely and moving story", "dull and weak"]:
    print(f"{t:<28} rules: {rule_based(t):<8} naive bayes: {naive_bayes(t)}")

Output:

the film was not good        rules: neg      naive bayes: pos
a lovely and moving story    rules: neutral  naive bayes: pos
dull and weak                rules: neutral  naive bayes: neg
  • "not good": the negation rule gets it right. Naive Bayes has never seen "not" or "good", so it guesses from the word "film", which happened to appear in a positive example. Statistical models only know what their data shows.
  • "lovely ... moving": neither word is in the hand-written lexicon, so the rules give up. Naive Bayes learned both words from the training data.
  • A neural model trained on enough text handles both cases, because it learns negation patterns and that "lovely" is similar to "good". That is the practical reason the field moved toward neural methods.

Comparison of NLP approaches

PointSymbolicStatisticalConnectionist (neural)
Knowledge comes fromExperts writing rulesProbabilities estimated from corporaWeights learned from large data
Data neededLittle or noneModerate, often labelledLarge
ExplainabilityHighMediumLow
Handles new wordingPoorlyReasonably, if seen in dataWell
Typical examplesRegex extractors, grammar checkers, ELIZAN-gram models, HMM taggers, Naive Bayes spam filtersWord embeddings, LSTMs, transformers such as BERT and GPT models

No approach is best for everything. Rules remain the right choice for strict formats and safety checks; statistical models are cheap and fast on small data; neural models lead on open-ended language. Hybrid systems often use a neural model for understanding and rules to validate or post-process its output.

For the stages an NLP system goes through, from words to meaning, see the role of NLP in AI and its phases. To practise, try NLP with spaCy or a customer sentiment tracker in Python. NLP is part of Uncodemy's Artificial Intelligence course.