@@ -35,7+35,7 @@ class TXMParser(xml.sax.ContentHandler) :
pass
def endElement(self, name) :
pass
def endElement(self, name) :
- if name == 's' :
+ if name == 's' or name == 'w' :
self.printsent()
if name == 'p' :
self.printsent()
self.printsent()
if name == 'p' :
self.printsent()
@@ -48,7+48,7 @@ class TXMParser(xml.sax.ContentHandler) :
#self.fileout.write(content.encode('utf8'))
def text2stars(self, attrs) :
#self.fileout.write(content.encode('utf8'))
def text2stars(self, attrs) :
- stars = ['_'.join(val).replace(' ', '_').replace("'", '_') for val in attrs.items()]
+ stars = ['_'.join(val).replace(' ', '_').replace("'", '_').replace('/','').replace('.','').replace(';', '').replace(':', '').replace(u'ยท','') for val in attrs.items()]