natural language processing
Download
Skip this Video
Download Presentation
Natural Language Processing

Loading in 2 Seconds...

play fullscreen
1 / 52

Natural Language Processing - PowerPoint PPT Presentation


  • 208 Views
  • Uploaded on

Natural Language Processing. Why “natural language”?. Natural vs. artificial Language vs. English. Why “natural language”?. Natural vs. artificial Not precise, ambiguous, wide range of expression Language vs. English English, French, Japanese, Spanish. Why “natural language”?.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Natural Language Processing' - cera


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
why natural language
Why “natural language”?
  • Natural vs. artificial
  • Language vs. English
why natural language3
Why “natural language”?
  • Natural vs. artificial
      • Not precise, ambiguous, wide range of expression
  • Language vs. English
      • English, French, Japanese, Spanish
why natural language4
Why “natural language”?
  • Natural vs. artificial
      • Not precise, ambiguous, wide range of expression
  • Language vs. English
      • English, French, Japanese, Spanish
  • Natural language processing = programs, theories towards understanding a problem or question in natural language and answering it
approaches
Approaches
  • System building
      • Interactive
      • Understanding only
      • Generation only
  • Theoretical
      • Draws on linguistics, psychology, philosophy
slide6
Building an NL system is hard
  • Unlikely to be possible without solid theoretical underpinnings
natural language is useful
Natural language is useful
  • Question-answering systems
      • http://tangra.si.umich.edu/clair/NSIR/NSIR.cgi
  • Mixed initiative systems
      • http://www.cs.columbia.edu/~noemie/match.mpg
  • Information extraction
      • http://nlp.cs.nyu.edu/info-extr/biomedical-snapshot.jpg
  • Systems that write/speak
      • http://www-2.cs.cmu.edu/~awb/synthesizers.html
      • MAGIC
  • Machine translation
      • http://world.altavista.com/babelfish
topics
Topics
  • Syntax
  • Semantics
  • Pragmatics
  • Statistical NLP: combining learning and NL processing
goal of interpretation
Goal of Interpretation
  • Identify sentence meaning
  • Do something with meaning
      • Need some representation of action/meaning
analysis of form syntax
Analysis of form: Syntax
  • Which parts were damaged by larger machines?
  • Which parts damaged larger machines?
  • Which larger machines damaged parts?
  • Approaches:
      • Statistical part of speech tagging
      • Parsing using a grammar
      • Shallow parsing: identify meaningful chunks
which parts were damaged by larger machines
Which parts were damaged by larger machines?

S (Q)

VP

NP

N

NP (Q)

ADJ

V (past)

machines

damage

Det (Q)

N

larger

parts

which

which parts were damaged by machines with functional roles
Which parts were damaged by machines? – with functional roles

S (Q)

VP

NP (SUBJ)

ADJ

N

NP (Q) (OBJ)

V (past)

damage

Det (Q)

N

larger

machines

parts

which

which parts damaged machines with functional roles
Which parts damaged machines? – with functional roles

NP (Q) (SUBJ)

Det (Q)

N

which

S (Q)

VP

NP (OBJ)

V (past)

N

ADJ

parts

damage

larger

machines

parsers
Parsers
  • Grammar
      • S -> NP VP
      • NP -> DET {ADJ*} N
  • Different types of grammars
      • Context Free vs. Context Sensitive
      • Lexical Functional Grammar vs. Tree Adjoining Grammars
  • Different ways of acquiring grammars
      • Hand-encoded vs. machine learned
      • Domain independent (TreeBank, Wall Street Journal)
      • Domain dependent (Medical texts)
semantics analysis of meaning
Semantics: analysis of meaning
  • Word meaning
      • John picked up a bad cold
      • John picked up a large rock.
      • John picked up Radio Netherlands on his radio.
      • John picked up a hitchhiker on Highway 66.
  • Phrasal meaning
      • Baby bonuses -> allocations
      • Senior citizens -> personnes agees
      • Causing havoc -> seme le dessaroi
  • Approaches
      • Representing meaning
      • Statistical word disambiguation
      • Symbolic rule-based vs. shallow statistical semantics
omega
OMEGA
  • http://omega.isi.edu:8007/index
  • http://omega.is.edu/doc/browsers.html
