mirror of https://github.com/explosion/spaCy.git
Tidy up code comments [ci skip]
This commit is contained in:
parent
e7db07a0b9
commit
fabd3a3394
|
@ -641,16 +641,16 @@ class Language:
|
||||||
# specify the full config settings, which is not really viable.
|
# specify the full config settings, which is not really viable.
|
||||||
if pipe_meta.default_config:
|
if pipe_meta.default_config:
|
||||||
config = Config(pipe_meta.default_config).merge(config)
|
config = Config(pipe_meta.default_config).merge(config)
|
||||||
# We need to create a top-level key because Thinc doesn't allow resolving
|
|
||||||
# top-level references to registered functions. Also gives nicer errors.
|
|
||||||
# The name allows components to know their pipe name and use it in the
|
|
||||||
# losses etc. (even if multiple instances of the same factory are used)
|
|
||||||
internal_name = self.get_factory_name(factory_name)
|
internal_name = self.get_factory_name(factory_name)
|
||||||
# If the language-specific factory doesn't exist, try again with the
|
# If the language-specific factory doesn't exist, try again with the
|
||||||
# not-specific name
|
# not-specific name
|
||||||
if internal_name not in registry.factories:
|
if internal_name not in registry.factories:
|
||||||
internal_name = factory_name
|
internal_name = factory_name
|
||||||
|
# The name allows components to know their pipe name and use it in the
|
||||||
|
# losses etc. (even if multiple instances of the same factory are used)
|
||||||
config = {"nlp": self, "name": name, **config, "@factories": internal_name}
|
config = {"nlp": self, "name": name, **config, "@factories": internal_name}
|
||||||
|
# We need to create a top-level key because Thinc doesn't allow resolving
|
||||||
|
# top-level references to registered functions. Also gives nicer errors.
|
||||||
cfg = {factory_name: config}
|
cfg = {factory_name: config}
|
||||||
# We're calling the internal _fill here to avoid constructing the
|
# We're calling the internal _fill here to avoid constructing the
|
||||||
# registered functions twice
|
# registered functions twice
|
||||||
|
|
Loading…
Reference in New Issue