from parlai.agents.programr.utils.logging.ylogger import YLogger
import re

from parlai.agents.programr.processors.processing import PostProcessor

class RemoveMultiSpacePostProcessor(PostProcessor):
    def __init__(self):
        PostProcessor.__init__(self)

    def process(self, word_string):
        word_string = re.sub(r'\s+', ' ', word_string)
        return word_string.strip()

from parlai.agents.programr.utils.logging.ylogger import YLogger
import re

from parlai.agents.programr.processors.processing import PostProcessor

class RemoveMultiSpacePostProcessor(PostProcessor):
    def __init__(self):
        PostProcessor.__init__(self)

    def process(self, word_string):
        word_string = re.sub(r'\s+', ' ', word_string)
        return word_string.strip()
