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


Reads a file in the conllu Universal Dependencies format.

token_indexersDict[str, TokenIndexer], optional (default=``{“tokens”: SingleIdTokenIndexer()}``)

The token indexers to be applied to the words TextField.

use_language_specific_posbool, optional (default = False)

Whether to use UD POS tags, or to use the language specific POS tags provided in the conllu format.

text_to_instance(self, words:List[str], upos_tags:List[str], dependencies:List[Tuple[str, int]]=None) →[source]
wordsList[str], required.

The words in the sentence to be encoded.

upos_tagsList[str], required.

The universal dependencies POS tags for each word.

dependenciesList[Tuple[str, int]], optional (default = None)

A list of (head tag, head index) tuples. Indices are 1 indexed, meaning an index of 0 corresponds to that word being the root of the dependency tree.

An instance containing words, upos tags, dependency head tags and head
indices as fields., fields:Tuple[str, ...]=('id', 'form', 'lemma', 'upostag', 'xpostag', 'feats', 'head', 'deprel', 'deps', 'misc'))[source]