We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
From Paragraphs to Sentences
From Paragraphs to Sentences
Sort by
recency
|
57 Discussions
|
Please Login in order to post a comment
Hiden test case 0 and 1 error. But I can run it on Collab and here. Why?
My code: input_text = input("Enter your text: ")
def split_into_sentences(text): pattern = r'(?
import re
def split_sentences(text): # Define the regular expression pattern to match sentence boundaries pattern = r"""(?<=\w.)\s+"""
Get the input text from the user
input_text = input("Enter your text: ")
Split the text into sentences
sentences = split_sentences(input_text)
Print the sentences
for sentence in sentences: print(sentence)
I have tried NLP for my Page but I'm not sure whether I' successful or not. Kindly check and let me know.
This is my code