Views
No views yet
bert-base-cased pretrained model, fine-tuned for token classification on top of the "nominalization detection" task as defined and annotated by the QANom project (Klein et. al., COLING 2020).qanom package - see the README in the QANom github repo for full documentation. The qanom package is also available via pip install qanom.qanom.nominalization_detector.NominalizationDetector class, which internally utilize this nominalization-candidate-classifier:1from qanom.nominalization_detector import NominalizationDetector
2detector = NominalizationDetector()
3
4raw_sentences = ["The construction of the officer 's building finished right after the beginning of the destruction of the previous construction ."]
5
6print(detector(raw_sentences, return_all_candidates=True))
7print(detector(raw_sentences, threshold=0.75, return_probability=False))1[[{'predicate_idx': 1,
2 'predicate': 'construction',
3 'predicate_detector_prediction': True,
4 'predicate_detector_probability': 0.7626778483390808,
5 'verb_form': 'construct'},
6 {'predicate_idx': 4,
7 'predicate': 'officer',
8 'predicate_detector_prediction': False,
9 'predicate_detector_probability': 0.19832570850849152,
10 'verb_form': 'officer'},
11 {'predicate_idx': 6,
12 'predicate': 'building',
13 'predicate_detector_prediction': True,
14 'predicate_detector_probability': 0.5794129371643066,
15 'verb_form': 'build'},
16 {'predicate_idx': 11,
17 'predicate': 'beginning',
18 'predicate_detector_prediction': True,
19 'predicate_detector_probability': 0.8937646150588989,
20 'verb_form': 'begin'},
21 {'predicate_idx': 14,
22 'predicate': 'destruction',
23 'predicate_detector_prediction': True,
24 'predicate_detector_probability': 0.8501205444335938,
25 'verb_form': 'destruct'},
26 {'predicate_idx': 18,
27 'predicate': 'construction',
28 'predicate_detector_prediction': True,
29 'predicate_detector_probability': 0.7022264003753662,
30 'verb_form': 'construct'}]]1[[{'predicate_idx': 1, 'predicate': 'construction', 'verb_form': 'construct'},
2 {'predicate_idx': 11, 'predicate': 'beginning', 'verb_form': 'begin'},
3 {'predicate_idx': 14, 'predicate': 'destruction', 'verb_form': 'destruct'}]]1@inproceedings{klein2020qanom,
2 title={QANom: Question-Answer driven SRL for Nominalizations},
3 author={Klein, Ayal and Mamou, Jonathan and Pyatkin, Valentina and Stepanov, Daniela and He, Hangfeng and Roth, Dan and Zettlemoyer, Luke and Dagan, Ido},
4 booktitle={Proceedings of the 28th International Conference on Computational Linguistics},
5 pages={3069--3083},
6 year={2020}
7}