You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
7.0 KiB
7.0 KiB
<html>
<head>
</head>
</html>
In [1]:
!pip install -U spacy
!python -m spacy download en_core_web_sm
Defaulting to user installation because normal site-packages is not writeable
Collecting spacy
Downloading spacy-3.4.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (6.4 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 6.4/6.4 MB 15.4 MB/s eta 0:00:0000:0100:01
Collecting thinc<8.2.0,>=8.1.0
Downloading thinc-8.1.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (822 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 822.5/822.5 KB 10.2 MB/s eta 0:00:0000:01
Collecting cymem<2.1.0,>=2.0.2
Using cached cymem-2.0.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (35 kB)
Requirement already satisfied: requests<3.0.0,>=2.13.0 in /usr/lib/python3/dist-packages (from spacy) (2.25.1)
Collecting wasabi<1.1.0,>=0.9.1
Downloading wasabi-0.10.1-py3-none-any.whl (26 kB)
Requirement already satisfied: packaging>=20.0 in /home/donaldrich/.local/lib/python3.10/site-packages (from spacy) (21.3)
Collecting spacy-legacy<3.1.0,>=3.0.9
Using cached spacy_legacy-3.0.9-py2.py3-none-any.whl (20 kB)
Requirement already satisfied: jinja2 in /usr/lib/python3/dist-packages (from spacy) (3.0.3)
Collecting langcodes<4.0.0,>=3.2.0
Using cached langcodes-3.3.0-py3-none-any.whl (181 kB)
Collecting pathy>=0.3.5
Downloading pathy-0.6.2-py3-none-any.whl (42 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 42.8/42.8 KB 1.7 MB/s eta 0:00:00
Collecting murmurhash<1.1.0,>=0.28.0
Using cached murmurhash-1.0.7-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (21 kB)
Collecting tqdm<5.0.0,>=4.38.0
Downloading tqdm-4.64.0-py2.py3-none-any.whl (78 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 78.4/78.4 KB 2.7 MB/s eta 0:00:00
Collecting preshed<3.1.0,>=3.0.2
Using cached preshed-3.0.6-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl (128 kB)
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (from spacy) (59.6.0)
Collecting spacy-loggers<2.0.0,>=1.0.0
Downloading spacy_loggers-1.0.3-py3-none-any.whl (9.3 kB)
Collecting catalogue<2.1.0,>=2.0.6
Downloading catalogue-2.0.8-py3-none-any.whl (17 kB)
Requirement already satisfied: typer<0.5.0,>=0.3.0 in /home/donaldrich/.local/lib/python3.10/site-packages (from spacy) (0.4.2)
Requirement already satisfied: numpy>=1.15.0 in /usr/lib/python3/dist-packages (from spacy) (1.21.5)
Collecting srsly<3.0.0,>=2.4.3
Downloading srsly-2.4.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (460 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 460.0/460.0 KB 10.1 MB/s eta 0:00:0000:01
Requirement already satisfied: pydantic!=1.8,!=1.8.1,<1.10.0,>=1.7.4 in /home/donaldrich/.local/lib/python3.10/site-packages (from spacy) (1.9.1)
Requirement already satisfied: pyparsing!=3.0.5,>=2.0.2 in /usr/lib/python3/dist-packages (from packaging>=20.0->spacy) (2.4.7)
Collecting smart-open<6.0.0,>=5.2.1
Using cached smart_open-5.2.1-py3-none-any.whl (58 kB)
Requirement already satisfied: typing-extensions>=3.7.4.3 in /home/donaldrich/.local/lib/python3.10/site-packages (from pydantic!=1.8,!=1.8.1,<1.10.0,>=1.7.4->spacy) (4.3.0)
Collecting blis<0.8.0,>=0.7.8
Downloading blis-0.7.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (10.2 MB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 10.2/10.2 MB 19.8 MB/s eta 0:00:0000:010:01
Requirement already satisfied: click<9.0.0,>=7.1.1 in /usr/lib/python3/dist-packages (from typer<0.5.0,>=0.3.0->spacy) (8.0.3)
Installing collected packages: wasabi, murmurhash, cymem, tqdm, spacy-loggers, spacy-legacy, smart-open, preshed, langcodes, catalogue, blis, srsly, pathy, thinc, spacy
Successfully installed blis-0.7.8 catalogue-2.0.8 cymem-2.0.6 langcodes-3.3.0 murmurhash-1.0.7 pathy-0.6.2 preshed-3.0.6 smart-open-5.2.1 spacy-3.4.1 spacy-legacy-3.0.9 spacy-loggers-1.0.3 srsly-2.4.4 thinc-8.1.0 tqdm-4.64.0 wasabi-0.10.1
zsh:1: command not found: python
In [ ]:
import spacy
from spacy import displacy
text = "When Sebastian Thrun started working on self-driving cars at Google in 2007, few people outside of the company took him seriously."
nlp = spacy.load("en_core_web_sm")
doc = nlp(text)
displacy.serve(doc, style="ent")
In [ ]: