<commit_before>import sublime, sublime_plugin
import os.path

is_sublime_text_3 = int(sublime.version()) >= 3000

if is_sublime_text_3:
    from .progress_notifier import ProgressNotifier
else:
    from progress_notifier import ProgressNotifier

# A base for each command
class BaseCommand(sublime_plugin.WindowCommand):
    package_name = "Gulp"
    
    def run(self, task_name = None, task_flag = None, silent = False):
        self.setup_data_from_settings()
        self.task_name = task_name
        self.task_flag = task_flag if task_name and task_flag else self.get_flag_from_task_name()
        self.silent = silent
        self.working_dir = ""
        self.work()

    def setup_data_from_settings(self):
        self.settings = sublime.load_settings("Gulp.sublime-settings")
        self.results_in_new_tab = self.settings.get("results_in_new_tab", False)
        self.nonblocking  = self.settings.get("nonblocking", True)

    def get_flag_from_task_name(self):
        flags = self.settings.get("flags", {})
        return flags[self.task_name] if self.task_name in flags else ""

    # Main method, override
    def work(self):
        pass

    # Panels and message
    def show_quick_panel(self, items, on_done = None, font = sublime.MONOSPACE_FONT):
        self.defer_sync(lambda: self.window.show_quick_panel(items, on_done, font))

    def show_input_panel(self, caption, initial_text = "", on_done = None, on_change = None, on_cancel = None):
        self.window.show_input_panel(caption, initial_text, on_done, on_change, on_cancel)

    def status_message(self, text):
        sublime.status_message("%s: %s" % (self.package_name, text))
<commit_msg>Support empty strings<commit_after>import sublime, sublime_plugin
import os.path

is_sublime_text_3 = int(sublime.version()) >= 3000

if is_sublime_text_3:
    from .progress_notifier import ProgressNotifier
else:
    from progress_notifier import ProgressNotifier

# A base for each command
class BaseCommand(sublime_plugin.WindowCommand):
    package_name = "Gulp"
    
    def run(self, task_name = None, task_flag = None, silent = False):
        self.setup_data_from_settings()
        self.task_name = task_name
        self.task_flag = task_flag if task_name and task_flag is not None else self.get_flag_from_task_name()
        self.silent = silent
        self.working_dir = ""
        self.work()

    def setup_data_from_settings(self):
        self.settings = sublime.load_settings("Gulp.sublime-settings")
        self.results_in_new_tab = self.settings.get("results_in_new_tab", False)
        self.nonblocking  = self.settings.get("nonblocking", True)

    def get_flag_from_task_name(self):
        flags = self.settings.get("flags", {})
        return flags[self.task_name] if self.task_name in flags else ""

    # Main method, override
    def work(self):
        pass

    # Panels and message
    def show_quick_panel(self, items, on_done = None, font = sublime.MONOSPACE_FONT):
        self.defer_sync(lambda: self.window.show_quick_panel(items, on_done, font))

    def show_input_panel(self, caption, initial_text = "", on_done = None, on_change = None, on_cancel = None):
        self.window.show_input_panel(caption, initial_text, on_done, on_change, on_cancel)

    def status_message(self, text):
        sublime.status_message("%s: %s" % (self.package_name, text))

{'fraction_non_alphanumeric': 0.09798099762470308, 'fraction_numerical': 0.0035629453681710215, 'mean_word_length': 3.6662049861495847, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5851327', 'n_tokens_mistral': 1108, 'n_tokens_neox': 1075, 'n_words': 233}