]> code.communitydata.science - ml_measurement_error_public.git/blobdiff - civil_comments/perspective_json_to_csv.jq
Add exploratory data analysis to come up with a real-data example.
[ml_measurement_error_public.git] / civil_comments / perspective_json_to_csv.jq
diff --git a/civil_comments/perspective_json_to_csv.jq b/civil_comments/perspective_json_to_csv.jq
new file mode 100755 (executable)
index 0000000..0688d21
--- /dev/null
@@ -0,0 +1,2 @@
+#!/usr/bin/bash
+cat $1 | jq "[.attributeScores.IDENTITY_ATTACK.summaryScore.value, .attributeScores.INSULT.summaryScore.value, .attributeScores.PROFANITY.summaryScore.value,.attributeScores.SEVERE_TOXICITY.summaryScore.value, .attributeScores.THREAT.summaryScore.value, .attributeScores.TOXICITY.summaryScore.value] | @csv" > $2

Community Data Science Collective || Want to submit a patch?