MU Structure of Programming Languages Named Entity Recognition Exam Practice

User Generated

Wnfzvar176

Programming

Marymount University

Description

  1. Use given script to download 1 Wikipedia page (not Marymount)
  2. Run NLTK’s NER tool.
  3. Examine both the PERSON and LOCATION Entities
  4. Calculate Precision, Recall, and F-Measure for both Person or Location (whichever your document has)

pip install pymediawiki

To Harvest WIKI

from mediawiki import MediaWiki
wikipedia = MediaWiki()

p = wikipedia.page('Marymount University')
content= p.content
print(content)




To Tag Named Entities
1) Word Tokenize a Sentence
2) POS tag the tokens
3) print(nltk.ne_chunk(tagged))


Unformatted Attachment Preview

1. Use given script to download 1 Wikipedia page (not Marymount) 2. Run NLTK’s NER tool. 3. Examine both the PERSON and LOCATION Entities 4. Calculate Precision, Recall, and F-Measure for both Person or Location (whichever your document has) pip install pymediawiki To Harvest WIKI from mediawiki import MediaWiki wikipedia = MediaWiki() p = wikipedia.page('Marymount University') content= p.content print(content) To Tag Named Entities 1) Word Tokenize a Sentence 2) POS tag the tokens 3) print(nltk.ne_chunk(tagged))
Purchase answer to see full attachment
User generated content is uploaded by users for the purposes of learning and should be used following Studypool's honor code & terms of service.

Explanation & Answer

At...

Related Tags