Tools

deepke.name_entity_re.standard.tools.dataset module

class deepke.name_entity_re.standard.tools.dataset.InputExample(guid, text_a, text_b=None, label=None)[source]

Bases: object

A single training/test example for simple sequence classification.

class deepke.name_entity_re.standard.tools.dataset.InputFeatures(input_ids, input_mask, segment_ids, label_id, valid_ids=None, label_mask=None)[source]

Bases: object

A single set of features of data.

deepke.name_entity_re.standard.tools.dataset.readfile(filename)[source]

read file

class deepke.name_entity_re.standard.tools.dataset.DataProcessor[source]

Bases: object

Base class for data converters for sequence classification data sets.

get_train_examples(data_dir)[source]

Gets a collection of `InputExample`s for the train set.

get_dev_examples(data_dir)[source]

Gets a collection of `InputExample`s for the dev set.

get_labels()[source]

Gets the list of labels for this data set.

deepke.name_entity_re.standard.tools.preprocess module

class deepke.name_entity_re.standard.tools.preprocess.NerProcessor[source]

Bases: deepke.name_entity_re.standard.tools.dataset.DataProcessor

Processor for the dataset.

get_train_examples(data_dir)[source]

See base class.

get_dev_examples(data_dir)[source]

See base class.

get_test_examples(data_dir)[source]

See base class.

get_labels()[source]

Gets the list of labels for this data set.

deepke.name_entity_re.standard.tools.preprocess.convert_examples_to_features(examples, label_list, max_seq_length, tokenizer)[source]

Loads a data file into a list of `InputBatch`s.