Is there a way to have wiki display extracts in an array of sentences?
Or does anyone have any ideas other than using string.split(".")
to parse? There are cases where the sentence may include a .
and I don't want to split if it occurs mid-sentence.
For example, "The Eagles were No. 1 in the U.S. in 1970"
would be split into 4 sentences using str.split()
, and that's not what I want.
Wiki must have some sort of determination of what defines a sentence as it works when you limit the number of existence in a call (they don't break a sentence on an in-line period). Is there a way to get them individually?
Looking for a solution in JavaScript to parse a JSON excerpt string.