<commit_before>local _          = require "cosy.util.string"
local ignore     = require "cosy.util.ignore"
local logging   = require "logging"
logging.console = require "logging.console"

local logger = logging.console "%level %message\n"

local Platform = {}

Platform.__index = Platform

function Platform:log (message)
  ignore (self)
  logger:debug (message)
end

function Platform:info (message)
  ignore (self)
  logger:info (message)
end

function Platform:warn (message)
  ignore (self)
  logger:warn (message)
end

function Platform:error (message)
  ignore (self)
  logger:error (message)
end

function Platform:send (message)
end

-- Cosy.models [url] = {
--   [VALUE] = <model>
--   username = ...
--   password = ...
--   resource = ...
--   editor   = ...
--   editor.token = ...
-- }
--

function Platform.new (meta)
  return setmetatable ({
    meta = meta,
  }, Platform)
end

function Platform:close ()
end

local Tags     = require "cosy.tag"
local TYPE     = Tags.TYPE
local INSTANCE = Tags.INSTANCE
local VISIBLE  = Tags.VISIBLE

local Algorithm = require "cosy.algorithm"

local function visible_types (x)
  return Algorithm.filter (x, function (d)
    return d [TYPE] () == true and d [VISIBLE] () == true
  end)
end

local function visible_instances (x)
  return Algorithm.filter (x, function (d)
    return d [INSTANCE] () == true and d [VISIBLE] () == true
  end)
end

function instantiate (target_type, data)
  
end

function create (source, link_type, target_type, data)
  
end

function delete (target)
  
end

return Platform<commit_msg>Fix dummy platform.<commit_after>local _          = require "cosy.util.string"
local ignore     = require "cosy.util.ignore"
local logging   = require "logging"
logging.console = require "logging.console"

local logger = logging.console "%level %message\n"

local Platform = {}

Platform.__index = Platform

function Platform:log (message)
  ignore (self)
  logger:debug (message)
end

function Platform:info (message)
  ignore (self)
  logger:info (message)
end

function Platform:warn (message)
  ignore (self)
  logger:warn (message)
end

function Platform:error (message)
  ignore (self)
  logger:error (message)
end

function Platform:send (message)
  ignore (self, message)
end

function Platform.new (meta)
  return setmetatable ({
    meta = meta,
  }, Platform)
end

function Platform:close ()
  ignore (self)
end

return Platform
{'fraction_non_alphanumeric': 0.1172069825436409, 'fraction_numerical': 0.0, 'mean_word_length': 3.655705996131528, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '4524956', 'n_tokens_mistral': 759, 'n_tokens_neox': 752, 'n_words': 232}