I am using pycharm IDE. I dowloaded nltk using file-> settings-> Project Interpreter -> nltk. After running my code below I have received an Lookup error
My code
# My Code
def get_tags(s):
tuples = pos_tag(word_tokenize(s))
return [y for x, y in tuples]
s = 'She does look like you. Stay the way you are.'
get_tags(s)
Look up error
> LookupError:
> ********************************************************************** Resource punkt not found. Please use the NLTK Downloader to obtain
> the resource: import nltk
> >>> nltk.download('punkt')
> For more information see: https://www.nltk.org/data.html Attempted to load tokenizers/punkt/english.pickle Searched in:
> - 'C:\\Users\\VW3ZTWS/nltk_data'
> - 'C:\\Users\\VW3ZTWS\\PycharmProjects\\Data_Collection_and_learnings\\venv\\nltk_data'
> - 'C:\\Users\\VW3ZTWS\\PycharmProjects\\Data_Collection_and_learnings\\venv\\share\\nltk_data'
> - 'C:\\Users\\VW3ZTWS\\PycharmProjects\\Data_Collection_and_learnings\\venv\\lib\\nltk_data'
> - 'C:\\Users\\VW3ZTWS\\AppData\\Roaming\\nltk_data'
> - 'C:\\nltk_data'
> - 'D:\\nltk_data'
> - 'E:\\nltk_data'
> - ''
> **********************************************************************
What i tried
I googled and follow the info from link1 and Link2. But none solved my problem. Even i tried manually by downloading the Punkt tokenizer model from Link3 and save it in tokenizers folder with unzipped files and tried to run my code. But still it does not work.
Kindly support to solve this issue