У меня есть три набора текстовых блоков (на самом деле еще много ...), которые показывают часть полного текста.Однако разбиение исходного текста не было сделано правильно, так как некоторые предложения были разбиты на два текстовых блока.
text1 = {"We will talk about data about model specification parameter \
estimation and model application and the context where we will apply \
the simple example.Is an application where we would like to analyze \
the market for electric cars because"};
text2 = {"we are interested in the market of electric cars.The choice \
that we are interested in is the choice of each individual to \
purchase an electric car or not And we will see how"};
text3 = {"to address this question. Furthermore, it needs to be noted that this is only a model text and there is no content associated with it. "};
Например, text2
начинается с «нас интересует рынок электромобилей».Это неполное первое предложение, которое фактически началось в текстовом блоке 1 (см. Последнее предложение там).
Я хочу убедиться, что каждый текстовый блок заканчивается полным предложением.Поэтому я хочу переместить неполные первые предложения в последний текстовый блок.Например, здесь результат будет:
text1corr = {"We will talk about data about model specification parameter \
estimation and model application and the context where we will apply \
the simple example.Is an application where we would like to analyze \
the market for electric cars because we are interested in the market of electric cars."};
text2corr = {"The choice that we are interested in is the choice of each individual to purchase an electric car or not And we will see how to address this question."};
text3corr = {"Furthermore, it needs to be noted that this is only a model text and there is no content associated with it. "};
Как я могу сделать это на Python?Это вообще возможно?