docs: def __get_words(text, by_spaces):
      """
      Helper function which splits the given text string into words. If by_spaces is false, then text like
      '01-02-2014' will be split into 3 separate words. For backwards compatibility, this is the default for all
      expression functions.
      :param text: the text to split
      :param by_spaces: whether words should be split only by spaces or by punctuation like '-', '.' etc
      """
      if by_spaces:
          splits = regex.split(r'\s+', text, flags=regex.MULTILINE | regex.UNICODE | regex.V0)
          return [split for split in splits if split]   # return only non-empty
      else:
          return tokenize(text)