spaCy - Util.is_in_jupyter



This utility function is used to check whether, we are running the spacy from a Jupyter notebook or not. It is done by detecting the IPython kernel. This utility function is mainly used for the displaCy visualizer.

Example

An example of util.is_in_jupyter() function is as follows:

import spacy
info = "<h1>This is Tutorialspoint.com!</h1>"
if spacy.util.is_in_jupyter():
   from IPython.core.display import display, HTML
   display(HTML(info))

Output

You will see the following output −

This is Tutorialspoint.com!
spacy_util_get_data_path.htm
Advertisements