We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
min_freq=0 bug
**Noticed:**
```
>>>some_field.build_vocab(some_dataset, min_freq=0)
>>>padding_idx = some_field.vocab.stoi['<pad'>]
>>>print(padding_idx, '<pad>')
12 <pad>
```

Looks like <pad> is not equal to 1 which is not okay.

Printed `stoi` and `itos` as well:
```
>>>print(some_field.vocab.stoi)
defaultdict(<function Vocab.__init__.<locals>.<lambda> at 0x103f4f0d0>, {'<pad>': 12, '1': 2, '2': 3, '9': 4, '0': 5, '5': 6, '4': 7, '6': 8, '8': 9, '3': 10, '7': 11, '<unk>': 13})
>>>print(some_field.vocab.itos)
['<unk>', '<pad>', '1', '2', '9', '0', '5', '4', '6', '8', '3', '7', '<pad>', '<unk>']
```

**Possible reason:**
Counter subtract does remove the specials but puts their count at 0.
`counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials})`

**Possible solution:**
Throw an error if `min_freq < 1`

--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `torchtext/vocab.py`
Content:
```
1 from __future__ import print_function
2 import array
3 from collections import defaultdict
4 import os
5 import zipfile
6 
7 import six
8 from six.moves.urllib.request import urlretrieve
9 import torch
10 from tqdm import trange, tqdm
11 
12 from .utils import reporthook
13 
14 URL = {
15     'glove.42B': 'http://nlp.stanford.edu/data/glove.42B.300d.zip',
16     'glove.840B': 'http://nlp.stanford.edu/data/glove.840B.300d.zip',
17     'glove.twitter.27B': 'http://nlp.stanford.edu/data/glove.twitter.27B.zip',
18     'glove.6B': 'http://nlp.stanford.edu/data/glove.6B.zip'
19 }
20 
21 
22 def load_word_vectors(root, wv_type, dim):
23     """Load word vectors from a path, trying .pt, .txt, and .zip extensions."""
24     if isinstance(dim, int):
25         dim = str(dim) + 'd'
26     fname = os.path.join(root, wv_type + '.' + dim)
27     if os.path.isfile(fname + '.pt'):
28         fname_pt = fname + '.pt'
29         print('loading word vectors from', fname_pt)
30         return torch.load(fname_pt)
31     if os.path.isfile(fname + '.txt'):
32         fname_txt = fname + '.txt'
33         cm = open(fname_txt, 'rb')
34         cm = [line for line in cm]
35     elif os.path.basename(wv_type) in URL:
36         url = URL[wv_type]
37         print('downloading word vectors from {}'.format(url))
38         filename = os.path.basename(fname)
39         if not os.path.exists(root):
40             os.makedirs(root)
41         with tqdm(unit='B', unit_scale=True, miniters=1, desc=filename) as t:
42             fname, _ = urlretrieve(url, fname, reporthook=reporthook(t))
43             with zipfile.ZipFile(fname, "r") as zf:
44                 print('extracting word vectors into {}'.format(root))
45                 zf.extractall(root)
46         if not os.path.isfile(fname + '.txt'):
47             raise RuntimeError('no word vectors of requested dimension found')
48         return load_word_vectors(root, wv_type, dim)
49     else:
50         raise RuntimeError('unable to load word vectors')
51 
52     wv_tokens, wv_arr, wv_size = [], array.array('d'), None
53     if cm is not None:
54         print("Loading word vectors from {}".format(fname_txt))
55         for line in trange(len(cm)):
56             entries = cm[line].strip().split(b' ')
57             word, entries = entries[0], entries[1:]
58             if wv_size is None:
59                 wv_size = len(entries)
60             try:
61                 if isinstance(word, six.binary_type):
62                     word = word.decode('utf-8')
63             except:
64                 print('non-UTF8 token', repr(word), 'ignored')
65                 continue
66             wv_arr.extend(float(x) for x in entries)
67             wv_tokens.append(word)
68 
69     wv_dict = {word: i for i, word in enumerate(wv_tokens)}
70     wv_arr = torch.Tensor(wv_arr).view(-1, wv_size)
71     ret = (wv_dict, wv_arr, wv_size)
72     torch.save(ret, fname + '.pt')
73     return ret
74 
75 
76 class Vocab(object):
77     """Defines a vocabulary object that will be used to numericalize a field.
78 
79     Attributes:
80         freqs: A collections.Counter object holding the frequencies of tokens
81             in the data used to build the Vocab.
82         stoi: A collections.defaultdict instance mapping token strings to
83             numerical identifiers.
84         itos: A list of token strings indexed by their numerical identifiers.
85         vectors: A Tensor containing word vectors for the tokens in the Vocab,
86             if a word vector file has been provided.
87     """
88 
89     def __init__(self, counter, max_size=None, min_freq=1, wv_dir=os.getcwd(),
90                  wv_type=None, wv_dim=300, unk_init='random',
91                  specials=['<pad>'], fill_from_vectors=False):
92         """Create a Vocab object from a collections.Counter.
93 
94         Arguments:
95             counter: collections.Counter object holding the frequencies of
96                 each value found in the data.
97             max_size: The maximum size of the vocabulary, or None for no
98                 maximum. Default: None.
99             min_freq: The minimum frequency needed to include a token in the
100                 vocabulary. Default: 1.
101             wv_dir: directory containing word vector file and destination for
102                 downloaded word vector files
103             wv_type: type of word vectors; None for no word vectors
104             wv_dim: dimension of word vectors
105             specials: The list of special tokens (e.g., padding or eos) that
106                 will be prepended to the vocabulary in addition to an <unk>
107                 token.
108             fill_from_vectors: Whether to add to the vocabulary every token
109                 for which a word vector specified by vectors is present
110                 even if the token does not appear in the provided data.
111             unk_init: default to random initialization for word vectors not in the
112                 pretrained word vector file; otherwise set to zero
113         """
114         self.freqs = counter.copy()
115         self.unk_init = unk_init
116         counter.update(['<unk>'] + specials)
117 
118         if wv_type is not None:
119             wv_dict, wv_arr, self.wv_size = load_word_vectors(wv_dir, wv_type, wv_dim)
120 
121             if fill_from_vectors:
122                 counter.update(wv_dict.keys())
123 
124         self.stoi = defaultdict(lambda: 0)
125         self.stoi.update({tok: i + 1 for i, tok in enumerate(specials)})
126         self.itos = ['<unk>'] + specials
127 
128         counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials})
129         max_size = None if max_size is None else max_size + len(self.itos)
130 
131         # sort by frequency, then alphabetically
132         words = sorted(counter.items(), key=lambda tup: tup[0])
133         words.sort(key=lambda tup: tup[1], reverse=True)
134 
135         for k, v in words:
136             if v < min_freq or len(self.itos) == max_size:
137                 break
138             self.itos.append(k)
139             self.stoi[k] = len(self.itos) - 1
140 
141         if wv_type is not None:
142             self.set_vectors(wv_dict, wv_arr)
143 
144     def __len__(self):
145         return len(self.itos)
146 
147     def load_vectors(self, wv_dir=os.getcwd(), wv_type=None, wv_dim=300,
148                      unk_init='random'):
149         """Loads word vectors into the vocab
150 
151         Arguments:
152             wv_dir: directory containing word vector file and destination for
153                 downloaded word vector files
154             wv_type: type of word vectors; None for no word vectors
155             wv_dim: dimension of word vectors
156 
157             unk_init: default to random initialization for unknown word vectors;
158                 otherwise set to zero
159         """
160         self.unk_init = unk_init
161         wv_dict, wv_arr, self.wv_size = load_word_vectors(wv_dir, wv_type, wv_dim)
162         self.set_vectors(wv_dict, wv_arr)
163 
164     def set_vectors(self, wv_dict, wv_arr):
165         self.vectors = torch.Tensor(len(self), self.wv_size)
166         self.vectors.normal_(0, 1) if self.unk_init == 'random' else self.vectors.zero_()
167         for i, token in enumerate(self.itos):
168             wv_index = wv_dict.get(token, None)
169             if wv_index is not None:
170                 self.vectors[i] = wv_arr[wv_index]
171
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/torchtext/vocab.py b/torchtext/vocab.py
--- a/torchtext/vocab.py
+++ b/torchtext/vocab.py
@@ -113,6 +113,7 @@
         """
         self.freqs = counter.copy()
         self.unk_init = unk_init
+        min_freq = max(min_freq, 1)
         counter.update(['<unk>'] + specials)
 
         if wv_type is not None:

{"golden_diff": "diff --git a/torchtext/vocab.py b/torchtext/vocab.py\n--- a/torchtext/vocab.py\n+++ b/torchtext/vocab.py\n@@ -113,6 +113,7 @@\n         \"\"\"\n         self.freqs = counter.copy()\n         self.unk_init = unk_init\n+        min_freq = max(min_freq, 1)\n         counter.update(['<unk>'] + specials)\n \n         if wv_type is not None:\n", "issue": "min_freq=0 bug\n**Noticed:**\r\n```\r\n>>>some_field.build_vocab(some_dataset, min_freq=0)\r\n>>>padding_idx = some_field.vocab.stoi['<pad'>]\r\n>>>print(padding_idx, '<pad>')\r\n12 <pad>\r\n```\r\n\r\nLooks like <pad> is not equal to 1 which is not okay.\r\n\r\nPrinted `stoi` and `itos` as well:\r\n```\r\n>>>print(some_field.vocab.stoi)\r\ndefaultdict(<function Vocab.__init__.<locals>.<lambda> at 0x103f4f0d0>, {'<pad>': 12, '1': 2, '2': 3, '9': 4, '0': 5, '5': 6, '4': 7, '6': 8, '8': 9, '3': 10, '7': 11, '<unk>': 13})\r\n>>>print(some_field.vocab.itos)\r\n['<unk>', '<pad>', '1', '2', '9', '0', '5', '4', '6', '8', '3', '7', '<pad>', '<unk>']\r\n```\r\n\r\n**Possible reason:**\r\nCounter subtract does remove the specials but puts their count at 0.\r\n`counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials})`\r\n\r\n**Possible solution:**\r\nThrow an error if `min_freq < 1`\n", "before_files": [{"content": "from __future__ import print_function\nimport array\nfrom collections import defaultdict\nimport os\nimport zipfile\n\nimport six\nfrom six.moves.urllib.request import urlretrieve\nimport torch\nfrom tqdm import trange, tqdm\n\nfrom .utils import reporthook\n\nURL = {\n    'glove.42B': 'http://nlp.stanford.edu/data/glove.42B.300d.zip',\n    'glove.840B': 'http://nlp.stanford.edu/data/glove.840B.300d.zip',\n    'glove.twitter.27B': 'http://nlp.stanford.edu/data/glove.twitter.27B.zip',\n    'glove.6B': 'http://nlp.stanford.edu/data/glove.6B.zip'\n}\n\n\ndef load_word_vectors(root, wv_type, dim):\n    \"\"\"Load word vectors from a path, trying .pt, .txt, and .zip extensions.\"\"\"\n    if isinstance(dim, int):\n        dim = str(dim) + 'd'\n    fname = os.path.join(root, wv_type + '.' + dim)\n    if os.path.isfile(fname + '.pt'):\n        fname_pt = fname + '.pt'\n        print('loading word vectors from', fname_pt)\n        return torch.load(fname_pt)\n    if os.path.isfile(fname + '.txt'):\n        fname_txt = fname + '.txt'\n        cm = open(fname_txt, 'rb')\n        cm = [line for line in cm]\n    elif os.path.basename(wv_type) in URL:\n        url = URL[wv_type]\n        print('downloading word vectors from {}'.format(url))\n        filename = os.path.basename(fname)\n        if not os.path.exists(root):\n            os.makedirs(root)\n        with tqdm(unit='B', unit_scale=True, miniters=1, desc=filename) as t:\n            fname, _ = urlretrieve(url, fname, reporthook=reporthook(t))\n            with zipfile.ZipFile(fname, \"r\") as zf:\n                print('extracting word vectors into {}'.format(root))\n                zf.extractall(root)\n        if not os.path.isfile(fname + '.txt'):\n            raise RuntimeError('no word vectors of requested dimension found')\n        return load_word_vectors(root, wv_type, dim)\n    else:\n        raise RuntimeError('unable to load word vectors')\n\n    wv_tokens, wv_arr, wv_size = [], array.array('d'), None\n    if cm is not None:\n        print(\"Loading word vectors from {}\".format(fname_txt))\n        for line in trange(len(cm)):\n            entries = cm[line].strip().split(b' ')\n            word, entries = entries[0], entries[1:]\n            if wv_size is None:\n                wv_size = len(entries)\n            try:\n                if isinstance(word, six.binary_type):\n                    word = word.decode('utf-8')\n            except:\n                print('non-UTF8 token', repr(word), 'ignored')\n                continue\n            wv_arr.extend(float(x) for x in entries)\n            wv_tokens.append(word)\n\n    wv_dict = {word: i for i, word in enumerate(wv_tokens)}\n    wv_arr = torch.Tensor(wv_arr).view(-1, wv_size)\n    ret = (wv_dict, wv_arr, wv_size)\n    torch.save(ret, fname + '.pt')\n    return ret\n\n\nclass Vocab(object):\n    \"\"\"Defines a vocabulary object that will be used to numericalize a field.\n\n    Attributes:\n        freqs: A collections.Counter object holding the frequencies of tokens\n            in the data used to build the Vocab.\n        stoi: A collections.defaultdict instance mapping token strings to\n            numerical identifiers.\n        itos: A list of token strings indexed by their numerical identifiers.\n        vectors: A Tensor containing word vectors for the tokens in the Vocab,\n            if a word vector file has been provided.\n    \"\"\"\n\n    def __init__(self, counter, max_size=None, min_freq=1, wv_dir=os.getcwd(),\n                 wv_type=None, wv_dim=300, unk_init='random',\n                 specials=['<pad>'], fill_from_vectors=False):\n        \"\"\"Create a Vocab object from a collections.Counter.\n\n        Arguments:\n            counter: collections.Counter object holding the frequencies of\n                each value found in the data.\n            max_size: The maximum size of the vocabulary, or None for no\n                maximum. Default: None.\n            min_freq: The minimum frequency needed to include a token in the\n                vocabulary. Default: 1.\n            wv_dir: directory containing word vector file and destination for\n                downloaded word vector files\n            wv_type: type of word vectors; None for no word vectors\n            wv_dim: dimension of word vectors\n            specials: The list of special tokens (e.g., padding or eos) that\n                will be prepended to the vocabulary in addition to an <unk>\n                token.\n            fill_from_vectors: Whether to add to the vocabulary every token\n                for which a word vector specified by vectors is present\n                even if the token does not appear in the provided data.\n            unk_init: default to random initialization for word vectors not in the\n                pretrained word vector file; otherwise set to zero\n        \"\"\"\n        self.freqs = counter.copy()\n        self.unk_init = unk_init\n        counter.update(['<unk>'] + specials)\n\n        if wv_type is not None:\n            wv_dict, wv_arr, self.wv_size = load_word_vectors(wv_dir, wv_type, wv_dim)\n\n            if fill_from_vectors:\n                counter.update(wv_dict.keys())\n\n        self.stoi = defaultdict(lambda: 0)\n        self.stoi.update({tok: i + 1 for i, tok in enumerate(specials)})\n        self.itos = ['<unk>'] + specials\n\n        counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials})\n        max_size = None if max_size is None else max_size + len(self.itos)\n\n        # sort by frequency, then alphabetically\n        words = sorted(counter.items(), key=lambda tup: tup[0])\n        words.sort(key=lambda tup: tup[1], reverse=True)\n\n        for k, v in words:\n            if v < min_freq or len(self.itos) == max_size:\n                break\n            self.itos.append(k)\n            self.stoi[k] = len(self.itos) - 1\n\n        if wv_type is not None:\n            self.set_vectors(wv_dict, wv_arr)\n\n    def __len__(self):\n        return len(self.itos)\n\n    def load_vectors(self, wv_dir=os.getcwd(), wv_type=None, wv_dim=300,\n                     unk_init='random'):\n        \"\"\"Loads word vectors into the vocab\n\n        Arguments:\n            wv_dir: directory containing word vector file and destination for\n                downloaded word vector files\n            wv_type: type of word vectors; None for no word vectors\n            wv_dim: dimension of word vectors\n\n            unk_init: default to random initialization for unknown word vectors;\n                otherwise set to zero\n        \"\"\"\n        self.unk_init = unk_init\n        wv_dict, wv_arr, self.wv_size = load_word_vectors(wv_dir, wv_type, wv_dim)\n        self.set_vectors(wv_dict, wv_arr)\n\n    def set_vectors(self, wv_dict, wv_arr):\n        self.vectors = torch.Tensor(len(self), self.wv_size)\n        self.vectors.normal_(0, 1) if self.unk_init == 'random' else self.vectors.zero_()\n        for i, token in enumerate(self.itos):\n            wv_index = wv_dict.get(token, None)\n            if wv_index is not None:\n                self.vectors[i] = wv_arr[wv_index]\n", "path": "torchtext/vocab.py"}], "after_files": [{"content": "from __future__ import print_function\nimport array\nfrom collections import defaultdict\nimport os\nimport zipfile\n\nimport six\nfrom six.moves.urllib.request import urlretrieve\nimport torch\nfrom tqdm import trange, tqdm\n\nfrom .utils import reporthook\n\nURL = {\n    'glove.42B': 'http://nlp.stanford.edu/data/glove.42B.300d.zip',\n    'glove.840B': 'http://nlp.stanford.edu/data/glove.840B.300d.zip',\n    'glove.twitter.27B': 'http://nlp.stanford.edu/data/glove.twitter.27B.zip',\n    'glove.6B': 'http://nlp.stanford.edu/data/glove.6B.zip'\n}\n\n\ndef load_word_vectors(root, wv_type, dim):\n    \"\"\"Load word vectors from a path, trying .pt, .txt, and .zip extensions.\"\"\"\n    if isinstance(dim, int):\n        dim = str(dim) + 'd'\n    fname = os.path.join(root, wv_type + '.' + dim)\n    if os.path.isfile(fname + '.pt'):\n        fname_pt = fname + '.pt'\n        print('loading word vectors from', fname_pt)\n        return torch.load(fname_pt)\n    if os.path.isfile(fname + '.txt'):\n        fname_txt = fname + '.txt'\n        cm = open(fname_txt, 'rb')\n        cm = [line for line in cm]\n    elif os.path.basename(wv_type) in URL:\n        url = URL[wv_type]\n        print('downloading word vectors from {}'.format(url))\n        filename = os.path.basename(fname)\n        if not os.path.exists(root):\n            os.makedirs(root)\n        with tqdm(unit='B', unit_scale=True, miniters=1, desc=filename) as t:\n            fname, _ = urlretrieve(url, fname, reporthook=reporthook(t))\n            with zipfile.ZipFile(fname, \"r\") as zf:\n                print('extracting word vectors into {}'.format(root))\n                zf.extractall(root)\n        if not os.path.isfile(fname + '.txt'):\n            raise RuntimeError('no word vectors of requested dimension found')\n        return load_word_vectors(root, wv_type, dim)\n    else:\n        raise RuntimeError('unable to load word vectors')\n\n    wv_tokens, wv_arr, wv_size = [], array.array('d'), None\n    if cm is not None:\n        print(\"Loading word vectors from {}\".format(fname_txt))\n        for line in trange(len(cm)):\n            entries = cm[line].strip().split(b' ')\n            word, entries = entries[0], entries[1:]\n            if wv_size is None:\n                wv_size = len(entries)\n            try:\n                if isinstance(word, six.binary_type):\n                    word = word.decode('utf-8')\n            except:\n                print('non-UTF8 token', repr(word), 'ignored')\n                continue\n            wv_arr.extend(float(x) for x in entries)\n            wv_tokens.append(word)\n\n    wv_dict = {word: i for i, word in enumerate(wv_tokens)}\n    wv_arr = torch.Tensor(wv_arr).view(-1, wv_size)\n    ret = (wv_dict, wv_arr, wv_size)\n    torch.save(ret, fname + '.pt')\n    return ret\n\n\nclass Vocab(object):\n    \"\"\"Defines a vocabulary object that will be used to numericalize a field.\n\n    Attributes:\n        freqs: A collections.Counter object holding the frequencies of tokens\n            in the data used to build the Vocab.\n        stoi: A collections.defaultdict instance mapping token strings to\n            numerical identifiers.\n        itos: A list of token strings indexed by their numerical identifiers.\n        vectors: A Tensor containing word vectors for the tokens in the Vocab,\n            if a word vector file has been provided.\n    \"\"\"\n\n    def __init__(self, counter, max_size=None, min_freq=1, wv_dir=os.getcwd(),\n                 wv_type=None, wv_dim=300, unk_init='random',\n                 specials=['<pad>'], fill_from_vectors=False):\n        \"\"\"Create a Vocab object from a collections.Counter.\n\n        Arguments:\n            counter: collections.Counter object holding the frequencies of\n                each value found in the data.\n            max_size: The maximum size of the vocabulary, or None for no\n                maximum. Default: None.\n            min_freq: The minimum frequency needed to include a token in the\n                vocabulary. Default: 1.\n            wv_dir: directory containing word vector file and destination for\n                downloaded word vector files\n            wv_type: type of word vectors; None for no word vectors\n            wv_dim: dimension of word vectors\n            specials: The list of special tokens (e.g., padding or eos) that\n                will be prepended to the vocabulary in addition to an <unk>\n                token.\n            fill_from_vectors: Whether to add to the vocabulary every token\n                for which a word vector specified by vectors is present\n                even if the token does not appear in the provided data.\n            unk_init: default to random initialization for word vectors not in the\n                pretrained word vector file; otherwise set to zero\n        \"\"\"\n        self.freqs = counter.copy()\n        self.unk_init = unk_init\n        min_freq = max(min_freq, 1)\n        counter.update(['<unk>'] + specials)\n\n        if wv_type is not None:\n            wv_dict, wv_arr, self.wv_size = load_word_vectors(wv_dir, wv_type, wv_dim)\n\n            if fill_from_vectors:\n                counter.update(wv_dict.keys())\n\n        self.stoi = defaultdict(lambda: 0)\n        self.stoi.update({tok: i + 1 for i, tok in enumerate(specials)})\n        self.itos = ['<unk>'] + specials\n\n        counter.subtract({tok: counter[tok] for tok in ['<unk>'] + specials})\n        max_size = None if max_size is None else max_size + len(self.itos)\n\n        # sort by frequency, then alphabetically\n        words = sorted(counter.items(), key=lambda tup: tup[0])\n        words.sort(key=lambda tup: tup[1], reverse=True)\n\n        for k, v in words:\n            if v < min_freq or len(self.itos) == max_size:\n                break\n            self.itos.append(k)\n            self.stoi[k] = len(self.itos) - 1\n\n        if wv_type is not None:\n            self.set_vectors(wv_dict, wv_arr)\n\n    def __len__(self):\n        return len(self.itos)\n\n    def load_vectors(self, wv_dir=os.getcwd(), wv_type=None, wv_dim=300,\n                     unk_init='random'):\n        \"\"\"Loads word vectors into the vocab\n\n        Arguments:\n            wv_dir: directory containing word vector file and destination for\n                downloaded word vector files\n            wv_type: type of word vectors; None for no word vectors\n            wv_dim: dimension of word vectors\n\n            unk_init: default to random initialization for unknown word vectors;\n                otherwise set to zero\n        \"\"\"\n        self.unk_init = unk_init\n        wv_dict, wv_arr, self.wv_size = load_word_vectors(wv_dir, wv_type, wv_dim)\n        self.set_vectors(wv_dict, wv_arr)\n\n    def set_vectors(self, wv_dict, wv_arr):\n        self.vectors = torch.Tensor(len(self), self.wv_size)\n        self.vectors.normal_(0, 1) if self.unk_init == 'random' else self.vectors.zero_()\n        for i, token in enumerate(self.itos):\n            wv_index = wv_dict.get(token, None)\n            if wv_index is not None:\n                self.vectors[i] = wv_arr[wv_index]\n", "path": "torchtext/vocab.py"}]}