dateparser/languages/dictionary.py
def split(self, string, keep_formatting=False):
        """
        Split the date string using translations in locale info.

        :param string:
            Date string to be splitted.
        :type string:
            str|unicode

        :param keep_formatting:
            If True, retain formatting of the date string.
        :type keep_formatting: bool

        :return: A list of string tokens formed after splitting the date string.
        """
        if not string:
            return string

        split_relative_regex = self._get_split_relative_regex_cache()
        match_relative_regex = self._get_match_relative_regex_cache()

        tokens = split_relative_regex.split(string)

        for i, token in enumerate(tokens):
            if match_relative_regex.match(token):
                tokens[i] = [token]
                continue
            tokens[i] = self._split_by_known_words(token, keep_formatting)

        return list(filter(bool, chain(*tokens)))
def split(self, string, keep_formatting=False):
        if not string:
            return string

        split_relative_regex = self._get_split_relative_regex_cache()
        match_relative_regex = self._get_match_relative_regex_cache()

        tokens = split_relative_regex.split(string)

        for i, token in enumerate(tokens):
            if match_relative_regex.match(token):
                tokens[i] = [token]
                continue
            tokens[i] = self._split_by_known_words(token, keep_formatting)

        return list(filter(bool, chain(*tokens)))
def split ( self , string , keep_formatting = False ) : if not string : return string split_relative_regex = self . _get_split_relative_regex_cache ( ) match_relative_regex = self . _get_match_relative_regex_cache ( ) tokens = split_relative_regex . split ( string ) for i , token in enumerate ( tokens ) : if match_relative_regex . match ( token ) : tokens [ i ] = [ token ] continue tokens [ i ] = self . _split_by_known_words ( token , keep_formatting ) return list ( filter ( bool , chain ( * tokens ) ) )
Split the date string using translations in locale info.

        :param string:
            Date string to be splitted.
        :type string:
            str|unicode

        :param keep_formatting:
            If True, retain formatting of the date string.
        :type keep_formatting: bool

        :return: A list of string tokens formed after splitting the date string.
Split the date string using translations in locale info .