statistical word sense disambiguation
Statistical Word Sense Disambiguation

Context within the sentence determines which sense is correct

  • The candidate picked up [sense6] thousands of additional votes.
  • He picked up [sense2] the book and started to read.
  • Her performance in school picked up [sense13].
  • The swimmers got out of the river and climbed the bank [sloping land] to retrieve their towels.
  • The investors took their money out of the bank [financial institution] and moved it into stocks and bonds.
slide21
Goal
  • A program which can predict which sense is the correct sense given a new sentence containing “pick up” or “bank”
  • Avoid manually itemizing all words which can occur in sentences with different meanings
  • Can we use machine learning?
what do we need
What do we need?
  • Data
  • Features
  • Machine Learning algorithm
      • Decision tree vs. SVM/Naïve Bayes
      • Inspecting the output
  • Accuracy of these methods
predicting the correct sense in unseen text
Predicting the correct sense in unseen text
  • Use presence of the salient words in context
  • 50 word window
  • Use Baye’s rule to compute probabilities for different categories
crane
“Crane”
  • Occurred 74 times in Grolliers, 36 as animal, 38 as machine
  • Prediction in new sentences were 99% correct
  • Example: lift water and to grind grain .PP Treadmills attached to cranes were used to lift heavy objects from Roman times.
going home a play in one act
Going Home – A play in one act
  • Scene 1: Pennsylvania Station, NYCBonnie: Long Beach?Passerby: Downstairs, LIRR Station
  • Scene 2: ticket counter: LIRRBonnie: Long Beach?Clerk: $4.50
  • Scene 3: Information Booth, LIRRBonnie: Long Beach?Clerk: 4:19, Track 17
  • Scene 4: On the train, vicinity of Forest HillsBonnie: Long Beach?Conductor: Change at Jamaica
  • Scene 5: On the next train, vicinity of LynbrookBonnie: Long Beach?Conductor: Rigtht after Island Park.
question answering on the web
Question Answering on the web
  • Input: English question
  • Data: documents retrieved by a search engine from the web
  • Output: The phrase(s) within the documents that answer the question
examples
Examples
  • When was X born?
    • When was Mozart born?
    • Mozart was born in 1756.
    • When was Gandhi born?
    • Gandhi (1869-1948)
  • Where are the Rocky Mountains located?
  • What is nepotism?
