def collect_keyword (sent, ranks, stopwords):
for w in sent:<EOL><INDENT>if (w.word_id > <NUM_LIT:0>) and (w.root in ranks) and (w.pos[<NUM_LIT:0>] in "<STR_LIT>") and (w.root not in stopwords):<EOL><INDENT>rl = RankedLexeme(text=w.raw.lower(), rank=ranks[w.root]/<NUM_LIT>, ids=[w.word_id], pos=w.pos.lower(), count=<NUM_LIT:1>)<EOL>if DEBUG:<EOL><INDENT>print(rl)<EOL><DEDENT>yield rl<EOL><DEDENT><DEDENT>
iterator for collecting the single-word keyphrases