For example, suppose I have a TEXT Field object and do TEXT.build_vocab(train_set, max_size=50000). My understanding is that build_vocab() finds all unique words in the training set (which has been tokenized by the tokenizer passed to the Field object) and assigns them a unique integer. So in this case, my vocabulary will consist of 49,998 words mapped to unique integers. The other two words are <unk> (index 0) and <pad> (index 1).
Question
What if my train set has 100,000 unique words? Does build_vocab() only assign unique integers to the first 49,998 unique words encountered (and <unk> and <pad>), or does it also consider how frequently a word occurs? I see a counter parameter in the vocab object docs, but not sure how it is used (also see min_freq which makes sense to me).