lib/vidibus/words.rb
def keywords(limit = 20)
      @keywords ||= {}
      @keywords[limit] ||= begin
        list = []
        count = 0
        _stopwords = Vidibus::Words.stopwords(*locales)
        for word in sort
          clean = word.permalink.gsub('-','')
          unless _stopwords.include?(clean)
            list << word
            count += 1
            break if count >= limit
          end
        end
        list
      end
    end
def keywords(limit = 20)
      @keywords ||= {}
      @keywords[limit] ||= begin
        list = []
        count = 0
        _stopwords = Vidibus::Words.stopwords(*locales)
        for word in sort
          clean = word.permalink.gsub('-','')
          unless _stopwords.include?(clean)
            list << word
            count += 1
            break if count >= limit
          end
        end
        list
      end
    end
def keywords ( limit = 20 ) @keywords ||= { } @keywords [ limit ] ||= begin list = [ ] count = 0 _stopwords = Vidibus :: Words . stopwords ( locales ) for word in sort clean = word . permalink . gsub ( '-' , '' ) unless _stopwords . include? ( clean ) list << word count += 1 break if count >= limit end end list end end
Returns top keywords from input string.
Returns top keywords from input string .