model/config.py
def load(self):
        """Loads vocabulary, processing functions and embeddings

        Supposes that build_data.py has been run successfully and that
        the corresponding files have been created (vocab and trimmed GloVe
        vectors)

        """
        # 1. vocabulary
        self.vocab_words = load_vocab(self.filename_words)
        self.vocab_tags  = load_vocab(self.filename_tags)
        self.vocab_chars = load_vocab(self.filename_chars)

        self.nwords     = len(self.vocab_words)
        self.nchars     = len(self.vocab_chars)
        self.ntags      = len(self.vocab_tags)

        # 2. get processing functions that map str -> id
        self.processing_word = get_processing_word(self.vocab_words,
                self.vocab_chars, lowercase=True, chars=self.use_chars)
        self.processing_tag  = get_processing_word(self.vocab_tags,
                lowercase=False, allow_unk=False)

        # 3. get pre-trained embeddings
        self.embeddings = (get_trimmed_word2vec_vectors(self.filename_trimmed)
                if self.use_pretrained else None)
Loads vocabulary, processing functions and embeddings

        Supposes that build_data.py has been run successfully and that
        the corresponding files have been created (vocab and trimmed GloVe
        vectors)

        
Loads vocabulary, processing functions and embeddings
Supposes that build_data.py has been run successfully and that
the corresponding files have been created (vocab and trimmed GloVe
vectors)
Loads vocabulary processing functions and embeddings Supposes that build_data . py has been run successfully and that the corresponding files have been created ( vocab and trimmed GloVe vectors )
def load(self):
        self.vocab_words = load_vocab(self.filename_words)
        self.vocab_tags  = load_vocab(self.filename_tags)
        self.vocab_chars = load_vocab(self.filename_chars)
        self.nwords     = len(self.vocab_words)
        self.nchars     = len(self.vocab_chars)
        self.ntags      = len(self.vocab_tags)
        self.processing_word = get_processing_word(self.vocab_words,
                self.vocab_chars, lowercase=True, chars=self.use_chars)
        self.processing_tag  = get_processing_word(self.vocab_tags,
                lowercase=False, allow_unk=False)
        self.embeddings = (get_trimmed_word2vec_vectors(self.filename_trimmed)
                if self.use_pretrained else None)
def load ( self ) : self . vocab_words = load_vocab ( self . filename_words ) self . vocab_tags = load_vocab ( self . filename_tags ) self . vocab_chars = load_vocab ( self . filename_chars ) self . nwords = len ( self . vocab_words ) self . nchars = len ( self . vocab_chars ) self . ntags = len ( self . vocab_tags ) self . processing_word = get_processing_word ( self . vocab_words , self . vocab_chars , lowercase = True , chars = self . use_chars ) self . processing_tag = get_processing_word ( self . vocab_tags , lowercase = False , allow_unk = False ) self . embeddings = ( get_trimmed_word2vec_vectors ( self . filename_trimmed ) if self . use_pretrained else None )
Loads vocabulary, processing functions and embeddings
Supposes that build_data.py has been run successfully and that
the corresponding files have been created (vocab and trimmed GloVe
vectors)
Loads vocabulary processing functions and embeddings Supposes that build_data . py has been run successfully and that the corresponding files have been created ( vocab and trimmed GloVe vectors )
"""Loads vocabulary, processing functions and embeddings

        Supposes that build_data.py has been run successfully and that
        the corresponding files have been created (vocab and trimmed GloVe
        vectors)

        """ # 1. vocabulary # 2. get processing functions that map str -> id # 3. get pre-trained embeddings
self