You need to first install some spaCy model before doing a task like sentence segmentation. For example, if you want to install the model en_core_web_sm you can install it using this command: You have to do this after you install spaCy.
Here is how you split text into individual words in spaCy: You first need to download and install the en_core_web_sm model to run the above code. And this is the output:
You can split text into sentences in spaCy by using the following code You first need to download and install the en_core_web_sm model to run the above code. This is the output: Alternatively, you can pass in the text directly into the nlp() call and get the same result.