1 '''
2 Created on 30/01/2013
3
4 @author: David Vilares Calvo
5 '''
6 import re
7 from miopia.preprocessor.PreProcessorDecorator import PreProcessorDecorator
8
10 '''
11 classdocs
12 '''
13
14 SYMBOLIC_URL = "SymbolicURL"
15
17 '''
18 Constructor
19 '''
20 self._component = component
21 self._url_pattern = re.compile(r'http[s]?://[\w./]{1,}')
22
26
27
29
30 urls = set(self._url_pattern.findall(text))
31 for url in urls:
32 text = self._build_new_text(text,url,self.SYMBOLIC_URL)
33 return text
34
35
36
37
38
39
40
41
42
43