torchtext.vocab.Vocab is a class while torchtext.vocab.vocab is a method that returns an object of type torchtext.vocab.Vocab.
  

      github.com
  

  
    pytorch/text/blob/master/torchtext/vocab.py#L225-L230



      
      
          tokens = []
          for token, freq in ordered_dict.items():
              if freq >= min_freq:
                  tokens.append(token)
          
          
return Vocab(VocabPybind(tokens, None))
      
    
  


  

  
    
    
  

  


A bit like tensor and Tensor.