Back In the print window choose "Save as PDF" as the destination
NOTE.CS

Natural Language Processing Basics

1 topic · 28 Nov 2026
1

Natural Language Processing Basics

Artificial Intelligence

What is NLP?

Natural Language Processing is the field of AI that helps computers understand and generate human language.


What is tokenization?

Splitting text into smaller units (tokens) such as words or subwords.


What is WordPiece tokenization?

A subword method used by BERT. Rare words are split into smaller pieces, so unknown words can still be handled.


What is a vocabulary?

The set of all tokens a model knows.


What are padding and truncation in NLP?

Padding adds special tokens to short sequences. Truncation cuts long sequences to a fixed length (we used 128 tokens).


What is an attention mask?

A tensor that tells the model which tokens are real (1) and which are padding (0).


What is an embedding?

An embedding is a numerical representation of an object such as a word, token, or image feature. It allows the model to work with meaningful numerical representations.


Static vs contextual embeddings?

Static embeddings (Word2Vec, GloVe) give one vector per word. Contextual embeddings (BERT) give different vectors depending on the sentence.


What is Word2Vec?

A method that learns word vectors so similar words are close together.


What is GloVe?

Word embeddings learned from word co-occurrence statistics across a large text corpus.


What is Bag of Words?

Represents text by word counts, ignoring order.


What is TF-IDF?

A score that gives high weight to words that are frequent in one document but rare across all documents.


What is an n-gram?

A sequence of n consecutive words, like a bigram (2 words).


What are stop words?

Very common words like "the", "is", "and" that are sometimes removed.


Stemming vs lemmatization?

Stemming cuts words to a rough root ("running" → "run"). Lemmatization uses a dictionary to get the proper base form ("better" → "good").


What is Named Entity Recognition (NER)?

Finding and labeling names, such as diseases, genes, or drugs, in text.


What is text classification?

Assigning a category label to a text, such as symptom text to a disease.


What is WordNet?

A large English database that groups words into sets of synonyms.


What is synonym replacement in text augmentation?

Replacing words with their synonyms (using WordNet) to create new training samples with the same meaning.


What is random word swap?

Randomly changing the position of words in a sentence to create variation.