Relative Content

Tag Archive for pythonnlpnltkperceptronrailway

How do I install the nltk library’s “averaged_perceptron_tagger” on railway server?

Hi I am building an API with django REST Framework for generating a PowerPoint slide using python pptx package. I’m also using NLTK(Natural Language Toolkit) library to process text by tokenizing and tagging the tokens, it then returns the noun and determiner if they are present in the text. It also checks if the text tokens are >= 50 characters. If they are, it splits the text from where the word Slide occurs returns the noun and determiner as a value in a dictionary with the key being title. When I make a post request to the API endpoint, I got this error while testing on Postman:
{
“error”:”n**********************************************************************n Resource [93maveraged_perceptron_tagger[0m not found.n Please use the NLTK Downloader to obtain the resource:nn [31m>>> import nltkn >>> nltk.download(‘averaged_perceptron_tagger’)n [0mn For more information see: https://www.nltk.org/data.htmlnn Attempted to load [93mtaggers/averaged_perceptron_tagger/averaged_perceptron_tagger.pickle[0mnn Searched in:n – ‘C:\Users\eugen/nltk_data’n – ‘C:\Users\eugen\Documents\backend\Authentication\venv\nltk_data’n – ‘C:\Users\eugen\Documents\backend\Authentication\venv\share\nltk_data’n – ‘C:\Users\eugen\Documents\backend\Authentication\venv\lib\nltk_data’n – ‘C:\Users\eugen\AppData\Roaming\nltk_data’n – ‘C:\nltk_data’n – ‘D:\nltk_data’n – ‘E:\nltk_data’n**********************************************************************n”
}