LING 388: Computers and Language

Slides:



Advertisements
Similar presentations
Word Bi-grams and PoS Tags
Advertisements

School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING PoS-Tagging theory and terminology COMP3310 Natural Language Processing.
Sentence Construction and the Syntactical Tree forms Lecture 6 Feed back of mid-test.
 adj (adjectif)  adv (adverbe)  det (déterminant)  nom  prep (préposition)  pron (pronom)  verbe.
Analysing Syntax 1 Lesson 8B.
Noun. Noun - verb noun Noun - verb article- adj. - adj. - Noun - verb.
ADVERB NOTES Grade 7. A word that modifies (adds information to) a verb, adjective, or other adverb. ADVERB DEFINITION.
Clauses Notes. The Basics… A clause is a group of related words that has both a subject and a predicate. An independent clause (also a main clause) presents.
LING 388 Language and Computers Lecture 22 11/25/03 Sandiway FONG.
Matakuliah: G0922/Introduction to Linguistics Tahun: 2008 Session 11 Syntax 2.
Context Free Grammar S -> NP VP NP -> det (adj) N
You probably find many new words when you do your English activities. Don’t panic. Use a strategy to learn the new words. Avoid writing all the unknown.
CS224N Interactive Session Competitive Grammar Writing Chris Manning Sida, Rush, Ankur, Frank, Kai Sheng.
Syntax The number of words in a language is finite
ELN – Natural Language Processing Giuseppe Attardi
Categorizing and Tagging Words
Lecture 6 NLTK Tagging Topics Taggers Readings: NLTK Chapter 5 CSCE 771 Natural Language Processing.
Lecture 9 NLTK POS Tagging Part 2 Topics Taggers Rule Based Taggers Probabilistic Taggers Transformation Based Taggers - Brill Supervised learning Readings:
Module 8: Querying Full-Text Indexes. Overview Introduction to Microsoft Search Service Microsoft Search Service Components Getting Information About.
Lecture 10 NLTK POS Tagging Part 3 Topics Taggers Rule Based Taggers Probabilistic Taggers Transformation Based Taggers - Brill Supervised learning Readings:
LING 388: Language and Computers Sandiway Fong Lecture 10.
PARSING David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
Word classes and part of speech tagging Chapter 5.
Review of basic concepts.  The knowledge of sentences and their structure.  Syntactic rules include: ◦ The grammaticality of sentences ◦ Word order.
CPE 480 Natural Language Processing Lecture 4: Syntax Adapted from Owen Rambow’s slides for CSc Fall 2006.
CSA2050: Introduction to Computational Linguistics Part of Speech (POS) Tagging I Introduction Tagsets Approaches.
Natural Language Processing
Lecture 12 Classifiers Part 2 Topics Classifiers Maxent Classifiers Maximum Entropy Markov Models Information Extraction and chunking intro Readings: Chapter.
◦ Process of describing the structure of phrases and sentences Chapter 8 - Phrases and sentences: grammar1.
TRUE or FALSE? Adjectives & Adverbs= organic part of sentences, pretty much like verbs Right answer: decorative elements in a sentence.
Word classes and part of speech tagging. Slide 1 Outline Why part of speech tagging? Word classes Tag sets and problem definition Automatic approaches.
Basic Syntactic Structures of English CSCI-GA.2590 – Lecture 2B Ralph Grishman NYU.
LANGUAGE ARTS PARTS OF SPEECH NOUNS NOUN A noun is a word used to describe a  Person  Place  Animal  Thing.
Word classes and part of speech tagging Chapter 5.
The final chapter.  Constituents ◦ Natural groupings of a sentence  Morphemes ◦ Smallest meaningful units of a word  How to test whether a group of.
Parts of Speech By: Miaya Nischelle Sample. NOUN A noun is a person place or thing.
Lecture 7 NLTK POS Tagging Topics Taggers Rule Based Taggers Probabilistic Taggers Transformation Based Taggers - Brill Supervised learning Readings: Chapter.
Grammar 2 The Second Semester Adjectives Presented by Dr. Mohamed Sha’at.
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2007 Lecture5 2 August 2007.
SKILLS FOR THE 21st CENTURY
Lecture 9: Part of Speech
Name that syntactic category …
Ross Chapter p Adjectives have same inflection as nouns
Lecture 9 NLTK POS Tagging Part 2
Introduction to Machine Learning and Text Mining
Beginning Syntax Linda Thomas
Module 8: Querying Full-Text Indexes
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 6/19/2018
CSCE 590 Web Scraping – NLTK
SYNTAX.
Modern English Grammar I
Nouns Nouns not noun noun noun not not
LING/C SC/PSYC 438/538 Lecture 21 Sandiway Fong.
Text Analytics Giuseppe Attardi Università di Pisa
LING 388: Computers and Language
CSCE 590 Web Scraping - NLTK
CKY Parser 0Book 1 the 2 flight 3 through 4 Houston5 11/16/2018
LING 3820 & 6820 Natural Language Processing Harry Howard
Parts of the speech and abbreviations
Phrases.
MANNER ADVERBS VS. ADJECTIVES
Natural Language Processing
Unit 4 Lesson 6: Adjective or Adverb
CSCE 590 Web Scraping - NLTK
Phrases.
The building blocks of language!
So or such?.
LING 388: Computers and Language
Lecture 9 NLTK POS Tagging Part 2
Part-of-Speech Tagging Using Hidden Markov Models
Presentation transcript:

