Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added example crowd sourcing script

  • Loading branch information...
commit 4238aa6dfb4202a998b82d27280bad2d7cbf34e1 1 parent d4eb6cc
@trickyf authored
Showing with 30 additions and 0 deletions.
  1. +30 −0 mkcrowdsource.pl
View
30 mkcrowdsource.pl
@@ -0,0 +1,30 @@
+#!/usr/bin/perl
+
+$THRESHOLD=10;
+
+$data = "";
+%allresults = ();
+$maxcount = 0;
+
+$friendlyName = $ARGV[$0];
+
+while(<STDIN>){
+ $line = $_;
+ @stats = split(/\s/, $line);
+ $predicate = $stats[0];
+ $count = $stats[1];
+ $allresults{$predicate}=$count;
+ if($count > $maxcount){
+ $maxcount=$count;
+ }
+}
+
+$tholdValue = ($maxcount / 100) * $THRESHOLD;
+
+while ( my ($p, $count) = each(%allresults) ) {
+ if($count < $tholdValue){
+ @tokens = split(/[\/>]/,$p);
+ @reversed = reverse(@tokens);
+ print "Can a $friendlyName have a $reversed[0]?\n";
+ }
+}
Please sign in to comment.
Something went wrong with that request. Please try again.