[Erp5-report] r44494 kazuhiko - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: Extension...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Mar 22 10:58:36 CET 2011
Author: kazuhiko
Date: Tue Mar 22 10:58:36 2011
New Revision: 44494
URL: http://svn.erp5.org?rev=44494&view=rev
Log:
split by more punctuations to avode crazy long lines.
Modified:
erp5/trunk/products/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/DocumentExtraction.py
erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/DocumentExtraction.py
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/DocumentExtraction.py?rev=44494&r1=44493&r2=44494&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/DocumentExtraction.py [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/ExtensionTemplateItem/DocumentExtraction.py [utf8] Tue Mar 22 10:58:36 2011
@@ -104,9 +104,11 @@ def getExcerptText(context, txt, sw, tag
txt = re.sub(r,'',txt)
r = re.compile('<([^>]+)>',re.DOTALL|re.IGNORECASE)
txt = re.sub(r,'',txt)
+ txt = txt.replace('-',' - ') # to find hyphenated occurrences
+ txt = txt.replace(',',', ')
+ txt = txt.replace(';','; ')
r = re.compile('\s+')
txt = re.sub(r,' ',txt)
- txt = txt.replace('-',' - ') # to find hyphenated occurrences
text = ' '.join(txt.split('\n')).split(' ') # very rough tokenization
return [p for p in generateParts(context,text,sw,tags,trail,maxlines)]
Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=44494&r1=44493&r2=44494&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Tue Mar 22 10:58:36 2011
@@ -1 +1 @@
-40937
\ No newline at end of file
+40938
\ No newline at end of file
More information about the Erp5-report
mailing list