-
Notifications
You must be signed in to change notification settings - Fork 0
/
Rakefile
39 lines (26 loc) · 1.44 KB
/
Rakefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
require "bundler/gem_tasks"
require "rspec/core/rake_task"
require 'sort_rank'
# require 'webs_criteria'
RSpec::Core::RakeTask.new(:spec)
task :default => :spec
task :test => :spec
###################
task :console do
require 'irb'
require 'irb/completion'
require 'sort_rank'
require "active_support/all"
ARGV.clear
result_hash = run_sort_rank
IRB.start
end
def run_sort_rank
# args = {text: "Can a rat eat tar? How big is the arc of that car door? Could you pass me the book just below your elbow? Does your state have a coffee taste test?" }
args = { text: "The state capitol in Austin, Texas Austin is a city of over 912,000 in the Hill Country of central Texas. It is the state capital and home to a major university as well as an influential center for politics, technology, music, film and increasingly a food scene. Austin's embrace of alternative cultures is commonly emblazoned about town on T-Shirts and bumper stickers that read: 'Keep Austin Weird.' Austin is also marketed as the 'Live Music Capital of the World' due to the large number of venues and 'Silicon Hills' reflecting the many technology companies." }
result_hash = SortRank.parse(args)
# scraper = LinkScraper::Scrape.new({text_criteria: text_criteria, path_criteria: path_criteria})
# scraped_links = scraper.start('https://en.wikipedia.org/wiki/Austin%2C_Texas')
# binding.pry
# scraper = LinkScraper::Scrape.new(WebsCriteria.all_scrub_web_criteria)
end