Help needed for Natural Language Processing, Please!

I have just completed part 2. Text Preprocessing from the following exercise:
https://www.codecademy.com/courses/natural-language-processing/lessons/getting-started-with-nlp/exercises/text-preprocessing

The script.py runs fine in the codecademy site, but when I try and replicate it in Atom, I am unable to access the ‘part of speech’ module.

I managed to download the following successfully:
import re
import nltk
from nltk.tokenize import word_tokenize
from nltk.stem import PorterStemmer
from nltk.stem import WordNetLemmatizer

But, running the line: ‘from part_of_speech import get_part_of_speech’ results in - ModuleNotFoundError: No module named ‘part_of_speech’.

I am unsure what to do to rectify this. Any help would be greatly appreciated, thanks!

Hi @brucegilchrist,

The files associated with the exercise include one named part_of_speech.py.

Have you copied that file and placed it in the same folder or directory as your script.py file? Alternatively, you could integrate the code from that file into your script.py file.

1 Like

Excellent, Glen, thanks. Got it!

Bruce

1 Like

Hi there, where on the site so we find files associated with the exercises, i cant source part_of_speech.py?

thanks

Hello, @digital1853582835, and welcome to the Codecademy Forums!

Click the folder icon in the upper-left corner of the editing pane, and you will see a list of files. Then click the name of the file to see its contents in the editor.

FolderIcon