Elixir Implementation of tiny_segmenter.js