Closed schlies closed 5 years ago
Ah, sorry about that β the Datacamp course is currently in soft launch (so you were among the very first people to take it!) and already uses the very new version of spaCy, which will be released as a stable version very soon and includes a lot of improvements β including string labels for spans.
Solution 1 using the current version: Look up the span label in the StringStore
first to get its integer ID.
label = nlp.vocab.strings["PERSON"]
span = Span(doc, 2, 4, label=label)
Solution 2: Uninstall spaCy and install the latest alpha version using pip install spacy-nightly
.
Thanks Ines. I like David Bowie too ;)
Dictated via iPhone
On Feb 20, 2019, at 6:55 PM, Ines Montani notifications@github.com wrote:
Ah, sorry about that β the Datacamp course is currently in soft launch (so you were one of the first people to take it!) and already uses the very new version of spaCy, which will be released as a stable version very soon and includes a lot of improvements β including string labels for spans.
Solution 1 using the current version: Look up the span label in the StringStore first to get its integer ID.
label = nlp.vocab.strings["PERSON"] span = Span(doc, 2, 4, label=label) Solution 2: Uninstall spaCy and install the latest alpha version using pip install spacy-nightly.
β You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Hello Ines, I am going through your Datacamp course. The following code worked within the Datacamp site, but it didn't work when I directly copied and pasted it into my local environment. Why isn't it working? Thank you!
How to reproduce the behaviour
Your Environment