Natural Language Processing Flashcards
What is Natural Language Processing (NLP)?
NLP is the area of AI focused on enabling computers to understand, interpret, and generate human language.
What are the two main areas of NLP?
Natural Language Understanding (NLU) and Natural Language Generation (NLG).
What is the difference between NLU and NLG?
NLU focuses on interpreting and understanding human input, while NLG involves generating human-like language from data.
Why is natural language difficult for machines to process?
Due to ambiguity, variability, context-dependence, and the complexity of human language.
What is ambiguity in language?
When a sentence or phrase has multiple possible interpretations.
What is an example of syntactic ambiguity?
“I saw the man with the telescope” – it’s unclear who has the telescope.
What are the basic steps of an NLP pipeline?
Tokenization, POS tagging, parsing, named entity recognition, semantic analysis, etc.
What is tokenization?
Splitting text into individual units such as words or sentences.
What is POS tagging?
Part-of-speech tagging assigns word categories like noun, verb, etc., to each token.
What is a language model?
A model that assigns probabilities to sequences of words.
What is the purpose of a language model in NLP?
To predict the next word in a sentence or evaluate the likelihood of a sentence.
What are common types of language models?
N-gram models, neural language models, transformer-based models.
What is an N-gram in NLP?
A sequence of N words used for modeling language.
Give examples of bigrams and trigrams.
Bigram: “I am”, Trigram: “I am happy”
How is the probability of a sentence estimated in an N-gram model?
By multiplying the probabilities of the individual N-grams.
What are limitations of N-gram models?
They have limited context and suffer from data sparsity.
What is smoothing in N-gram models?
A technique to handle unseen N-grams by adjusting probabilities.
Name a common smoothing technique.
Add-one (Laplace) smoothing.
How do neural language models improve over N-gram models?
They learn word embeddings and can model longer dependencies.
What are word embeddings?
Vector representations of words capturing semantic similarity.
What is Word2Vec?
A model that learns word embeddings by predicting word contexts (or vice versa).
What are the two main architectures of Word2Vec?
CBOW (Continuous Bag of Words) and Skip-Gram.
What does CBOW do?
Predicts a word from its surrounding context.
What does Skip-Gram do?
Predicts context words from a target word.
What metric is used to evaluate language models?
Perplexity.
What does a lower perplexity indicate?
Better language model performance (more confident predictions).
Name some applications of NLP.
Machine translation, sentiment analysis, chatbots, information retrieval, etc.