Exemplo n.º 1
0
def test_determine_token_labels_with_extractors():
    determine_token_labels(CH_correct_segmentation[0],
                           [CH_correct_entity, CH_wrong_entity], ["A", "B"])
Exemplo n.º 2
0
def test_determine_token_labels_throws_error():
    with pytest.raises(ValueError):
        determine_token_labels(CH_correct_segmentation,
                               [CH_correct_entity,
                                CH_wrong_entity], ["CRFEntityExtractor"])
Exemplo n.º 3
0
def test_determine_token_labels_no_extractors():
    determine_token_labels(CH_correct_segmentation[0],
                           [CH_correct_entity, CH_wrong_entity], None)
Exemplo n.º 4
0
def test_determine_token_labels_no_extractors_no_overlap():
    determine_token_labels(CH_correct_segmentation[0], EN_targets, None)
Exemplo n.º 5
0
def test_determine_token_labels_with_extractors():
    determine_token_labels(
        CH_correct_segmentation[0], [CH_correct_entity, CH_wrong_entity],
        [SpacyEntityExtractor.name, MitieEntityExtractor.name])
Exemplo n.º 6
0
def test_determine_token_labels_no_extractors():
    with pytest.raises(ValueError):
        determine_token_labels(CH_correct_segmentation[0],
                               [CH_correct_entity, CH_wrong_entity], None)
Exemplo n.º 7
0
def test_determine_token_labels_with_extractors():
    determine_token_labels(CH_correct_segmentation[0],
                           [CH_correct_entity, CH_wrong_entity],
                           [SpacyEntityExtractor.name,
                            MitieEntityExtractor.name])
Exemplo n.º 8
0
def test_determine_token_labels_no_extractors_no_overlap():
    determine_token_labels(CH_correct_segmentation[0],
                           EN_targets, None)
Exemplo n.º 9
0
def test_determine_token_labels_no_extractors():
    with pytest.raises(ValueError):
        determine_token_labels(CH_correct_segmentation[0],
                               [CH_correct_entity, CH_wrong_entity], None)
Exemplo n.º 10
0
def test_determine_token_labels_throws_error():
    with pytest.raises(ValueError):
        determine_token_labels(CH_correct_segmentation[0],
                               [CH_correct_entity,
                                CH_wrong_entity], ["CRFEntityExtractor"])