class Dict[str,] = None, domain_identifier: str = None, lazy: bool = False)[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.

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.