LING 388: Computers and Language Lecture 30

Last class today Reminder: TCE survey! submit your term project (Friday); have already received some!

nltk book: chapter 5 (Adjectives and Adverbs) (Attributive) The falling man … / (Predicative) The man is falling … Difference in meaning sometimes: Mary's really nice teacher Mary's teacher is really nice

nltk book: chapter 5 (Exploring Tagged Corpora) Words that follow 'often', using .words(): Words categories that follow 'often', using .tagged_words():

nltk book: chapter 5 (Trigram search) from nltk.corpus import brown brown.tagged_sents() [[('The', 'AT'), ('Fulton', 'NP-TL'), ('County', 'NN-TL'), ('Grand', 'JJ- TL'), ('Jury', 'NN-TL'), ('said', 'VBD'), ('Friday', 'NR'), ('an', 'AT'), ('investigation', 'NN'), ('of', 'IN'), ("Atlanta's", 'NP$'), ('recent', 'JJ'), ('primary', 'NN'), ('election', 'NN'), ('produced', 'VBD'), ('``', '``'), ('no', 'AT'), ('evidence', 'NN'), ("''", "''"), ('that', 'CS'), ('any', 'DTI'), ('irregularities', 'NNS'), ('took', 'VBD'), ('place', 'NN'), ('.', '.')], [('The', 'AT'), ('jury', 'NN'), ('further', 'RBR'), ('said', 'VBD'), ('in', 'IN'), ('term-end', 'NN'), ('presentments', 'NNS'), ('that', 'CS'), ('the', 'AT'), ('City', 'NN-TL'), ('Executive', 'JJ-TL'), ('Committee', 'NN-TL'), (',', ','), ('which', 'WDT'), ('had', 'HVD'), ('over-all', 'JJ'), ('charge', 'NN'), ('of', 'IN'), ('the', 'AT'), ('election', 'NN'), (',', ','), ('``', '``'), ('deserves', 'VBZ'), ('the', 'AT'), ('praise', 'NN'), ('and', 'CC'), ('thanks', 'NNS'), ('of', 'IN'), ('the', 'AT'), ('City', 'NN-TL'), ('of', 'IN-TL'), ('Atlanta', 'NP-TL'), ("''", "''"), ('for', 'IN'), ('the', 'AT'), ('manner', 'NN'), ('in', 'IN'), ('which', 'WDT'), ('the', 'AT'), ('election', 'NN'), ('was', 'BEDZ'), ('conducted', 'VBN'), ('.', '.')], ...]

nltk book: chapter 5 (Trigram search) >>> for ts in brown.tagged_sents(): ...     for (w1,t1), (w2,t2), (w3,t3) in nltk.trigrams(ts): ...             if t1.startswith('V') and t3.startswith('V') and t2 == 'TO': ...                     print(w1,w2,w3) ...  combined to achieve continue to place serve to protect … … help to intensify seems to overtake want to buy 4023 such fragments

nltk book: chapter 5 (tag ambiguity > 3)

nltk book: chapter 5 (tag ambiguity > 3) import nltk from nltk.corpus import brown bnt = brown.tagged_words(categories='news', tagset='universal') cfd = nltk.ConditionalFreqDist((w.lower(),tag) for (w,tag) in bnt) cfd <ConditionalFreqDist with 13112 conditions> cfd['bank'] FreqDist({'NOUN': 16}) cfd['grant'] FreqDist({'NOUN': 11, 'VERB': 4}) len(cfd['grant']) 2

nltk book: chapter 5 (tag ambiguity > 3) >>> for w in sorted(cfd.conditions()): ... if len(cfd[w]) > 3: ... print(w,cfd[w]) ... best <FreqDist with 4 samples and 31 outcomes> close <FreqDist with 4 samples and 12 outcomes> open <FreqDist with 4 samples and 33 outcomes> present <FreqDist with 4 samples and 30 outcomes> that <FreqDist with 4 samples and 829 outcomes>

nltk book: chapter 5 (tag ambiguity > 3) >>> for w in sorted(cfd.conditions()): ... if len(cfd[w]) > 3: ... print(w,cfd[w].most_common()) ... best [('ADJ', 28), ('ADV', 1), ('NOUN', 1), ('VERB', 1)] close [('ADV', 6), ('ADJ', 3), ('VERB', 2), ('NOUN', 1)] open [('ADJ', 13), ('VERB', 11), ('NOUN', 8), ('ADV', 1)] present [('ADJ', 21), ('ADV', 7), ('NOUN', 1), ('VERB', 1)] that [('ADP', 546), ('DET', 150), ('PRON', 128), ('ADV', 5)]