From 0b1841ac5e08e730e129adfe20b0f78e41814145 Mon Sep 17 00:00:00 2001 From: Eric Smith Date: Mon, 28 Sep 2020 10:54:54 -0400 Subject: [PATCH] AcceptabilityChecker doc (#3124) --- parlai/crowdsourcing/utils/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 parlai/crowdsourcing/utils/README.md diff --git a/parlai/crowdsourcing/utils/README.md b/parlai/crowdsourcing/utils/README.md new file mode 100644 index 00000000000..1661091cee2 --- /dev/null +++ b/parlai/crowdsourcing/utils/README.md @@ -0,0 +1,9 @@ +# Crowdsourcing utilities + +## `acceptability.AcceptabilityChecker` + +* Used to make sure that a worker's messages throughout a conversation meet certain criteria (not too short, not all caps, not a lot of repetition, safety, etc.) +### How to add a new check +- Add the code for this in `.check_messages()`, inside a `if 'check_name' in violation_types:` condition +- Add the name of the check to `self.possible_violation_types`; otherwise, this check will not be recognized, and an error will be raised if the check is specified when calling `.check_messages()`! +- To use the check: add the name of the check to the `violation_types` arg when calling `.check_messages()`