<commit_before># File: gitn.py
# Author: kmnk <kmnknmk at <EMAIL>>
# License: MIT license

import os
import re
import sys

print(os.path.dirname(__file__))
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))

from gitn.source.factory import Factory
from .base import Base

class Source(Base):

    def __init__(self, vim):
        super().__init__(vim)

        self.name = 'gitn'

    def on_init(self, context):
        if not hasattr(self, '__source'):
            self.__source = Factory.create(self, context)

        if hasattr(self.__source, 'on_init'):
            self.__source.on_init(context)

        self.kind = self.__source.kind

    def on_close(self, context):
        if hasattr(self.__source, 'on_close'):
            self.__source.on_close(context)

    def highlight(self):
        self.__source.highlight()

    def define_syntax(self):
        self.__source.define_syntax()

    def gather_candidates(self, context):
        if hasattr(self.__source, 'gather_candidates'):
            return self.__source.gather_candidates(context)<commit_msg>Modify gitn source as base source<commit_after># File: gitn.py
# Author: kmnk <kmnknmk at <EMAIL>>
# License: MIT license

import os
import re
import sys

print(os.path.dirname(__file__))
sys.path.append(os.path.dirname(os.path.dirname(os.path.dirname(__file__))))

from denite.source.base import Base

class Source(Base):

    def __init__(self, vim):
        super().__init__(vim)

        self.name = 'gitn'
        self.kind = 'gitn'

    def gather_candidates(self, context):
        # TODO
        return []
{'fraction_non_alphanumeric': 0.12149532710280374, 'fraction_numerical': 0.0, 'mean_word_length': 3.149870801033592, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '6524308', 'n_tokens_mistral': 529, 'n_tokens_neox': 506, 'n_words': 114}