End-of-chapter quiz - Hugging Face NLP Course

## [](#end-of-chapter-quiz)End-of-chapter quiz

[![Ask a Question](https://img.shields.io/badge/Ask%20a%20question-ffcb4c.svg?logo=data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHZpZXdCb3g9IjAgLTEgMTA0IDEwNiI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOiMyMzFmMjA7fS5jbHMtMntmaWxsOiNmZmY5YWU7fS5jbHMtM3tmaWxsOiMwMGFlZWY7fS5jbHMtNHtmaWxsOiMwMGE5NGY7fS5jbHMtNXtmaWxsOiNmMTVkMjI7fS5jbHMtNntmaWxsOiNlMzFiMjM7fTwvc3R5bGU+PC9kZWZzPjx0aXRsZT5EaXNjb3Vyc2VfbG9nbzwvdGl0bGU+PGcgaWQ9IkxheWVyXzIiPjxnIGlkPSJMYXllcl8zIj48cGF0aCBjbGFzcz0iY2xzLTEiIGQ9Ik01MS44NywwQzIzLjcxLDAsMCwyMi44MywwLDUxYzAsLjkxLDAsNTIuODEsMCw1Mi44MWw1MS44Ni0uMDVjMjguMTYsMCw1MS0yMy43MSw1MS01MS44N1M4MCwwLDUxLjg3LDBaIi8+PHBhdGggY2xhc3M9ImNscy0yIiBkPSJNNTIuMzcsMTkuNzRBMzEuNjIsMzEuNjIsMCwwLDAsMjQuNTgsNjYuNDFsLTUuNzIsMTguNEwzOS40LDgwLjE3YTMxLjYxLDMxLjYxLDAsMSwwLDEzLTYwLjQzWiIvPjxwYXRoIGNsYXNzPSJjbHMtMyIgZD0iTTc3LjQ1LDMyLjEyYTMxLjYsMzEuNiwwLDAsMS0zOC4wNSw0OEwxOC44Niw4NC44MmwyMC45MS0yLjQ3QTMxLjYsMzEuNiwwLDAsMCw3Ny40NSwzMi4xMloiLz48cGF0aCBjbGFzcz0iY2xzLTQiIGQ9Ik03MS42MywyNi4yOUEzMS42LDMxLjYsMCwwLDEsMzguOCw3OEwxOC44Niw4NC44MiwzOS40LDgwLjE3QTMxLjYsMzEuNiwwLDAsMCw3MS42MywyNi4yOVoiLz48cGF0aCBjbGFzcz0iY2xzLTUiIGQ9Ik0yNi40Nyw2Ny4xMWEzMS42MSwzMS42MSwwLDAsMSw1MS0zNUEzMS42MSwzMS42MSwwLDAsMCwyNC41OCw2Ni40MWwtNS43MiwxOC40WiIvPjxwYXRoIGNsYXNzPSJjbHMtNiIgZD0iTTI0LjU4LDY2LjQxQTMxLjYxLDMxLjYxLDAsMCwxLDcxLjYzLDI2LjI5YTMxLjYxLDMxLjYxLDAsMCwwLTQ5LDM5LjYzbC0zLjc2LDE4LjlaIi8+PC9nPjwvZz48L3N2Zz4=)](https://discuss.huggingface.co/t/chapter-5-questions)

This chapter covered a lot of ground! Don’t worry if you didn’t grasp all the details; the next chapters will help you understand how things work under the hood.

Before moving on, though, let’s test what you learned in this chapter.

### [](#1.-the-<code>load_dataset()</code>-function-in-🤗-datasets-allows-you-to-load-a-dataset-from-which-of-the-following-locations?)1\. The `load_dataset()` function in 🤗 Datasets allows you to load a dataset from which of the following locations?

### [](#2.-suppose-you-load-one-of-the-glue-tasks-as-follows:)2\. Suppose you load one of the GLUE tasks as follows:

```
from datasets import load_dataset

dataset = load_dataset("glue", "mrpc", split="train")```

Which of the following commands will produce a random sample of 50 elements from `dataset`?

### [](#3.-suppose-you-have-a-dataset-about-household-pets-called-<code>pets_dataset</code>,-which-has-a-<code>name</code>-column-that-denotes-the-name-of-each-pet.-which-of-the-following-approaches-would-allow-you-to-filter-the-dataset-for-all-pets-whose-names-start-with-the-letter-“l”?)3\. Suppose you have a dataset about household pets called `pets_dataset`, which has a `name` column that denotes the name of each pet. Which of the following approaches would allow you to filter the dataset for all pets whose names start with the letter “L”?

### [](#4.-what-is-memory-mapping?)4\. What is memory mapping?

### [](#5.-which-of-the-following-are-the-main-benefits-of-memory-mapping?)5\. Which of the following are the main benefits of memory mapping?

### [](#6.-why-does-the-following-code-fail?)6\. Why does the following code fail?

```
from datasets import load_dataset

dataset = load_dataset("allocine", streaming=True, split="train")
dataset[0]```

### [](#7.-which-of-the-following-are-the-main-benefits-of-creating-a-dataset-card?)7\. Which of the following are the main benefits of creating a dataset card?

### [](#8.-what-is-semantic-search?)8\. What is semantic search?

### [](#9.-for-asymmetric-semantic-search,-you-usually-have:)9\. For asymmetric semantic search, you usually have:

### [](#10.-can-i-use-🤗-datasets-to-load-data-for-use-in-other-domains,-like-speech-processing?)10\. Can I use 🤗 Datasets to load data for use in other domains, like speech processing?