<commit_before>/*
Package xslate is the main interface to the Go version of Xslate.
Xslate is an extremely powerful template engine, based on Perl5's Text::Xslate
module (http://xslate.org/). Xslate uses a virtual machine to execute 
pre-compiled template bytecode, which gives its flexibility while maitaining 
a very fast execution speed.

The simplest way to use Xslate is to prepare a directory with Xslate templates
(say, "/path/to/tempalte"), and do something like the following:

  tx, _ := xslate.New(xslate.Args {
    "Loader": xslate.Args {
      Paths: []string { "/path/to/templates" },
    },
  })
  output, _ := tx.Render("main.tx", xslate.Vars { ... })
  fmt.Println(output)

By default Xslate loads templates from the filesystem AND caches the generated
compiled bytecode into a temporary location so that the second time the same
template is called, no parsing is required.<commit_msg>Add some docs for people going "WTF is xslate, and why?"<commit_after>/*
Package xslate is the main interface to the Go version of Xslate.

Xslate is an extremely powerful template engine, based on Perl5's Text::Xslate
module (http://xslate.org/). Xslate uses a virtual machine to execute 
pre-compiled template bytecode, which gives its flexibility while maitaining 
a very fast execution speed.

You may be thinking "What? Go already has text/template and html/template!".
You are right in that this is another added complexity, but the major
difference is that Xslate assumes that your template data resides outside
of your go application (e.g. on the file system), and properly handles
updates to those templates -- you don't have to recompile your application
or write freshness checks yourselve to get the updates reflected automatically.

Xslate does all that, and also tries its best to keep things fast by 
creating memory caches and file-based caches.

It also supports a template syntax known as TTerse, which is a simplified
version of the famous Template-Toolkit (http://www.template-toolkit.org)
syntax, which is a full-blown language on its own that allows you to create
flexible, rich templates.

The simplest way to use Xslate is to prepare a directory with Xslate templates
(say, "/path/to/tempalte"), and do something like the following:

  tx, _ := xslate.New(xslate.Args {
    "Loader": xslate.Args {
      Paths: []string { "/path/to/templates" },
    },
  })
  output, _ := tx.Render("main.tx", xslate.Vars { ... })
  fmt.Println(output)

By default Xslate loads templates from the filesystem AND caches the generated
compiled bytecode into a temporary location so that the second time the same
template is called, no parsing is required.
{'fraction_non_alphanumeric': 0.07360120165227188, 'fraction_numerical': 0.0007510326699211416, 'mean_word_length': 4.182879377431907, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 1, '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': '5720659', 'n_tokens_mistral': 754, 'n_tokens_neox': 725, 'n_words': 358}