<commit_before>require "kalendor"
require "kalendor/instance"
require "kalendor/instance/store"
require "nydp"
require "nydp/kalendor/version"

module Nydp
  class Namespace
    attr_accessor :kalendor_store
  end

  module Kalendor
    module KalendorInstance
      include Nydp::AutoWrap
      def _nydp_whitelist
        @_nwl ||= Set.new([:name, :label])
      end
      def _nydp_procs ; [] ; end
    end

    class Plugin
      def name ; "Nydp/Kalendor plugin" ; end

      def relative_path name
        File.expand_path(File.join File.dirname(__FILE__), name)
      end

      def base_path ; relative_path "../lisp/" ; end

      def load_rake_tasks ; end

      def loadfiles
        Dir.glob(relative_path '../lisp/kalendor-*.nydp').sort
      end

      def testfiles
        Dir.glob(relative_path '../lisp/tests/**/*.nydp')
      end

      def setup ns<commit_msg>plugin: new api<commit_after>require "kalendor"
require "kalendor/instance"
require "kalendor/instance/store"
require "nydp"
require "nydp/kalendor/version"

module Nydp
  class Namespace
    attr_accessor :kalendor_store
  end

  module Kalendor
    module KalendorInstance
      include Nydp::AutoWrap
      def _nydp_whitelist
        @_nwl ||= Set.new([:name, :label])
      end
      def _nydp_procs ; [] ; end
    end

    class Plugin
      include Nydp::PluginHelper

      def name ; "Nydp/Kalendor plugin" ; end

      def base_path ; relative_path "../lisp/" ; end

      def load_rake_tasks ; end

      def loadfiles
        file_readers Dir.glob(relative_path '../lisp/kalendor-*.nydp').sort
      end

      def testfiles
        file_readers Dir.glob(relative_path '../lisp/tests/**/*.nydp')
      end

      def setup ns
{'fraction_non_alphanumeric': 0.09842748980780432, 'fraction_numerical': 0.0, 'mean_word_length': 2.513292433537832, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5132780', 'n_tokens_mistral': 567, 'n_tokens_neox': 546, 'n_words': 134}