<commit_before>api.notify.registry = {}
api.notify.registry.n = 0

api.doc.notify.register = {"api.notify.register(tag, fn()) -> id", "Registers a function to be called when an Apple notification with the given tag is clicked."}
function api.notify.register(tag, fn)
  id = api.notify.registry.n + 1
  api.notify.registry[id] = {tag, fn}
  api.notify.registry.n = id
  return id
end

api.doc.notify.register = {"api.notify.unregister(id)", "Unregisters a function to no longer be called when an Apple notification with the given tag is clicked."}
function api.notify.unregister(id)
  api.notify.registry[id] = nil
end

function api.notify._clicked(tag)
  for k, v in pairs(api.notify.registry) do
    if k ~= "n" and v ~= nil then
      local fntag, fn = v[1], v[2]
      if tag == fntag then
        fn()<commit_msg>Fix typo in docs.<commit_after>api.notify.registry = {}
api.notify.registry.n = 0

api.doc.notify.register = {"api.notify.register(tag, fn()) -> id", "Registers a function to be called when an Apple notification with the given tag is clicked."}
function api.notify.register(tag, fn)
  id = api.notify.registry.n + 1
  api.notify.registry[id] = {tag, fn}
  api.notify.registry.n = id
  return id
end

api.doc.notify.unregister = {"api.notify.unregister(id)", "Unregisters a function to no longer be called when an Apple notification with the given tag is clicked."}
function api.notify.unregister(id)
  api.notify.registry[id] = nil
end

function api.notify._clicked(tag)
  for k, v in pairs(api.notify.registry) do
    if k ~= "n" and v ~= nil then
      local fntag, fn = v[1], v[2]
      if tag == fntag then
        fn()
{'fraction_non_alphanumeric': 0.1298780487804878, 'fraction_numerical': 0.004878048780487805, 'mean_word_length': 3.596638655462185, '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': '6388736', 'n_tokens_mistral': 538, 'n_tokens_neox': 541, 'n_words': 176}