Diff for /cdli/cdliSplitter.py between versions 1.7.2.5 and 1.7.2.8

version 1.7.2.5, 2007/10/26 22:45:12 version 1.7.2.8, 2007/12/11 17:33:07
Line 26  separators=[''] Line 26  separators=['']
 # kommas relevant for graphemes will not be deleted  # kommas relevant for graphemes will not be deleted
 komma_exception="([^sStThH]),"   komma_exception="([^sStThH])," 
 # grapheme boundaries  # grapheme boundaries
 graphemeBounds="\{|\}|<|>|\(|\)|-|_|\#|,|\||\]|\[|\!|\?"  #graphemeBounds="\{|\}|<|>|\(|\)|-|_|\#|,|\||\]|\[|\!|\?"
   graphemeBounds="\{|\}|<|>|-|_|\#|,|\]|\[|\!|\?|\""
   graphemeIgnore=""
 # for words   # for words 
 wordBounds="<|>|\(|\)|_|\#|,|\||\]|\[|\!|\?"  #wordBounds="<|>|\(|\)|_|\#|,|\||\]|\[|\!|\?"
   wordBounds="_|,|\""
   wordIgnore="<|>|\#|\||\]|\[|\!|\?"
                         
 class cdliSplitter:  class cdliSplitter:
     """base class for splitter.       """base class for splitter. 
Line 38  class cdliSplitter: Line 41  class cdliSplitter:
           
     default_encoding = "utf-8"      default_encoding = "utf-8"
     bounds=graphemeBounds      bounds=graphemeBounds
       ignore=graphemeIgnore
     indexName="cdliSplitter"      indexName="cdliSplitter"
           
           
Line 77  class cdliSplitter: Line 81  class cdliSplitter:
                                                           
                         # delete kommata except kommata relevant for graphemes                          # delete kommata except kommata relevant for graphemes
                         txt = re.sub(komma_exception,r"\1",txt)                          txt = re.sub(komma_exception,r"\1",txt)
                           # replace letters to be ignored
                           txt = re.sub(self.ignore,'',txt)
                         # replace word boundaries by spaces                          # replace word boundaries by spaces
                         txt = re.sub(self.bounds,' ',txt)                          txt = re.sub(self.bounds,' ',txt)
                         # split words                          # split words
Line 92  class cdliSplitter: Line 98  class cdliSplitter:
   
 class graphemeSplitter(cdliSplitter):  class graphemeSplitter(cdliSplitter):
     bounds=graphemeBounds      bounds=graphemeBounds
       ignore=graphemeIgnore
     indexName="graphemeSplitter"      indexName="graphemeSplitter"
           
 class wordSplitter(cdliSplitter):  class wordSplitter(cdliSplitter):
     bounds=wordBounds      bounds=wordBounds
       ignore=wordIgnore
     indexName="wordSplitter"      indexName="wordSplitter"
               
 try:  try:

Removed from v.1.7.2.5  
changed lines
  Added in v.1.7.2.8


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>