wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Tokenization: Hướng Dẫn Chuyên Sâu

Total questions: 121

Worksheet time: 3hrs 26mins

Name
Class
Date
1.

What is a Token?

4 lines
2.

Why is Tokenization an essential step?

4 lines
3.

What are the inherent challenges of Tokenization?

4 lines
4.

What is Word-level Tokenization?

a)

Simple but limited

b)

Comprehensive but inefficient

c)

Balanced and effective

d)

None of the above

5.

What is Character-level Tokenization?

a)

Simple but limited

b)

Comprehensive but inefficient

c)

Balanced and effective

d)

None of the above

6.

What is Subword Tokenization?

a)

Simple but limited

b)

Comprehensive but inefficient

c)

Balanced and effective

d)

None of the above

7.

What are the main techniques of Subword Tokenization?

4 lines
8.

What is Byte Pair Encoding (BPE)?

4 lines
9.

What is the training phase mechanism of BPE?

4 lines
10.

What is the inference phase process of BPE?

4 lines
11.

What is WordPiece?

4 lines
12.

What are the characteristics and differences with BPE?

4 lines
13.

What is the training phase mechanism of WordPiece?

4 lines
14.

What is the inference phase process of WordPiece?

4 lines
15.

What is SentencePiece?

4 lines
16.

What is the philosophy of 'Language-Agnostic' and 100% recovery capability?

4 lines
17.

What is the mechanism for handling spaces and underscores in SentencePiece?

4 lines
18.

What is SentencePiece BPE?

4 lines
19.

What is SentencePiece Unigram?

4 lines
20.

What is the comparison between SentencePiece BPE and SentencePiece Unigram?

4 lines
21.

What is Vocabulary and its role?

4 lines
22.

What is the size of vocabulary (vocab_size) and its impact?

4 lines
23.

What are Special Tokens and their common types?

4 lines
24.

What is OOV (Out-Of-Vocabulary) Handling?

4 lines
25.

What is the difference between cased and uncased Tokenization?

4 lines
26.

What is Max Sequence Length and its implications?

4 lines
27.

What is Reversibility in Tokenization?

4 lines
28.

What is Tokenization in modern PLM architectures?

4 lines
29.

What is BERT and its relation to WordPiece?

4 lines
30.

What is RoBERTa / GPT / Llama and its relation to Byte-level BPE?

4 lines
31.

What is T5 / XLNet and its relation to SentencePiece?

4 lines
32.

What is PhoBERT and its relation to RDRsegmenter + SentencePiece Unigram?

4 lines
33.

What is the process of Tokenization in NLP Pipeline?

4 lines
34.

What is the process of converting to Token IDs?

4 lines
35.

What is the process of creating Embeddings?

4 lines
36.

What is the calculation and learning of Embeddings?

4 lines
37.

What is the process of inputting into the Transformer Model?

4 lines
38.

What is the training process?

4 lines
39.

What is a token in the context of NLP?

a)

A unit of meaning that a text string is divided into

b)

A type of punctuation

c)

A character in a string

d)

A special token used in models

40.

Why is tokenization an essential step?

a)

It helps convert unstructured text into discrete units

b)

It reduces data dimensionality

c)

It manages large vocabularies

d)

All of the above

41.

What are the inherent challenges of tokenization?

a)

Word boundaries

b)

Punctuation and special characters

c)

Capitalization

d)

All of the above

42.

Fill in the blank: Tokens are a bridge to convert text into ______.

4 lines
43.

How should emojis be processed?

4 lines
44.

What are the advantages of word-level tokenization?

a)

Easy to implement and understand

b)

Tokens have clear semantic meaning

c)

No OOV issues

d)

Small vocabulary size

45.

What are the disadvantages of character-level tokenization?

a)

Never OOV

b)

Long token sequences

c)

Small vocabulary size

d)

Loss of semantic information

46.

What is Subword Tokenization?

4 lines
47.

What is Subword Tokenization?

a)

A method that balances between word-level and character-level

b)

A technique that only uses complete words

c)

A process that ignores subwords

d)

A way to tokenize only characters

48.

What is one of the main benefits of Subword Tokenization?

a)

It reduces OOV effectively

b)

It increases vocabulary size

c)

It only uses characters

d)

It ignores semantic information

49.

What are the three main Subword Tokenization techniques?

a)

Byte Pair Encoding, WordPiece, SentencePiece

b)

Character Encoding, WordPiece, SentencePiece

c)

Byte Pair Encoding, Word Encoding, SentencePiece

d)

Byte Pair Encoding, WordPiece, Character Encoding

50.

What is the core idea of Byte Pair Encoding (BPE)?

a)

Start with characters or bytes in the corpus

b)

Only use complete words

c)

Ignore the frequency of tokens

d)

Use only one character at a time

51.

What is the first step in the training phase of BPE?

a)

Pre-tokenization

b)

Token merging

c)

Corpus initialization

d)

Character counting

52.

What is the first step in the BPE process?

a)

Split words into characters

b)

Merge tokens

c)

Update vocabulary

d)

Count token pairs

53.

