Get a pipeline component for a given component name. name (str): Name of pipeline component to get. RETURNS (callable): The pipeline component. DOCS: https://spacy.io/api/language#get_pipe
(self, name: str)
| 641 | return analysis |
| 642 | |
| 643 | def get_pipe(self, name: str) -> PipeCallable: |
| 644 | """Get a pipeline component for a given component name. |
| 645 | |
| 646 | name (str): Name of pipeline component to get. |
| 647 | RETURNS (callable): The pipeline component. |
| 648 | |
| 649 | DOCS: https://spacy.io/api/language#get_pipe |
| 650 | """ |
| 651 | for pipe_name, component in self._components: |
| 652 | if pipe_name == name: |
| 653 | return component |
| 654 | raise KeyError(Errors.E001.format(name=name, opts=self.component_names)) |
| 655 | |
| 656 | def create_pipe( |
| 657 | self, |
no outgoing calls