# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# # Chapter 3

import spacy
from spacy.tokens import Span, Doc
from spacy.matcher import Matcher, PhraseMatcher

nlp = spacy.load('en_core_web_sm')
print(nlp.pipe_names)


# +
# @Language.component('my_pipeline')
def my_pipeline(doc):
    print('Doc length:', len(doc))
    return doc

nlp.add_pipe(my_pipeline)
print(nlp.pipe_names)
# -





















StarcoderdataJupyterScriptsDedupFiltered