You are on page 1of 1

Peer-graded Assignment: Describing Algorithms Key:

KW = keyword
Start ST = search terms list
CD = corpus document
DW = document word
Add KW to ST INPUT KW cntST = count of specific search
term match in the corpus
Scan to next Thesaurus
Word

Yes
Item is null? Yes Scan to next ST Item is null? Stop

No No
Compare KW to Word Scan to next CD Set cntST to 0

Yes OUTPUT
Item is null?
ST & cntST
No
KW matches No
Word?
Scan to next CD Word

Yes
Yes
Add Word to ST Item is null?

No
Compare ST to Word

ST matches Yes
Word?
Add 1 to cntST

No

You might also like