class Werd::PosFilter

Public Class Methods

filter(wordlist) click to toggle source
# File lib/werd/pos_filter.rb, line 6
def self.filter(wordlist)
  pos = Moby::PartsOfSpeech.new
  wordlist.select do |row|
    word = pos.find(row.first)[:pos]
    next(false) if word.include?(:pronoun)
    next(false) if word.include?(:definite_article)
    next(false) if word.include?(:preposition)
    next(false) if word.include?(:conjunction)
    next(false) if word.include?(:verb_usu_participle)
    true
  end
end