flair.datasets.relation_extraction#

flair.datasets.relation_extraction.convert_ptb_token(token)View on GitHub#

Convert PTB tokens to normal tokens.

Return type:

str

class flair.datasets.relation_extraction.RE_ENGLISH_SEMEVAL2010(base_path=None, in_memory=True, augment_train=False, **corpusargs)View on GitHub#

Bases: ColumnCorpus

extract_and_convert_to_conllu(data_file, data_folder, augment_train)View on GitHub#
class flair.datasets.relation_extraction.RE_ENGLISH_TACRED(base_path=None, in_memory=True, **corpusargs)View on GitHub#

Bases: ColumnCorpus

extract_and_convert_to_conllu(data_file, data_folder)View on GitHub#
class flair.datasets.relation_extraction.RE_ENGLISH_CONLL04(base_path=None, in_memory=True, **corpusargs)View on GitHub#

Bases: ColumnCorpus

convert_to_conllu(source_data_folder, data_folder)View on GitHub#
class flair.datasets.relation_extraction.RE_ENGLISH_DRUGPROT(base_path=None, in_memory=True, sentence_splitter=<flair.splitter.SegtokSentenceSplitter object>, **corpusargs)View on GitHub#

Bases: ColumnCorpus

extract_and_convert_to_conllu(data_file, data_folder)View on GitHub#
char_spans_to_token_spans(char_spans, token_offsets)View on GitHub#
has_overlap(a, b)View on GitHub#
drugprot_document_to_tokenlists(pmid, title_sentences, abstract_sentences, abstract_offset, entities, relations)View on GitHub#
Return type:

List[TokenList]