class Dict[str,] = None, domain_identifier: str = None, lazy: bool = False, bert_model_name: str = None)[source]


This DatasetReader is designed to read in the English OntoNotes v5.0 data for semantic role labelling. It returns a dataset of instances with the following fields:


The tokens in the sentence.


A sequence of binary indicators for whether the word is the verb for this frame.


A sequence of Propbank tags for the given verb in a BIO format.

token_indexersDict[str, TokenIndexer], optional

We similarly use this for both the premise and the hypothesis. See TokenIndexer. Default is {"tokens": SingleIdTokenIndexer()}.

domain_identifier: ``str``, (default = None)

A string denoting a sub-domain of the Ontonotes 5.0 dataset to use. If present, only conll files under paths containing this domain identifier will be processed.

bert_model_nameOptional[str], (default = None)

The BERT model to be wrapped. If you specify a bert_model here, then we will assume you want to use BERT throughout; we will use the bert tokenizer, and will expand your tags and verb indicators accordingly. If not, the tokens will be indexed as normal with the token_indexers.

A Dataset of Instances for Semantic Role Labelling.
text_to_instance(self, tokens: List[], verb_label: List[int], tags: List[str] = None) →[source]

We take pre-tokenized input here, along with a verb label. The verb label should be a one-hot binary vector, the same length as the tokens, indicating the position of the verb to find arguments for.