Sha256: f97c04df5a5a3805450c5f66e10bbba4b906339920a213c932e3fd3d37cab6b9
Contents?: true
Size: 483 Bytes
Versions: 1
Compression:
Stored size: 483 Bytes
Contents
module Boilerpipe java_import 'com.kohlschutter.boilerpipe.extractors.ArticleExtractor' java_import java.net.URL class ArticleExtractor def self.get_text(s) url = nil begin url = Java::JavaNet::URL.new(s) rescue Java::JavaNet::MalformedURLException => e # not a URL end input = url ? url : s ArticleExtractor::INSTANCE.get_text(input) end class <<self alias_method :text, :get_text end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
jruby-boilerpipe-0.1.0 | lib/boilerpipe/extractors/article_extractor.rb |