1. Homepage
  2. Programming
  3. CS584: Natural Language Processing - Assignment 5: Dependency Parsing

CS584: Natural Language Processing - Assignment 5: Dependency Parsing

Engage in a Conversation
USStevens Institute of TechnologyCS584Natural Language ProcessingDependency ParsingNLPPython

CS584: Natural Language Processing Name CourseNana.COM

Assignment 5: Dependency Parsing CourseNana.COM

  CourseNana.COM

Homework assignments will be done individually: each student must hand in their own answers. Use of partial or entire solutions obtained from others or online is strictly prohibited. Electronic submission on Canvas is mandatory. CourseNana.COM

  CourseNana.COM

1. Transition Mechanisms (60 points) CourseNana.COM

(a) (10 pts) Given a sentence “I parsed this sentence correctly” with the transitions, complete the following table. The first three steps are provided in the table, showing the configuration of the stack and buffer, as well as the transition and the new dependency (if has) for the following steps. CourseNana.COM

  CourseNana.COM

  CourseNana.COM

Stack                             Buffer                                       New dependency             Transition CourseNana.COM

[ROOT]                         [I, parsed, this, sentence, correctly]                                     Initial Configuration CourseNana.COM

[ROOT, I]                      [parsed, this, sentence, correctly]                                        SHIFT CourseNana.COM

[ROOT, I, parsed]            [this, sentence, correctly]                                                  SHIFT CourseNana.COM

[ROOT, parsed]              [this, sentence, correctly]              parsed → I                     LEFT-ARC CourseNana.COM

  CourseNana.COM

(b) (10 pts) A sentence containing n words will be parsed in how many steps (in terms of n)? Briefly CourseNana.COM

explain in 1-2 sentences why. CourseNana.COM

(c) (20 pts) Implement the transition mechanisms, SHIFT, LEFT-ARC, and RIGHT-ARC. (Please CourseNana.COM

check the notebook for the details.) CourseNana.COM

(d) (20 pts) Implement Minibatch Dependency Parsing based on the follwoing algorithm. CourseNana.COM

  CourseNana.COM

Algorithm Minibatch Dependency Parsing CourseNana.COM

Input: sentences, a list of sentences to be parsed and model, our model that makes parse decisions CourseNana.COM

  CourseNana.COM

Initialize partial parses as a list of PartialParses, one for each sentence in sentences CourseNana.COM

Initialize unfinished parses as a shallow copy of partial parses CourseNana.COM

while unfinished parses is not empty do CourseNana.COM

Take the first batch size parses in unfinished parses as a minibatch CourseNana.COM

Use the model to predict the next transition for each partial parse in the minibatch CourseNana.COM

Perform a parse step on each partial parse in the minibatch with its predicted transition CourseNana.COM

Remove the completed (empty buffer and stack of size 1) parses from unfinished parses CourseNana.COM

end while CourseNana.COM

Return: The dependencies for each (now completed) parse in partial parses. CourseNana.COM

  CourseNana.COM

2. Neural Networks for Parsing (40 points) CourseNana.COM

(a) (20 pts) Build your neural network. (Follow the instruction in the notebook. Please NOTE that DO NOT use tf.keras.layers.Dense or tf.keras.layers.Embedding module in your code for this assignment, otherwise you will receive deductions for this problem.) CourseNana.COM

(b) (20 pts) Train the network and report the Unlabeled Attachment Score (UAS). CourseNana.COM

  CourseNana.COM

Submission Instructions You shall submit a zip file named Assignment5 LastName FirstName.zip which contains: (Those who do not follow this naming policy will receive penalty points) CourseNana.COM

• The Jupyter notebook which includes all your code and the output of each cell. CourseNana.COM

• A pdf file contains all your solutions for 1.(a) and 1.(b). CourseNana.COM

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
US代写,Stevens Institute of Technology代写,CS584代写,Natural Language Processing代写,Dependency Parsing代写,NLP代写,Python代写,US代编,Stevens Institute of Technology代编,CS584代编,Natural Language Processing代编,Dependency Parsing代编,NLP代编,Python代编,US代考,Stevens Institute of Technology代考,CS584代考,Natural Language Processing代考,Dependency Parsing代考,NLP代考,Python代考,UShelp,Stevens Institute of Technologyhelp,CS584help,Natural Language Processinghelp,Dependency Parsinghelp,NLPhelp,Pythonhelp,US作业代写,Stevens Institute of Technology作业代写,CS584作业代写,Natural Language Processing作业代写,Dependency Parsing作业代写,NLP作业代写,Python作业代写,US编程代写,Stevens Institute of Technology编程代写,CS584编程代写,Natural Language Processing编程代写,Dependency Parsing编程代写,NLP编程代写,Python编程代写,USprogramming help,Stevens Institute of Technologyprogramming help,CS584programming help,Natural Language Processingprogramming help,Dependency Parsingprogramming help,NLPprogramming help,Pythonprogramming help,USassignment help,Stevens Institute of Technologyassignment help,CS584assignment help,Natural Language Processingassignment help,Dependency Parsingassignment help,NLPassignment help,Pythonassignment help,USsolution,Stevens Institute of Technologysolution,CS584solution,Natural Language Processingsolution,Dependency Parsingsolution,NLPsolution,Pythonsolution,