Uploaded by Sam Slater

1.6 Peer-Graded

advertisement
1.6 Peer Graded Assignment
In understanding ​decomposition​, the sub-problems for this task can be listed as follows:
●
●
●
●
●
●
●
Clarify the keyword and its spelling
List all synonyms of the keyword (Thesaurus)
Transfer corpus to a database
Clarify which synonyms (if any) can have dual meaning
Learn alternate or archaic spellings if the are historical documents in the corpus
Develop program to detect words
Archive pages or phrases with the keyword
The two subproblems are finding the synonyms in the thesaurus and finding the
occurrences in the corpus.
Using ​pattern recognition​ it can be understood—depending on the keyword—that a computer
program may not need to test every letter of the keyword. If the word uses a unusual
combination of letters or has very few vowels, the computer program may only need to test the
first few letters to determine that a word is indeed the keyword. For example if the keyword is
Chrononhotonthologos (which has no synonyms because it is a proper noun and is unique
because it is long but has only one vowel) a computer program may only need to test the first
seven or eight letters perhaps, to confirm it is the keyword. Similarly if the keyword were
Chrononhotonthologos, the algorithm could indicate that only twenty-letter long words starting
with “C” would be tested
Given the keyword and its synonyms, there is a repeating pattern of counting the number of
occurrences for each individual word.
In using ​data representation and abstraction ​the information needed to solve the problem can
be listed as follows:
●
●
●
●
●
Number of documents in corpus
Number of words in each corpus
List of keyword and synonyms
Number of letters for keyword
Number of letters for each synonym
Algorithm
❖ Find synonyms of keyword
❖ Keyword and synonyms:
➢ For each document in the corpus:
➢ Update number of occurrences
1.6 Peer Graded Assignment
➢ Record number of occurrences for word
Part 5:
This is a very broad application of the pillars of computational thinking. It is intended to get us
thinking about how to give a computer instructions.
Download