# Buggy code
def from_disk(self, path, disable=tuple()):
    """Loads state from a directory. Modifies the object in place and
    returns it. If the saved `Language` object contains a model, the
    model will be loaded.

    path (unicode or Path): A path to a directory. Paths may be either
        strings or `Path`-like objects.
    disable (list): Names of the pipeline components to disable.
    RETURNS (Language): The modified `Language` object.

    EXAMPLE:
        >>> from spacy.language import Language
        >>> nlp = Language().from_disk('/path/to/models')
    """
    path = util.ensure_path(path)
    deserializers = OrderedDict(
        (
            ("vocab", lambda p: self.vocab.from_disk(p)),
            ("tokenizer", lambda p: self.tokenizer.from_disk(p, vocab=False)),
            ("meta.json", lambda p: self.meta.update(util.read_json(p))),
        )
    )
    for name, proc in self.pipeline:
        if name in disable:
            continue
        if not hasattr(proc, "to_disk"):
            continue
        deserializers[name] = lambda p, proc=proc: proc.from_disk(p, vocab=False)
    exclude = {p: False for p in disable}
    if not (path / "vocab").exists():
        exclude["vocab"] = True
    util.from_disk(path, deserializers, exclude)
    self._path = path
    return self


# Traceback (ValueError)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Projects/foobar/.env/lib/python3.6/site-packages/spacy/language.py", line 333, in __call__
doc = proc(doc)
File "pipeline.pyx", line 390, in spacy.pipeline.Tagger.__call__
File "pipeline.pyx", line 402, in spacy.pipeline.Tagger.predict
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 161, in __call__
return self.predict(x)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 55, in predict
X = layer(X)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 161, in __call__
return self.predict(x)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 293, in predict
X = layer(layer.ops.flatten(seqs_in, pad=pad))
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 161, in __call__
return self.predict(x)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 55, in predict
X = layer(X)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 161, in __call__
return self.predict(x)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/neural/_classes/model.py", line 125, in predict
y, _ = self.begin_update(X)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 372, in uniqued_fwd
Y_uniq, bp_Y_uniq = layer.begin_update(X[ind], drop=drop)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 61, in begin_update
X, inc_layer_grad = layer.begin_update(X, drop=drop)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in begin_update
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in <listcomp>
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 258, in wrap
output = func(*args, **kwargs)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in begin_update
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in <listcomp>
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 258, in wrap
output = func(*args, **kwargs)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in begin_update
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in <listcomp>
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 258, in wrap
output = func(*args, **kwargs)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in begin_update
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 176, in <listcomp>
values = [fwd(X, *a, **k) for fwd in forward]
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/api.py", line 258, in wrap
output = func(*args, **kwargs)
File "/Projects/foobar/.env/lib/python3.6/site-packages/thinc/neural/_classes/static_vectors.py", line 67, in begin_update
dotted = self.ops.batch_dot(vectors, self.W)
File "ops.pyx", line 299, in thinc.neural.ops.NumpyOps.batch_dot
ValueError: shapes (4,0) and (300,128) not aligned: 0 (dim 1) != 300 (dim 0)

# Fixed code
def from_disk(self, path, disable=tuple()):
    """Loads state from a directory. Modifies the object in place and
    returns it. If the saved `Language` object contains a model, the
    model will be loaded.

    path (unicode or Path): A path to a directory. Paths may be either
        strings or `Path`-like objects.
    disable (list): Names of the pipeline components to disable.
    RETURNS (Language): The modified `Language` object.

    EXAMPLE:
        >>> from spacy.language import Language
        >>> nlp = Language().from_disk('/path/to/models')
    """
    path = util.ensure_path(path)
    deserializers = OrderedDict(
        (
            ("vocab", lambda p: self.vocab.from_disk(p)),
            ("tokenizer", lambda p: self.tokenizer.from_disk(p, vocab=False)),
            ("meta.json", lambda p: self.meta.update(util.read_json(p))),
        )
    )
    _fix_pretrained_vectors_name(self)
    for name, proc in self.pipeline:
        if name in disable:
            continue
        if not hasattr(proc, "to_disk"):
            continue
        deserializers[name] = lambda p, proc=proc: proc.from_disk(p, vocab=False)
    exclude = {p: False for p in disable}
    if not (path / "vocab").exists():
        exclude["vocab"] = True
    util.from_disk(path, deserializers, exclude)
    self._path = path
    return self