Update punctuationManager.py
This commit is contained in:
parent
33491136bf
commit
01f28b28f6
@ -14,11 +14,11 @@ class punctuationManager():
|
|||||||
self.env = environment
|
self.env = environment
|
||||||
self.allPunctNone = dict.fromkeys(map(ord, string.punctuation), None)
|
self.allPunctNone = dict.fromkeys(map(ord, string.punctuation), None)
|
||||||
self.punctuation = {
|
self.punctuation = {
|
||||||
'currLevel':'3',
|
'currLevel':'Some',
|
||||||
'levels':{
|
'levels':{
|
||||||
'1':',',
|
'None': '',
|
||||||
'2':'.',
|
'Some': '.,:-$~+*-/\\@;',
|
||||||
'3':'.,:-$~+*-/\\@;',
|
'All': string.punctuation,
|
||||||
},
|
},
|
||||||
'punctuationDict':{
|
'punctuationDict':{
|
||||||
'&':'and',
|
'&':'and',
|
||||||
@ -79,7 +79,6 @@ class punctuationManager():
|
|||||||
for key,item in punctuationDict.items():
|
for key,item in punctuationDict.items():
|
||||||
if key in punctuation:
|
if key in punctuation:
|
||||||
resultText = resultText.replace(str(key),' ' +str(item) +' ')
|
resultText = resultText.replace(str(key),' ' +str(item) +' ')
|
||||||
|
|
||||||
return resultText
|
return resultText
|
||||||
|
|
||||||
def proceedPunctuation(self, text, ignorePunctuation=False):
|
def proceedPunctuation(self, text, ignorePunctuation=False):
|
||||||
|
Loading…
Reference in New Issue
Block a user