pytext.common package

Submodules

pytext.common.constants module

class pytext.common.constants.BatchContext[source]

Bases: object

IGNORE_LOSS = 'ignore_loss'
INDEX = 'index'
TASK_NAME = 'task_name'
class pytext.common.constants.DFColumn[source]

Bases: object

ALIGNMENT = 'alignment'
DICT_FEAT = 'dict_feat'
DOC_LABEL = 'doc_label'
DOC_WEIGHT = 'doc_weight'
LANGUAGE_ID = 'lang'
MODEL_FEATS = 'model_feats'
RAW_FEATS = 'raw_feats'
SEQLOGICAL = 'seqlogical'
SOURCE_FEATS = 'source_feats'
SOURCE_SEQUENCE = 'source_sequence'
TARGET_SEQUENCE = 'target_sequence'
TARGET_TOKENS = 'target_tokens'
TOKEN_RANGE = 'token_range'
UTTERANCE = 'text'
WORD_LABEL = 'word_label'
WORD_WEIGHT = 'word_weight'
class pytext.common.constants.DatasetFieldName[source]

Bases: object

CHAR_FIELD = 'char_feat'
DICT_FIELD = 'dict_feat'
DOC_LABEL_FIELD = 'doc_label'
DOC_WEIGHT_FIELD = 'doc_weight'
LANGUAGE_ID_FIELD = 'lang'
PRETRAINED_MODEL_EMBEDDING = 'pretrained_model_embedding'
RAW_DICT_FIELD = 'sparsefeat'
RAW_WORD_LABEL = 'raw_word_label'
SEQ_FIELD = 'seq_word_feat'
SEQ_LENS = 'seq_lens'
SOURCE_SEQ_FIELD = 'source_sequence'
TARGET_SEQ_FIELD = 'target_sequence'
TARGET_SEQ_LENS = 'target_seq_lens'
TEXT_FIELD = 'word_feat'
TOKENS = 'tokens'
TOKEN_RANGE = 'token_range'
UTTERANCE_FIELD = 'utterance'
WORD_LABEL_FIELD = 'word_label'
WORD_WEIGHT_FIELD = 'word_weight'
class pytext.common.constants.PackageFileName[source]

Bases: object

RAW_EMBED = 'pretrained_embed_raw'
SERIALIZED_EMBED = 'pretrained_embed_pt_serialized'
class pytext.common.constants.Padding[source]

Bases: object

WORD_LABEL_PAD = 'PAD_LABEL'
WORD_LABEL_PAD_IDX = 0
class pytext.common.constants.Stage[source]

Bases: enum.Enum

An enumeration.

EVAL = 'Evaluation'
TEST = 'Test'
TRAIN = 'Training'
class pytext.common.constants.VocabMeta[source]

Bases: object

EOS_SEQ = '</s_seq>'
EOS_TOKEN = '</s>'
INIT_SEQ = '<s_seq>'
INIT_TOKEN = '<s>'
PAD_SEQ = '<pad_seq>'
PAD_TOKEN = '<pad>'
UNK_TOKEN = '<unk>'

Module contents