assert result["label_probs"][2] > 0.7 // neutral
def test_coreference_resolution(self):
predictor = Predictor.from_archive(load_archive(DEFAULT_MODELS["coreference-resolution"]),
"coreference-resolution")
document = "We "re not going to skimp on quality , but we are very focused to make next year . The only problem is that some of the fabrics are wearing out - since I was a newbie I skimped on some of the fabric and the poor quality ones are developing holes . For some , an awareness of this exit strategy permeates the enterprise , allowing them to skimp on the niceties they would more or less have to extend toward a person they were likely to meet again ."
result = predictor.predict_json({"document": document})
assert result["clusters"] == [[[0, 0], [10, 10]],
After Change
assert result["label_probs"][2] > 0.7 // neutral
def test_coreference_resolution(self):
predictor = DEFAULT_MODELS["coreference-resolution"].predictor()
document = "We "re not going to skimp on quality , but we are very focused to make next year . The only problem is that some of the fabrics are wearing out - since I was a newbie I skimped on some of the fabric and the poor quality ones are developing holes . For some , an awareness of this exit strategy permeates the enterprise , allowing them to skimp on the niceties they would more or less have to extend toward a person they were likely to meet again ."
result = predictor.predict_json({"document": document})