ec0b3e8c47876f4700c69d8ad19d2fe6aafbd1ff,parlai/scripts/detect_offensive_language.py,,detect,#Any#Any#Any#,37

Before Change


    print(
        str(cnt)
        + " offensive messages found out of "
        + str(world.num_examples())
        + " messages."
    )
    return world.report()

After Change


    world = create_task(opt, agent)
    if opt["safety"] == "string_matcher" or opt["safety"] == "all":
        offensive_string_matcher = OffensiveStringMatcher()
    if opt["safety"] == "classifier" or opt["safety"] == "all":
        offensive_classifier = OffensiveLanguageClassifier()

    if print_parser:
        // Show arguments after loading model
        print_parser.opt = agent.opt
        print_parser.print_args()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: facebookresearch/ParlAI
Commit Name: ec0b3e8c47876f4700c69d8ad19d2fe6aafbd1ff
Time: 2020-04-15
Author: jase@fb.com
File Name: parlai/scripts/detect_offensive_language.py
Class Name:
Method Name: detect


Project Name: facebookresearch/ParlAI
Commit Name: 4311d7b6cd2b7a0faa63d4091896b8480f145279
Time: 2017-12-07
Author: kshuster@fb.com
File Name: examples/train_model.py
Class Name: TrainLoop
Method Name: __init__


Project Name: facebookresearch/ParlAI
Commit Name: 37f58cc580da8735ae5a259d4cb4ba0b8701e78e
Time: 2019-02-08
Author: roller@fb.com
File Name: parlai/tasks/integration_tests/agents.py
Class Name: CandidateTeacher
Method Name: num_episodes