mirror of
https://github.com/explosion/spaCy.git
synced 2024-12-26 18:06:29 +03:00
Fix pipeline component schema
This commit is contained in:
parent
9fe1fa88ad
commit
931250e1f5
|
@ -233,10 +233,17 @@ class ConfigSchemaNlpComponent(BaseModel):
|
||||||
arbitrary_types_allowed = True
|
arbitrary_types_allowed = True
|
||||||
|
|
||||||
|
|
||||||
|
class ConfigSchemaPipeline(BaseModel):
|
||||||
|
__root__: Dict[str, ConfigSchemaNlpComponent]
|
||||||
|
|
||||||
|
class Config:
|
||||||
|
extra = "allow"
|
||||||
|
|
||||||
|
|
||||||
class ConfigSchemaNlp(BaseModel):
|
class ConfigSchemaNlp(BaseModel):
|
||||||
lang: StrictStr = Field(..., title="The base language to use")
|
lang: StrictStr = Field(..., title="The base language to use")
|
||||||
vectors: Optional[DirectoryPath] = Field(..., title="Path to vectors")
|
vectors: Optional[DirectoryPath] = Field(..., title="Path to vectors")
|
||||||
pipeline: Optional[Dict[str, ConfigSchemaNlpComponent]]
|
pipeline: Optional[ConfigSchemaPipeline]
|
||||||
|
|
||||||
class Config:
|
class Config:
|
||||||
extra = "forbid"
|
extra = "forbid"
|
||||||
|
|
Loading…
Reference in New Issue
Block a user