After completing this assignment, learners should be able to:
Follow the next steps to complete the assignment:
Note that the JavaScript extension for NLP is adopted from the work of Ken Kahn.
If the assignment file (NLP.xml) is imported successfully, the tasks and other information will be shown (as shown in the screenshot below). If not, try to import it again.
The assignment consists of seven different tasks. Each task is carefully designed to faciliate learning the key idea of word embedding, where the former one inspires the next one. Typically, learners with the basic block-programming knowledge can complete within 1 hour. The task list given in the assignment:
Task 1. Being familiar with Snap!
Task 2-1. Generate a vector for "cat" and visualize it
Task 2-2. Calculate the distance from "dog" to "cat"
Task 2-3. Find the closest word to "cat"
Task 2-4. Find the five closest words to "cat"
Task 2-5. Use the word embedding method to answer which of the following words is closer to “Mouse”
Task 2-6. Modify the program to calculate the distance between “man” and “king”
Task 2-7. Use the word embedding method to compare the relationships between word groups.
The list of all the related files for the assignment, including the supporting materials:
NLP.xml - Assignment File including all the tasks and the external libary.
Worksheet.pdf - PDF version of the assignment and the requirement on each task.
Blocks Function Reference Manual.pdf - Function description on the key blocks used in the assignment.
Snap! Reference Manual.pdf - Official Snap! reference manual.
Teachers could use the reference answers to assess the submitted assignment from learners.