Natural Language Processing 1
Natural Language Processing 1
Aarti Dharmani
Main approaches in NLP
1. Rule-based Approach:
• This approach relies on predefined linguistic rules and patterns to
process text.
• Linguistic experts and programmers manually create rules that
encode knowledge about language.
• These rules are used to perform tasks such as tokenization, part-of-
speech tagging, parsing, and information extraction.
• Rule-based systems are based on explicit, handcrafted rules and are
effective for domains with well-defined rules.
2. Statistical Approach:
• Statistical NLP, also known as data-driven or machine learning based
NLP, utilizes statistical models and algorithms to learn patterns and
structures from large amounts of annotated text data.
• These models use probabilistic techniques to make predictions about
linguistic phenomena based on observed patterns in the training
data.
• Statistical NLP techniques include machine translation, named entity
recognition, sentiment analysis, and text classification.
• Statistical models require large amounts of annotated training data
and can automatically extract relevant features from the data.
3. Neural Network Approach:
• Neural networks have revolutionized NLP in recent years.
• Deep learning models, such as recurrent neural networks (RNNs) and
transformers, have shown remarkable performance in various NLP
tasks.
• These models can learn hierarchical representations of text data and
capture complex linguistic patterns.
• They excel in tasks such as language modeling, machine translation,
sentiment analysis, and question answering.
• Neural network approaches require substantial computational
resources and large amounts of annotated data for training.
4. Pre-trained Language Models:
• Pre-trained language models, such as BERT (Bidirectional Encoder
Representations from Transformers) and GPT (Generative Pre-trained
Transformer), have gained popularity in recent years.
• These models are trained on large-scale text data and capture rich
linguistic representations.
• They can be fine-tuned for specific NLP tasks, requiring less task
specific data for training and achieving state-of-the-art performance
in various tasks.
Function v/s Content words
“He’s interested in taking Economics class”
There is another law by Zipf that correlates the length of the word; that means, the
number of characters the word has with the frequency of the word and it says the
frequencies of the word is inversely proportional to its length (English)
Heap’s Law
• This law can be described like as the number of words in a document
increases, the rate of the count of distinct words available in the
document slows down.
• It relates the volabulary size with number of tokens (document),
which can be evaluated with the following formula:
𝑉 = 𝐾. 𝑁𝛽
where V: Vocabulary size, K:positive constant (value between 10-100), N: number
of tokens, ᵝ: ranges between 0.4-0.6