home *** CD-ROM | disk | FTP | other *** search
/ Chip 2005 February / CMCD0205.ISO / Software / Freeware / Multimedia / SubtitleWork / SubtitleWorkshop251.exe / OCRScripts / Default.ocr next >
Text File  |  2004-02-25  |  4KB  |  92 lines

  1. <!----------------------------------------------->
  2. <!--     Subtitle Workshop OCR Script file     -->
  3. <!--       Copyright ⌐ 2001-2004 URUSoft       -->
  4. <!--           http://www.urusoft.net          -->
  5. <!--                                           -->
  6. <!-- Default values:                           -->
  7. <!--                                           -->
  8. <!-- UseRE = True (use Regular Expressions)    -->
  9. <!-- UseREOnlyToFind = True (put the part that -->
  10. <!-- is not a RE between parenthesis!)         -->
  11. <!--                                           -->
  12. <!-- If UseRE is set to false then you can use -->
  13. <!-- the following parameters, otherwise they  -->
  14. <!-- will be ignored:                          -->
  15. <!--                                           -->
  16. <!--    CaseSensitive  (Default = False)       -->
  17. <!--    WholeWord      (Default = False)       -->
  18. <!--    PreserveCase   (Default = False)       -->
  19. <!-- ----------------------------------------- -->
  20. <!-- Regular Expressions make the OCR Scripts  -->
  21. <!-- extremely powerful. For details on their  -->
  22. <!-- use, refer to "Subtitle Workshop Manual"  -->
  23. <!-- or download a help file in the available  -->
  24. <!-- languages from:                           -->
  25. <!--        http://www.regexpstudio.com/       -->
  26. <!----------------------------------------------->
  27.  
  28. <SWOCR WordChars="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_±╤ßΘφ≤·┴╔═╙┌Σδ∩÷ⁿ">
  29.  
  30.     <!-- Eg. "swaIIow" by "swallow" -->
  31.     <ERROR Find="[a-zß-·](II)" ReplaceBy="ll">
  32.     <ERROR Find="(II)[a-zß-·]" ReplaceBy="ll">
  33.     <!-- Replace all "l" by "I" in the middle of any uppercase word -->
  34.     <ERROR Find="[A-Z┴-┌](l)[A-Z┴-┌]" ReplaceBy="I">
  35.     <!-- Replace all "I" by "l" in the middle of any lowercase word -->
  36.     <ERROR Find="[a-zß-·](I)[a-zß-·]" ReplaceBy="l">
  37.     <!-- Replace all alone "l" to "I" -->
  38.     <ERROR Find="\b(l)\b" ReplaceBy="I">
  39.     <!-- I'II to I'll -->
  40.     <ERROR Find="['A-Z┴-┌](II)\s[a-zß-·]" ReplaceBy="ll">
  41.     <ERROR Find="['A-Z┴-┌](II)\s\W[a-zß-·]" ReplaceBy="ll">
  42.  
  43.     <!-- "1 :", "2 :"... "n :" to "n:" -->
  44.     <ERROR Find="\d( :)" ReplaceBy=":">
  45.     <!-- ",,," or similar to "..." -->
  46.     <ERROR UseREOnlyToFind="False" Find=",{2,}" ReplaceBy="...">
  47.     <!-- "--" or more to "..." -->
  48.     <ERROR UseREOnlyToFind="False" Find="-{2,}" ReplaceBy="...">
  49.  
  50.     <!-- Apostrophes ("\x22" is '"' character) -->
  51.     <ERROR Find="[┤`ôö]" ReplaceBy="'">
  52.     <ERROR UseREOnlyToFind="False" Find="''" ReplaceBy=""">
  53.     <!-- '"' more than two times together is replaced by only one '"' -->
  54.     <ERROR UseREOnlyToFind="False" Find="\x22{2,}" ReplaceBy=""">
  55.  
  56.     <!-- Spaces after aphostrophes, eg. "I' d" to "I'd", "I' LL" to "I'LL", etc. -->
  57.     <ERROR Find="(?i)[A-Z┴-┌a-zß-·]('\s|\s')(ll|ve|s|m|d)\b" ReplaceBy="'">
  58.     <!-- F "Hasn 't" and "Hasn' t" -->
  59.     <ERROR Find="(?i)[A-Z┴-┌a-zß-·]('\s|\s')t\b" ReplaceBy="'">
  60.  
  61.     <!-- Rare 'Spaces after aphostrophes' cases -->
  62.     <!-- "I 'II" -> "I'll" or "I' II" -> "I'll" -->
  63.     <ERROR Find="[A-Z┴-┌a-zß-·]('\sII|\s'II)\b" ReplaceBy="'ll">
  64.  
  65.     <!-- Particular cases -->
  66.     <ERROR Find="\b(I)[aeiouß-·]" ReplaceBy="l">
  67.     <ERROR Find="\b[A-Z┴-┌](I)[a-zß-·]" ReplaceBy="l">
  68.     <ERROR Find="[AEOU┴╔╙┌](I)\b" ReplaceBy="l">
  69.     <ERROR Find="\b(l)[^aeiouyαß-·l]" ReplaceBy="I">
  70.     <ERROR Find="\b[TV](l)\b" ReplaceBy="I">
  71.  
  72.     <!-- Rare cases -->
  73.     <!-- The name "Ian" -->
  74.     <ERROR Find="\b(lan)\b" ReplaceBy="Ian">
  75.     <!-- Location in USA "Iowa" -->
  76.     <ERROR Find="\b(lowa)\b" ReplaceBy="Iowa">
  77.  
  78.     <!-- Fix zero and capital 'o' ripping mistakes -->
  79.     <ERROR Find="[0-9](O)" ReplaceBy="0">
  80.     <ERROR Find="[0-9](\.O)" ReplaceBy=".0">
  81.     <ERROR Find="[0-9](,O)" ReplaceBy=",0">
  82.     <ERROR Find="[A-Z](0)" ReplaceBy="O">
  83.     <ERROR Find="\b(0)[A-Za-z]" ReplaceBy="O">
  84.  
  85.     <!-- Smart space after dot -->
  86.     <ERROR Find="[a-zß-·±Σ-ⁿ](\.)[^(\s\n\.\?\!)]" ReplaceBy=". ">
  87.     <!-- Space after last of some consecutive dots (eg. "...") -->
  88.     <ERROR Find="(\.\.)[^(\s\n\.\?\!)]" ReplaceBy=".. ">
  89.     <!-- Delete space after "..." that is at the beginning of the line. You may delete this line if you don't like it -->
  90.     <ERROR UseREOnlyToFind="False" Find="^(\.\.\.) " ReplaceBy="...">
  91. </SWOCR>
  92.