1 '''
2 Created on 10/12/2012
3
4 @author: david.vilares
5 '''
6 import re
7 from PreProcessorDecorator import *
8
9
11 '''
12 classdocs
13 '''
14
16 '''
17 Constructor
18 '''
19 self.component = component
20
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
44
45 def quote_transformation(quote):
46 words = quote.split()
47 return '_'.join(words)[:-1]+unicode('_QUOTE"')
48
49 quote_pattern = re.compile(u'\"[a-zA-Z ;\u00C0-\uFFFF]+\"')
50 quotes = quote_pattern.findall(text)
51 for q in quotes:
52 text = text.replace(q, quote_transformation(q))
53 return text
54