<?xml version="1.0" encoding="UTF-8"?>
<patterns type="Common Error">
  <pattern classes="Human;OCR;" name="Spaces around guillemets" description="Add spaces around guillemets">
    <rule replacement="\1 \2" repeat="False" regex="(\S)(«)" flags="DOTALL;MULTILINE;UNICODE;"/>
    <rule replacement="\1 \2" repeat="False" regex="(»)(\w)" flags="DOTALL;MULTILINE;UNICODE;"/>
    <rule replacement="\1 \2" repeat="False" regex="(«)(\S)" flags="DOTALL;MULTILINE;UNICODE;"/>
    <rule replacement="\1 \2" repeat="False" regex="(\S)(»)" flags="DOTALL;MULTILINE;UNICODE;"/>
  </pattern>
  <pattern policy="Replace" classes="Human;OCR;" name="Space before punctuation marks" description="Add or remove space before various punctuation marks">
    <rule replacement="\1" repeat="False" regex=" +([&quot;'«»]?(?!\.\.)([,.])(?!\d))" flags="DOTALL;MULTILINE;UNICODE;"/>
    <rule replacement="\1 \2" repeat="False" regex="([^\s?!;:])([?!;:])(?!\d)" flags="DOTALL;MULTILINE;UNICODE;"/>
  </pattern>
</patterns>