This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
starttime = Time.now.to_f | |
if ARGV.size == 0 | |
puts "Usage: $ ruby script.rb [-o][-j][-t] files_to_parse.json(can be an array) [> outputfile.csv]\n\nOptions: | |
-o\tSkip diagnostic messages and display results only | |
-j\tFormat output as JSON instead of CSV | |
-t\tSquelch results and only show time and counts" | |
else | |
toscan = ARGV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
starttime = Time.now.to_f | |
if ARGV.size == 0 | |
puts "Usage: $ ruby script.rb [-o][-t] files_to_parse.json(can be an array) [> outputfile.csv]\n\nOptions: | |
-o\tSkip diagnostic and performance messages so output can be directly stored | |
-t\tSquelch results and only show time and statistics (diagnostic run)" | |
else | |
toscan = ARGV |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
interaction.type == "wordpress" | |
and wordpress.type == "post" | |
and language.tag == "en" | |
and language.confidence > 80 | |
and | |
( | |
salience.title.topics exists | |
or | |
salience.content.topics exists | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//We start by defining TAGGING RULES | |
// we are tagging posts by cat fans | |
tag.fan "cat" | |
{ | |
interaction.content contains_any "kitties, cats, kittens, meow" | |
OR | |
links.meta.description contains_any "cats, cat photos, kittens, kitten photos" | |
OR |