0Pricing
NLP Academy · Lektion

Die Pipeline anpassen

Komponenten hinzufügen, deaktivieren und neu anordnen

Die Pipeline anpassen ist eine kostenlose NLP Academy-Lektion auf CoddyKit. Dies ist Lektion 4 von 4. Du kannst die komplette Lektion unten kostenlos lesen – dann übst du sie direkt im Browser mit einem integrierten Code-Editor und einem KI-Tutor rund um die Uhr. Sie ist Teil des NLP Academy-Lernpfads, und dein Fortschritt wird über Web und CoddyKit-App synchronisiert. Der NLP Academy-Kurs umfasst insgesamt 4 Lektionen.

Teile dieser Lektion wurden noch nicht übersetzt und werden auf Englisch angezeigt.

A Stack of Steps

A spaCy pipeline is just an ordered list of components. Text flows through each one, gaining tags, parses, and entities along the way.

See What Is Loaded

Check the active steps with nlp.pipe_names. It lists every component in order, so you always know what is running.

print(nlp.pipe_names)

Disable for Speed

Skip work you do not need with disable. Turning off the parser when you only want entities makes processing noticeably faster.

nlp = spacy.load("en_core_web_sm", disable=["parser"])

Disable Temporarily

For a quick run, use select_pipes as a context manager. It switches components off, then restores them when the block ends.

with nlp.select_pipes(disable=["ner"]):
    doc = nlp(text)

Add Your Own Step

You extend the pipeline with add_pipe. spaCy ships ready-made components like sentencizer that you can drop right in.

nlp.add_pipe("sentencizer")

Control the Order

Position matters. With first or before, you place a component exactly where it needs to run in the sequence.

nlp.add_pipe("sentencizer", first=True)

Write a Custom Component

You can register your own logic as a component. A simple function takes a Doc, tweaks it, and returns it for the next step.

@spacy.Language.component("my_step")
def my_step(doc):
    return doc

Plug It In

Once registered, add your component by name. From then on it runs automatically every time you call nlp().

nlp.add_pipe("my_step", last=True)

Remove a Step

Changed your mind? remove_pipe takes a component out cleanly, leaving the rest of the pipeline untouched.

nlp.remove_pipe("my_step")

Reorder Components

You can shuffle steps later too. Combining remove and add lets you reorder the pipeline until the flow is exactly right.

Why It All Matters

Customizing the pipeline keeps spaCy lean and tailored. You run only what your task needs, plus any logic unique to your domain.

Quick Check

How do you add a component to a spaCy pipeline?

Recap

You inspect steps with pipe_names, drop work with disable, and shape the flow using add_pipe and remove_pipe. The pipeline bends to fit your task. 🛠️

Häufig gestellte Fragen

Ist die Lektion „Die Pipeline anpassen“ kostenlos?

Ja — der vollständige Text von „Die Pipeline anpassen“ ist hier im Web kostenlos zu lesen. Um sie interaktiv zu üben (integrierter Code-Editor und 24/7 KI-Tutor) und den Rest des NLP Academy-Kurses freizuschalten, upgrade auf CoddyKit PRO. Der NLP Academy-Kurs umfasst insgesamt 4 Lektionen.

Was lerne ich in „Die Pipeline anpassen“?

Komponenten hinzufügen, deaktivieren und neu anordnen Du übst NLP Academy mit praktischem Code, den du direkt im Browser ausführst, und ein 24/7 KI-Tutor beantwortet deine Fragen während du die Lektion bearbeitest.

Brauche ich Erfahrung, um NLP Academy zu starten?

Keine Vorkenntnisse erforderlich. NLP Academy auf CoddyKit ist für Anfänger bis fortgeschrittene Lernende strukturiert, sodass du hier starten oder von Anfang an beginnen und in deinem eigenen Tempo voranschreiten kannst. Dies ist Lektion 4 von 4.

Wie lange dauert die Lektion „Die Pipeline anpassen“?

Die meisten CoddyKit-Lektionen dauern etwa 5–10 Minuten. Jede ist kompakt und interaktiv, sodass du stetig Fortschritte machst und genau dort weitermachst, wo du aufgehört hast – im Web und in der App.

Kann ich in dieser NLP Academy-Lektion Code schreiben und ausführen?

Ja. Jede NLP Academy-Lektion enthält einen integrierten Code-Editor, sodass du echten Code direkt in deinem Browser schreibst und ausführst und sofort KI-Feedback erhältst — ohne lokale Einrichtung erforderlich.

Alle Lektionen in diesem Kurs

  1. Warum spaCy für reale Projekte geeignet ist
  2. Ein Modell laden und ein Doc verarbeiten
  3. Tokens, Spans und Doc-Objekte
  4. Die Pipeline anpassen
← Zurück zu NLP Academy