common approach
Common Approach
  • Create a query from the question
      • When was Mozart born -> Mozart born
      • Use WordNet to expand terms and increase recall:
        • Which high school was ranked highest in the US in 1998?
        • “high school” -> (high&school)|(senior&high&school)|(senior&high(|high|highschool
  • Use search engine to find relevant documents
  • Pinpoint passage within document that has answer using patterns
      • From IR to NLP
produce a biography of peron only these fields are relevant
PRODUCE A BIOGRAPHY OF [PERON].Only these fields are Relevant:
  • Name(s), aliases:
  • *Date of Birth or Current Age:
  • *Date of Death:
  • *Place of Birth:
  • *Place of Death:
  • Cause of Death:
  • Religion (Affiliations):
  • Known locations and dates:
  • Last known address:
  • Previous domiciles:
  • Ethnic or tribal affiliations:
  • Immediate family members
  • Native Language spoken:
  • Secondary Languages spoken:
  • Physical Characteristics
  • Passport number and country of issue:
  • Professional positions:
  • Education
  • Party or other organization affiliations:
  • Publications (titles and dates):
biography of han ming
Biography of Han Ming
  • Han Ming, born 1944 March in Pyongyan, South Korean Lei Fa Women’s University in French law, literature, a former female South Korean people, chairman of South Korea women’s groups,…Han, 62, has championed women’s rights and liberal political ideas. Han was imprisoned from 1979 to 1981 on charges of teaching pro-Communist ideas to workers, farmers and low-income women. She became the first minister of gender equality in 2001 and later served as an environment minister.
biography two approaches
Biography – two approaches
  • To obtain high precision, we handle each slot independently using bootstrapping to learn IE patterns.
  • To improve the recall, we utilize a biography Language Model.
approach
Approach
  • Characteristics of the IE approach
    • Training resource: Wikipedia and its manual annotations
    • Bootstrapping interleaves two corpora to improve precision
      • Wikipedia: reliable but small
      • Web: noisy but many relevant documents
    • No manual annotation or automatic tagging of corpus
    • Use seed tuples (person, date-of-birth) to find patterns
    • This approach is scalable for any corpus
      • Irrespective of size
      • Irrespective of whether it is static or dynamic
  • The IE system is augmented with language models to increase recall
biography as an ie task
Biography as an IE task
  • We need patterns to extract information from a sentence
  • Creating patterns manually is a time consuming task, and not scalable
  • We want to find these patterns automatically
biography patterns from wikipedia40
Biography patterns from Wikipedia
  • Martin Luther King, Jr., (January 15, 1929 – April 4, 1968) was the most …
  • Martin Luther King, Jr., was born on January 15, 1929, in Atlanta, Georgia.
run idfinder on these sentences
Run IdFinder on these sentences
  • Martin Luther King, Jr. , (January 15, 1929 April 4, 1968) was the most…
  • Martin Luther King, Jr. , was born on January 15, 1929 , in Atlanta, Georgia .
  • Take the token sequence that includes the tags of interest + some context (2 tokens before and 2 tokens after)
convert to patterns
Convert to Patterns:
  • () was the
  • , was born on , in
  • Remove more specific patterns – if there is a pattern that contains other, take the smallest > k tokens.
  • , was born on
  • ()
  • Finally, verify the patterns manually to remove irrelevant patterns.
examples of patterns
Examples of Patterns:
  • 502 distinct place-of-birth patterns:
    • 600 was born in
    • 169 ( born in )
    • 44 Born in
    • 10 was a native
    • 10 's hometown of
    • 1 was baptized in
  • 291 distinct date-of-death patterns:
    • 770 ( - )
    • 92 died on
    • 19 -
    • 16 died in on
    • 3 < MY_Person> passed away on < MY_Date >
    • 1 < MY_Person> committed suicide on
biography as an ie task44
Biography as an IE task
  • This approach is good for the consistently annotated fields in Wikipedia: place of birth, date of birth, place of death, date of death
  • Not all fields of interests are annotated, a different approach is needed to cover the rest of the slots
bouncing between wikipedia and google
Bouncing between Wikipedia and Google
  • Use one seed only:
    • and
      • Google: “Arafat” “civil engineering”, we get:
bouncing between wikipedia and google47
Bouncing between Wikipedia and Google
  • Use one seed only:
    • and
      • Google: “Arafat” “civil engineering”, we get:
        • Arafatgraduated with a bachelor’s degree in civil engineering
        • Arafatstudiedcivil engineering
        • Arafat,acivil engineering student
      • Using these snippets, corresponding patterns are created, then filtered out manually.
bouncing between wikipedia and google48
Bouncing between Wikipedia and Google
  • Use one seed tuple only:
    • and
      • Google: “Arafat” “civil engineering”, we get:
        • Arafatgraduated with a bachelor’s degree incivil engineering
        • Arafatstudiedcivil engineering
        • Arafat,acivil engineering student
      • Using these snippets, corresponding patterns are created, then filtered out manually
    • To get more seed pairs, go to Wikipedia biography pages only and search for:
        • “graduated with a bachelor’s degree in”
        • We get:
bouncing between wikipedia and google50
Bouncing between Wikipedia and Google
  • New seed tuples:
    • “Burnie Thompson” “political science“
    • “Henrey Luke” “Environment Studies”
    • “Erin Crocker” “industrial and management engineering”
    • “Denise Bode” “political science”
  • Go back to Google and repeat the process to get more seed patterns!
bouncing between wikipedia and google51
Bouncing between Wikipedia and Google
  • This approach worked well for a few fields such as: education, publication, Immediate family members, and Party or other organization affiliations
  • Did not provide good patterns for every field, such as: Religion, Ethnic or tribal affiliations, and Previous domiciles), we got a lot of noise
  • For some slots, we created some patterns manually
biography as sentence selection and ranking
Biography as Sentence Selection and Ranking
  • To obtain high recall, we also want to include sentences that IE may miss, perhaps due to ill-formed sentences (ASR and MT)
  • Get the top 100 documents from Indri
  • Extract all sentences that contain the person or reference to him/her
  • Use a variety of features to rank these sentence…
ad