<?xml version="1.0" encoding="UTF-8"?>
<patterns type="Capitalization">
  
  <pattern classes="Human;OCR;" name="Sentence" description="Capitalize the first word of a sentence">
    <rule replacement="\1\2\u\3" repeat="False" regex="((?&lt;!\.\.)\.|[?!])[&quot;']?([ $\n])(\w+)" flags="DOTALL;MULTILINE;UNICODE;"/>
    
    <rule replacement="\u\1" repeat="False" regex="^(\b[a-z]+\b)" flags="DOTALL;UNICODE;">
      <previousmatch regex="((?&lt;!\.\.)\.|[?!]|^)$" flags=""/>
    </rule>
  </pattern>
</patterns>