#!/usr/bin/env ruby require File.expand_path( File.join(File.dirname(__FILE__), '..', 'lib', 'rmmseg')) require 'getoptlong' def print_usage puts < err puts err exit 1 end end RMMSeg::Dictionary.load_dictionaries algor = RMMSeg::Algorithm.new(STDIN.read) tok = algor.next_token unless tok.nil? print tok.text loop do tok = algor.next_token break if tok.nil? print separator print tok.text end puts end # EOF