私はこの正規表現を持っています:
(?<=[.!?])\s[A-Z]
私はこのテキストでそれを実行します:
The engineering plant, weapon and electronic systems, galley, and multitudinous other
equipment required to transform the new hull into an operating and habitable warship are
installed and tested. The prospective commanding officer, ship's officers, the petty
officers, and seamen who will form the crew report for training and intensive
familiarization with their new ship.
それは以下を生成します:
he engineering plant, weapon and electronic systems, galley, and multitudinous other
equipment required to transform the new hull into an operating and habitable warship are
installed and tested.
he prospective commanding officer, ship's officers, the petty officers, and seamen who
will form the crew report for training and intensive familiarization with their new ship.
ご覧のとおり、文の最初の文字が削除されます。それはそれらが大文字になっているからではありません(私はそれをテストしました)。
文の最初の文字が削除されないように修正するにはどうすればよいですか?
(私はPython 3を使用しています)
re.split()を使用してから、配列を出力し、各値を改行で区切りました