0% found this document useful (0 votes)
38 views1 page

Week2 Describing-Algorithms

The document describes an algorithm for adding keywords and related words from a thesaurus to a search term list to search a document corpus and count the number of matches for each search term.

Uploaded by

Moshood Adeleye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
38 views1 page

Week2 Describing-Algorithms

The document describes an algorithm for adding keywords and related words from a thesaurus to a search term list to search a document corpus and count the number of matches for each search term.

Uploaded by

Moshood Adeleye
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 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