Skip to content
This repository was archived by the owner on Nov 8, 2020. It is now read-only.

A Question About data_processor.populate_word_blacklist #72

Description

@Doragd
def populate_word_blacklist(word_index):
    blacklisted_words = set()
    blacklisted_words |= set(global_config.predefined_word_index.values())
    if global_config.filter_sentiment_words:
        blacklisted_words |= lexicon_helper.get_sentiment_words()
    if global_config.filter_stopwords:
        blacklisted_words |= lexicon_helper.get_stopwords()
  1. The output of global_config.predefined_word_index.values() are indices of some words, not words.
  2. At this point, the actual value of this global_config.predefined_word_index is equal to word_index, not only {'<unk>': 0,'<sos>': 1,'<eos>': 2}.
  3. Therefore, I think that this blacklisted_words contains unnecessary words and does not match the meaning of the blacklist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions