Home-->Assignments-->Assignment-1
 | Specification | Download | Solution approach | Extensions | Submission | Solution |

A solution approach

Deadline for Assignment 1: 4:00pm Thursday 17th November 2011

The following is a list of suggested steps to go from the starting program to the solution of the assignment. Note that this is only a suggestion, it is not the only way to implement the assignment and if you have your own ideas for this please feel free to follow them. However, note that your solution should treat terms a group of independent words. Students sometimes tend to treat terms as words, applying the Levenshtein algorithm directly to terms. This is clearly not appropriate as this algorithm was designed to work on words not on terms.

Two important differences between the behaviour of the starting program and the intended solution are that if the term exists in the glossary its definition should be displayed and also that if it doesn't exist a list of alternative terms should be provided.

For the second case one possible way to go about generating alternative terms is to generate a list of alternative phrases which contain words from the glossary lexicon and then to eliminate those phrases which are not terms of the glossary. Glossary exercises j) and k) (in week 6) have already taken you up to generating a list of alternative phrases. The getSimilarPhrases method of exercise k) should generate a list of alternative phrases built from the lexicon. The next step would be to filter that list eliminating those phrases that are not terms in the glossary. Once that is done, the list of filtered phrases (the list of terms) can be displayed to the user. So after solving exercise k) (writing the getSimilarPhrases method), there's only three steps left to implement the suggested solution approach:


Last updated at 10:50am, Wednesday November 23rd 2011
Dr Natalia Beloff (N.Beloff@sussex.ac.uk)