Sha256: 33e6b6b5b7ffb3bf4664ced6b3caafd4e8ab0c1875a0a3edfc11095fcc2c7bf0
Contents?: true
Size: 485 Bytes
Versions: 10
Compression:
Stored size: 485 Bytes
Contents
# coding: utf-8 require "bundler/gem_tasks" desc "Update the stems of the sample words" task :update_stemming_samples do require 'turkish_stemmer' words = [] filename = "benchmarks/stemming_samples.txt" File.open(filename, "r") do |sample| while(line = sample.gets) word, _ = line.split(",") words << word end end File.open(filename, "w") do |sample| words.each do |word| sample.puts "#{word},#{TurkishStemmer.stem(word)}" end end end
Version data entries
10 entries across 10 versions & 1 rubygems