fix punctuation inside of a word seperate the word

This commit is contained in:
chrys 2016-09-29 20:35:53 +02:00
parent 2fd167e510
commit 0ee990eb62

View File

@ -12,6 +12,7 @@ class punctuationManager():
pass
def initialize(self, environment):
self.env = environment
self.allPunctNone = dict.fromkeys(map(ord, string.punctuation), None)
self.punctuation = {
'currLevel':'3',
'levels':{
@ -60,7 +61,8 @@ class punctuationManager():
def shutdown(self):
pass
def removeUnused(self, text):
return text.translate(text.maketrans(string.punctuation, ' '*len(string.punctuation)))
return text.translate(self.allPunctNone)
def useCustomDict(self, text, customDict):
resultText = str(text)
if customDict: