<commit_before># This file runs a JRuby DRb server, and is run by `akephalos --server`.
require "pathname"
require "drb/drb"
require "akephalos/client"

# In ruby-1.8.7 and later, the message for a NameError exception is lazily
# evaluated. There are, however, different implementations of this between ruby
# and jrby, so we realize these messages when sending over DRb.
class NameError::Message
  def _dump
    to_s
  end
end

[Akephalos::Page, Akephalos::Node].each { |klass| klass.send(:include, DRbUndumped) }

module Akephalos
  class Server
    def self.start!(socket_file)
      client = Client.new
      DRb.start_service("drbunix://#{socket_file}", client)
      DRb.thread.join
    end
  end
end<commit_msg>Document Akephalos::Server<commit_after># This file runs a JRuby DRb server, and is run by `akephalos --server`.
require "pathname"
require "drb/drb"
require "akephalos/client"

# In ruby-1.8.7 and later, the message for a NameError exception is lazily
# evaluated. There are, however, different implementations of this between ruby
# and jruby, so we realize these messages when sending over DRb.
class NameError::Message
  def _dump
    to_s
  end
end

[Akephalos::Page, Akephalos::Node].each { |klass| klass.send(:include, DRbUndumped) }

module Akephalos
  class Server
    def self.start!(socket_file)
      client = Client.new
      DRb.start_service("drbunix://#{socket_file}", client)
      DRb.thread.join
    end
  end
end
{'fraction_non_alphanumeric': 0.09655172413793103, 'fraction_numerical': 0.004137931034482759, 'mean_word_length': 4.003448275862069, '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': '4787780', 'n_tokens_mistral': 494, 'n_tokens_neox': 477, 'n_words': 158}