PYTHON QUESTION!
A sentence will be any sequence of words that is terminated
by a full stop (and including the full stop itself). Test Case
2 should illustrate this.
Write a function sentence_segmentation(document) that
takes an input parameter document (type string)
and returns a list of sentences from the given
document. If no sentences could be segmented (think about the
cases), then it simply returns an empty list.
NB: You are guaranteed that a document will not begin with the
full stop character.
For example:
PYTHON QUESTION! A sentence will be any sequence of words that is terminated by a full stop (and including the full stop
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
PYTHON QUESTION! A sentence will be any sequence of words that is terminated by a full stop (and including the full stop
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!