I hope I don't bother anyone with this question because it is similar to ones that already have been asked. Still, my problem is that I didn't find the answer for a txt file, but only for html/xml working with BeautifulSoup. Another question gives an answer for Java, but I only worked with Python.
So I have several text documents and I want to get for each of them the first sentence from each paragraph.
I thought opening and reading the text with:
speech1_content = open("1789-04-30-George-Washington.txt", "r")
would be the first step, but I didn't find any answer that leads me further. The idea is to have a paragraph in a txt file:
Among the vicissitudes incident to life no event could have filled me with greater anxieties than that of which the notification was transmitted by your order, and received on the 14th day of the present month. On the one hand, I was summoned by my country, whose voice I can never hear but with veneration and love, from a retreat which I had chosen with the fondest predilection, and, in my flattering hopes, with an immutable decision, as the asylum of my declining years—a retreat which was rendered every day more necessary as well as more dear to me by the addition of habit to inclination, and of frequent interruptions in my health to the gradual waste committed on it by time.
But only have this as an output:
Among the vicissitudes incident to life no event could have filled me with greater anxieties than that of which the notification was transmitted by your order, and received on the 14th day of the present month.
Thanks a lot for your help.