NLP

NLP
Slide Note
Embed
Share

Dive into the world of Natural Language Processing (NLP) and discover how it revolutionizes communication and data analysis. Uncover the secrets behind NLP techniques, applications, and the impact on various industries. Explore the advancements in NLP technology, including sentiment analysis, machine translation, and more. Learn how NLP is shaping the future of AI and enhancing human-computer interactions. Whether you're a beginner or an expert, this comprehensive guide will deepen your understanding of NLP and its real-world implications.

  • NLP
  • Natural Language Processing
  • Communication
  • Technology
  • AI

Uploaded on Feb 15, 2025 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

You are allowed to download the files provided on this website for personal or commercial use, subject to the condition that they are used lawfully. All files are the property of their respective owners.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author.

E N D

Presentation Transcript


  1. NLP

  2. Introduction to NLP Statistical POS Tagging

  3. HMM Tagging T = argmax P(T|W) where T=t1,t2, ,tn By Bayes theorem P(T|W) = P(T)P(W|T)/P(W) Thus we are attempting to choose the sequence of tags that maximizes the right hand side of the equation P(W) can be ignored P(T) is called the prior, P(W|T) is called the likelihood.

  4. HMM Tagging Complete formula P(T)P(W|T) = P(wi|w1t1 wi-1ti-1ti)P(ti|t1 ti-2ti-1) Simplification 1: P(W|T) = P(wi|ti) Simplification 2: P(T)= P(ti|ti-1) Bigram approximation T = argmax P(T|W) = argmax P(wi|ti) P(ti|ti-1)

  5. Maximum Likelihood Estimates Transitions P(NN|JJ) = C(JJ,NN)/C(JJ)=22301/89401 = .249 Emissions P(this|DT) = C(DT,this)/C(DT)=7037/103687 = .068

  6. Evaluating Taggers Data set Training set Development set Test set Tagging accuracy how many tags right Results Baseline is very high 90% for English Trigram HMM about 95% total accuracy, 55% on unknown words Highest accuracy around 97% on PTB trained on 800,000 words (50-85% on unknown words; 50% for trigrams) Upper bound 97-98% noise (e.g., errors and inconsistencies in the data, e.g., NN vs JJ)

  7. Notes on POS New domains Lower performance New languages Morphology matters! Also availability of training data Distributional clustering Combine statistics about semantically related words Example: names of companies Example: days of the week Example: animals

  8. Notes on POS British National Corpus http://www.natcorp.ox.ac.uk/ Tagset sizes PTB 45, Brown 85, Universal 12, Twitter 25 Dealing with unknown words Look at features like twoDigitNum, allCaps, initCaps, containsDigitAndSlash (Bikel et al. 1999)

  9. Brown Clustering Words with similar vector representations are clustered together, in an agglomerative (recursive) way For example, Monday , Tuesday , etc. may form a new vector Day of the week Published by Brown et al. [1992]

  10. Example Friday Monday Thursday Wednesday Tuesday Saturday Sunday weekends Sundays people guys folks fellows CEOs chaps doubters commies unfortunates blokes down backwards ashore sideways southward northward overboard aloft downwards adrift water gas coal liquid acid sand carbon steam shale iron great big vast sudden mere sheer gigantic lifelong scant colossal American Indian European Japanese German African Catholic Israeli Italian Arab mother wife father son husband brother daughter sister boss uncle machine device controller processor CPU printer spindle subsystem compiler plotter John George James Bob Robert Paul William Jim David Mike feet miles pounds degrees inches barrels tons acres meters bytes had hadn't hath would've could've should've must've might've that tha theat head body hands eyes voice arm seat eye hair mouth

  11. Example Input: this is one document . it has two sentences but the program only cares about spaces . here is another document . it also has two sentences . and here is a third document with one sentence . this document is short . the dog ran in the park . the cat was chased by the dog . the dog chased the cat . [code by Michael Heilman: https://github.com/mheilman/tan-clustering]

  12. . the is document dog it one sentences chased two has here this cat and sentence ran in spaces another cares also only program was park but short with by a about third 1011 011 110 1110 000 101001 11111 1010111 00111 1010100 1010110 111101 1000 0010 11110010 11110011 01011 0100 10101011011 1 1010001 101010111 1010000 10101011010 1 10101011001 1 001100 01010 10101011000 1 1001 111100001 001101 111100000 10101010 11110001 9 7 4 4 3 2 2 2 2 2 2 2 2 2 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 [code by Michael Heilman]

  13. External Link Jason Eisner s awesome interactive spreadsheet about learning HMMs http://cs.jhu.edu/~jason/papers/#eisner-2002-tnlp http://cs.jhu.edu/~jason/papers/eisner.hmm.xls

  14. Introduction to NLP Transformation-Based Learning

  15. Transformation Based Learning Idea: change some labels given specific input patterns [Brill 1995] Example P(NN|sleep) = .9 P(VB|sleep) = .1 Change NN to VB when the previous tag is TO Types of rules: The preceding (following) word is tagged z The word two before (after) is tagged z One of the two preceding (following) words is tagged z One of the three preceding (following) words is tagged z The preceding word is tagged z and the following word is tagged w

  16. Transformation Based Tagger

  17. Transformation Based Tagger

  18. Unknown Words

  19. NLP

More Related Content