FAQ: Getting Started with Natural Language Processing - Parsing Text

This community-built FAQ covers the “Parsing Text” exercise from the lesson “Getting Started with Natural Language Processing”.

Paths and Courses
This exercise can be found in the following Codecademy content:

Natural Language Processing

FAQs on the exercise Parsing Text

There are currently no frequently asked questions associated with this exercise – that’s where you come in! You can contribute to this section by offering your own questions, answers, or clarifications on this exercise. Ask or answer a question by clicking reply (reply) below.

If you’ve had an “aha” moment about the concepts, formatting, syntax, or anything else with this exercise, consider sharing those insights! Teaching others and answering their questions is one of the best ways to learn and stay sharp.

Join the Discussion. Help a fellow learner on their journey.

Ask or answer a question about this exercise by clicking reply (reply) below!

Agree with a comment or answer? Like (like) to up-vote the contribution!

Need broader help or resources? Head here.

Looking for motivation to keep learning? Join our wider discussions.

Learn more about how to use this guide.

Found a bug? Report it!

Have a question about your account or billing? Reach out to our customer support team!

None of the above? Find out where to ask other questions here!

Linguistics major here, with limited NLP/Python experience. The trees generated by spaCy look nothing like what I was exposed to in any linguistics training (assuming a generative model as articulated in Andrew Carnie’s Syntax text), nor are they particularly clear in terms of hierarchy. Is this really the state of the art for computerized syntax modeling?

2 Likes

I know it’s been more than a year, but I would love for you to explain more about the modeling differences you’re discussing. I have superficial knowledge of linguistics and had a similar, though more poorly articulated, thought while engaging with this exercise.

1 Like

Hey there, I’m also coming from a linguistics background, so I completely appreciate the confusion. I’m hoping we can clarify this a bit more soon, but here’s the general idea: as linguists, we learn consituency parsing, while the tree depicted in this exercise is based on dependency parsing. Both styles can be useful for computational language modeling, but dependency parsing makes it easier to work with languages that have less-strict word order. Hope this helps a bit!

cc @dev9785014746

Where is the package squids? (from squids import squids_text) is a python code line. Running is successful in CodeAcademy, but fails when I copy, paste and run code in PyCharm. Thanks.

Great question, @ernieclevenger732177 !

The squids_text variable is imported from squid.py, a file that you can find in the exercise’s file directory to the top right of the code editor:

folder icon of file directory

open directory with squids.py file name highlighted

the squids.py file open displaying the squids_text string

Hope that helps :smile:

1 Like