What happens in the merging step of BPE?

a)

Tokens are combined into a new token

b)

Tokens are split into characters

c)

Vocabulary is updated

d)

Corpus is replaced

54.

What is the final vocabulary of BPE after multiple iterations?

a)

{l, o, w, _, e, r, n, s, t, i, d, es, est, lo, low, er, low_, new, new_, newes, newest_, wid, widest_}

b)

{}

c)

Only single characters

d)

Only merged tokens

55.

What is the main characteristic of the WordPiece method?

a)

It relies on pre-tokenization

b)

It does not require a vocabulary

c)

It is faster than BPE

d)

It uses a different merging strategy

56.

What is the output for the input 'newest' using the greedy segmentation?

a)

['new', 'est_']

b)

['newest']

c)

['newest_']

d)

['new', 'est']

57.

What is the output for the OOV input 'lowerer'?

a)

['low', 'er', 'er_']

b)

['lowerer']

c)

['low', 'er']

d)

['[UNK]']

58.

What is the main characteristic of WordPiece?

a)

It relies on pre-tokenization.

b)

It loses whitespace information.

c)

It uses a likelihood score for merging.

d)

It does not require traditional word segmentation.

59.

What does the prefix ## indicate in WordPiece?

a)

It marks the beginning of a word.

b)

It indicates a subword that is not the start of a word.

c)

It shows a special character.

d)

It is used for punctuation.

60.

What is the first step in the training phase of WordPiece?

a)

Preprocess the text into words.

b)

Merge pairs based on score.

c)

Update the vocabulary.

d)

Segment words into characters.

61.

What is the goal of the pair merging process?

a)

To find pairs that occur together more often than randomly.

b)

To create new tokens.

c)

To update the corpus.

d)

To preprocess the text.

62.

What happens in step B of the pair merging process?

a)

Calculate the frequency of the pair.

b)

Select the pair with the highest score.

c)

Update the vocabulary.

d)

Replace occurrences in the corpus.

63.

What is the process of supervised learning?

4 lines
64.

What is the output for the input 'unsupervised'?

a)

unsuper

b)

##vised

65.

What is the advantage of using SentencePiece?

4 lines
66.

What does SentencePiece do with spaces?

4 lines
67.

What is the special Unicode character for U+0020?

a)

U+2581 LOWER HALF BLOCK

b)

U+005F LOW LINE

c)

U+0020 SPACE

d)

U+2580 FULL BLOCK

68.

What does the underscore represent in the normalization process?

a)

Space

b)

Low line

c)

Token

d)

Subword

69.

What is the first step in the SentencePiece BPE training?

a)

Preprocess words

b)

Normalize

c)

Tokenize

d)

Pair merging

70.

What is the output of the greedy longest match?

a)

_my_variable

b)

_my

c)

_variable

d)

_my_variable_

71.

What is the purpose of the pruning mechanism in Unigram model?

a)

To reduce vocabulary size

b)

To increase likelihood

c)

To enhance training speed

d)

To improve accuracy

72.

What is the process of splitting each sentence in the corpus into the optimal subword strings?

4 lines
73.

What is the new calculation based on the frequency of subwords in the optimally segmented corpus?

4 lines
74.

How do you calculate the 'Loss' for each subword?

4 lines
75.

What is the process of trimming the least useful subwords?

4 lines
76.

What is the normalization process for input?

4 lines
77.

What algorithm is used for segmentation inference?

4 lines
78.

What are the characteristics of SentencePiece BPE and SentencePiece Unigram?

4 lines
79.

What is the definition of vocabulary in the context of tokenization?

4 lines
80.

What is the importance of vocabulary size in model performance?

4 lines
81.

What are special tokens in tokenization?

4 lines
82.

What is the purpose of the [CLS] token in BERT?

a)

It is used for classification tasks.

b)

It separates sentences.

c)

It pads shorter sequences.

d)

It represents unknown tokens.

83.

What does the [SEP] token do?

a)

It separates sentences or segments.

b)

It is used for padding.

c)

It represents unknown tokens.

d)

It is the first token in a sequence.

84.

What is the function of the [PAD] token?

a)

To ensure all sequences in a batch have the same length.

b)

To represent unknown tokens.

c)

To separate sentences.

d)

To classify input.

85.

What does the [UNK] token represent?

a)

Tokens not found in the vocabulary.

b)

The beginning of a sentence.

c)

The end of a sentence.

d)

Padding for shorter sequences.

86.

What is the purpose of the [MASK] token?

a)

To predict masked words during training.

b)

To separate sentences.

c)

To represent unknown tokens.

d)

To pad shorter sequences.

87.

What does OOV stand for in tokenization?

a)

Out-Of-Vocabulary

b)

Over-Optimized Vocabulary

c)

Open-Ended Vocabulary

d)

Ordered Vocabulary

88.

What is Subword Tokenization?

a)

Breaking new words into known subwords.

b)

A method to pad sequences.

c)

A way to classify tokens.

d)

A technique for sentence separation.

89.

What does Character Fallback ensure?

a)

100% coverage by retaining all single characters.

