Skip to content

Latest commit

 

History

History
50 lines (31 loc) · 2.16 KB

http-homework-python.md

File metadata and controls

50 lines (31 loc) · 2.16 KB

HTTP Trigger Homework: create a NLP Application

Goal 🎯

The goal of this homework assignment is for you to use the knowledge gained in the HTTP Trigger lesson and get hands-on.

Assignment

For this assignment we will create a Serverless Function which removes the English list of stopwords from a given text. The code for the stop words remove function will be provided for you here. We also uploaded a test data sample file that you can use to test your Serverless Function.

Let's begin!

  1. For the sake of this tutorial, we’re going to install the Natural Language Processing library nltk. Create new Function project and run:

    pip install nltk
    pip install numpy
  2. Move nlp_text_processing.py to your new function directory.

  3. Import nlp_text_processing.py in your Serverless Function. You can call the relevant functions using:

    processed_text = remove_stop_words(text)
    tokens = tokenize_text(processed_text)
    entities = get_entities(tokens)
  4. Adjust the Serverless Function so it returns processed_text, tokens and entities as a response.

  5. Start the function, go to Postman and make the following POST request using the data_sample file as input:

Postman

Test if your function works as expected.

Resources

Share

Please share you solutions on LinkedIn and Twitter using the #AzFuncUni hashtag and mention us. We would love to see it!


🔼 Lessons Index | Deployment (Optional) ▶