replace any nonused punctuation with space but grave, apostrophe, dot and comma in punctuationmanager
This commit is contained in:
parent
d63b21a50f
commit
f6209f8b4c
@ -12,13 +12,11 @@ class punctuationManager():
|
||||
pass
|
||||
def initialize(self, environment):
|
||||
self.env = environment
|
||||
self.allPunctNone = dict.fromkeys(map(ord, string.punctuation), None)
|
||||
# replace colon with space
|
||||
self.allPunctNone[58] = ' '
|
||||
# replace minus with space
|
||||
self.allPunctNone[45] = ' '
|
||||
# replace underscore with space
|
||||
self.allPunctNone[95] = ' '
|
||||
self.allPunctNone = dict.fromkeys(map(ord, string.punctuation), ' ')
|
||||
# replace with space:
|
||||
# dot, comma, grave, apostrophe
|
||||
for char in [ord('.'),ord(','),ord('`'),ord("'")]:
|
||||
self.allPunctNone[char] = None
|
||||
self.punctuation = {
|
||||
'levels':{
|
||||
'NONE': '',
|
||||
|
Loading…
Reference in New Issue
Block a user