Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue on page /05-Text-Analysis/13-POS-Keywords.html #28

Open
adamlporter opened this issue Oct 13, 2022 · 0 comments
Open

Issue on page /05-Text-Analysis/13-POS-Keywords.html #28

adamlporter opened this issue Oct 13, 2022 · 0 comments

Comments

@adamlporter
Copy link

The sample sentence is:

sample = """She “has thrown her magical spell around the most abstract of Sciences."""

but the output from the code snippet

for token in document:
    if token.pos_ == "NOUN":
        print(token, token.pos_)

is supposed to produce the following:

spell NOUN
force NOUN
intellects NOUN
country NOUN

This is not possible with the given sample. When I run the code snippet, I get

spell NOUN
abstract NOUN

which also matches what displacy presents (that is, two nouns) on the page of the book.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant