Highlights
Task:
Generating Features – 15 points
The first thing we need to do is generate features for our input. Recall that an MEMM is just a multiclass logistic regression. The sequence information is part of the feature vector, not part of the model itself, so a training example is a single word/tag pair, not an entire sentence, and we will write functions to generate features at the word level. For ease of implementation, we are using simple features, not the pairwise features shown in the lecture slides. We break down the features into two types: n-gram features and word property features. The n-gram features capture word sequence information, while the word property features capture the word’s general characteristics.
Fill in the function get ngram features(words, i). The argument words is a list of strings (words), and the argument i is an int indicating the the current word to generate features for. The function should return a list containing the following strings:
• ‘prevbigram-[x]’, where [x] is the previous word wi−1
• ‘nextbigram-[x]’, where [x] is the next word wi+1
• ‘prevskip-[x]’, where [x] is the next previous word wi−2
• ‘nextskip-[x]’, where [x] is the next next word wi+2
• ‘prevtrigram-[x]-[y]’, where [x] is wi−1 and [y] is wi−2
• ‘nexttrigram-[x]-[y]’, where [x] is wi+1 and [y] is wi+2
• ‘centertrigram-[x]-[y]’, where [x] is wi−1 and [y] is wi+1
This IT Assignment has been solved by our IT Experts at My Uni Paper. Our Assignment Writing Experts are efficient to provide a fresh solution to this question. We are serving more than 10000+ Students in Australia, UK & US by helping them to score HD in their academics.Our Experts are well trained to follow all marking rubrics & referencing style.
Be it a used or new solution, the quality of the work submitted by our assignment experts remains unhampered. You may continue to expect the same or even better quality with the used and new assignment solution files respectively. There’s one thing to be noticed that you could choose one between the two and acquire an HD either way. You could choose a new assignment solution file to get yourself an exclusive, plagiarism (with free Turnitin file), expert quality assignment or order an old solution file that was considered worthy of the highest distinction.
© Copyright 2026 My Uni Papers – Student Hustle Made Hassle Free. All rights reserved.