diff --git a/website/index.jade b/website/index.jade index 1abe5a984..79a6dd76d 100644 --- a/website/index.jade +++ b/website/index.jade @@ -54,7 +54,7 @@ include _includes/_mixins .o-content +grid +grid-col("two-thirds") - +terminal("lightning_tour.py"). + +terminal("lightning_tour.py", "More examples", "/usage/spacy-101#lightning-tour"). # Install: pip install spacy && spacy download en import spacy @@ -65,16 +65,18 @@ include _includes/_mixins text = open('war_and_peace.txt').read() doc = nlp(text) - # Hook in your own deep learning models - similarity_model = load_my_neural_network() - def install_similarity(doc): - doc.user_hooks['similarity'] = similarity_model - nlp.pipeline.append(install_similarity) + # Find named entities, phrases and concepts + for entity in doc.ents: + print(entity.text, entity.label_) + # Determine semantic similarities doc1 = nlp(u'the fries were gross') doc2 = nlp(u'worst fries ever') doc1.similarity(doc2) + # Hook in your own deep learning models + nlp.add_pipe(load_my_model(), before='parser') + +grid-col("third") +h(2) Features +list diff --git a/website/usage/_spacy-101/_lightning-tour.jade b/website/usage/_spacy-101/_lightning-tour.jade index acf423c48..9e5da35e1 100644 --- a/website/usage/_spacy-101/_lightning-tour.jade +++ b/website/usage/_spacy-101/_lightning-tour.jade @@ -2,8 +2,7 @@ p | The following examples and code snippets give you an overview of spaCy's - | functionality and its usage. If you're new to spaCy, make sure to check - | out the #[+a("/usage/spacy-101") spaCy 101 guide]. + | functionality and its usage. +h(3, "lightning-tour-models") Install models and process text