
Answer-first summary for fast verification
Answer: Install the NLTK library from a Jupyter cell by using the !pip install nltk --user command.
The correct answer is D. Installing the NLTK library from a Jupyter cell using the !pip install nltk --user command is the most efficient way for quick experimentation within a managed Vertex AI Workbench notebook. This method installs the library directly within your notebook environment, making it immediately available for use. The --user flag ensures that the library is installed in your user space, avoiding potential conflicts with system-wide packages. This approach avoids the need for creating a custom image or setting up an external data processing job, both of which would be more time-consuming and complex for a quick experiment.
Author: LeetQuiz Editorial Team
Ultimate access to all questions.
No comments yet.
You are working on a prototype of a text classification model that aims to categorize textual data into predefined categories. To facilitate this, you are using a managed Vertex AI Workbench notebook. As part of your preprocessing steps, you want to quickly experiment with tokenizing text using the Natural Language Toolkit (NLTK) library. How should you add the NLTK library to your Jupyter kernel within this managed environment?
A
Install the NLTK library from a terminal by using the pip install nltk command.
B
Write a custom Dataflow job that uses NLTK to tokenize your text and saves the output to Cloud Storage.
C
Create a new Vertex AI Workbench notebook with a custom image that includes the NLTK library.
D
Install the NLTK library from a Jupyter cell by using the !pip install nltk --user command.