b)

Separation of sentences.

c)

Padding of sequences.

d)

Classification of tokens.

90.

What is the difference between cased and uncased tokenization?

a)

Cased retains case information, uncased does not.

b)

Uncased retains case information, cased does not.

c)

Both are the same.

d)

Cased is used for padding.

91.

What is the process of converting all text to lowercase before tokenization?

a)

Lowercasing

b)

Casing

c)

Tokenization

d)

Padding

92.

What are the advantages of lowercasing text?

a)

Reduces vocabulary size

b)

Increases computational efficiency

c)

Preserves grammatical information

d)

Improves generalization

93.

What is the disadvantage of lowercasing text?

a)

Loss of important grammatical information

b)

Increased vocabulary size

c)

Better generalization

d)

Improved resource efficiency

94.

What does 'cased' mean in tokenization?

a)

Preserving case information

b)

Lowercasing all text

c)

Removing punctuation

d)

Tokenizing without spaces

95.

What is the maximum sequence length for BERT-base?

4 lines
96.

What is truncation in the context of tokenization?

a)

Cutting off tokens that exceed max length

b)

Adding padding tokens

c)

Reversing the tokenization process

d)

Preserving original text

97.

What is padding in tokenization?

a)

Adding tokens to meet max length

b)

Removing excess tokens

c)

Reversing tokenization

d)

Preserving case information

98.

What is reversibility in tokenization?

a)

Ability to convert tokens back to original text

b)

Ability to tokenize text

c)

Ability to preserve case

d)

Ability to add padding

99.

What is the tokenizer used in BERT?

a)

WordPiece

b)

Byte-level BPE

c)

SentencePiece

d)

RDRsegmenter

100.

What special tokens are used in BERT?

a)

[CLS], [SEP], [PAD], [UNK], [MASK]

b)

, , , ,

c)

d)

, , , ,

101.

What is the characteristic of RoBERTa's tokenizer?

a)

Always cased by default

b)

Requires pre-tokenization

c)

Uses WordPiece

d)

None of the above

102.

What tokenizer does T5 use?

a)

WordPiece

b)

Byte-level BPE

c)

SentencePiece

d)

RDRsegmenter

103.

What is the output of RDRsegmenter in PhoBERT?

a)

Subword tokens

b)

Word segments

c)

Token IDs

d)

None of the above

104.

What is the first step in the NLP pipeline?

a)

Tokenization

b)

Model Input

c)

Text Processing

d)

None of the above

105.

What is the output of the tokenizer when applied to raw text?

a)

List of subword tokens

b)

Token IDs

c)

Raw text

d)

None of the above

106.

What is the output of converting subword tokens to Token IDs?

a)

List of subword tokens

b)

Input tensor

c)

Unique numerical ID

d)

None of the above

107.

What is the process of converting subword tokens to Token IDs?

4 lines
108.

How are Token, Positional, and Segment Embeddings combined?

4 lines
109.

What is the purpose of Layer Normalization and Dropout in the embedding process?

4 lines
110.

How are embeddings computed and learned during pre-training?

4 lines
111.

When do you need to self-train a Tokenizer?

a)

Unsupported language: When there is no pre-trained model or effective tokenizer for your language.

b)

Domain-specific: Your data has vocabulary, slang, and structure that is very different from existing datasets.

c)

Resource optimization: To create a tokenizer with an optimal vocabulary size for your specific needs.

d)

Research: Experimenting with new tokenizer variants.

112.

What are the detailed steps to self-train a Tokenizer?

4 lines
113.

What is the importance of data quality in training a Tokenizer?

4 lines
114.

What should be done to remove noise in the data?

a)

Remove HTML/XML, non-printable characters.

b)

Process social media features.

c)

Decide how to handle emojis.

d)

Ensure each line is a reasonable sentence/paragraph.

115.

What are the two algorithms mentioned for Tokenization?

a)

SentencePiece (Unigram or BPE)

b)

BytePairEncoding from the tokenizers library

116.

What is the purpose of BytePairEncoding from the tokenizers library?

a)

To have more control over the tokenizer

b)

To ensure 100% recovery of SentencePiece

c)

To simplify the training process

d)

To increase the vocabulary size

117.

What is the model_prefix used for in tokenizer configuration?

a)

To specify the name for the tokenizer model

b)

To define the vocabulary size

c)

To set the model type

d)

To control special tokens

118.

What is the purpose of character_coverage in tokenizer training?

a)

To ensure most Unicode characters are covered

b)

To define the model type

c)

To specify the vocabulary size

d)

To add special tokens

119.

What does the special_tokens array contain?

a)

All necessary special tokens for your Transformer model

b)

Only the vocabulary size

c)

The model prefix

d)

The character coverage value

120.

What is the command to train SentencePiece Unigram?

a)

spm.SentencePieceTrainer.train()

b)

spm.Train()

c)

spm.TrainUnigram()

d)

spm.TrainBPE()

121.

What does the tokenizer.bos_token represent?

a)

Beginning of sequence token

b)

End of sequence token

c)

Unknown token

d)

Padding token