LING 388: Computers and Language

Slides:



Advertisements
Similar presentations
Programming for Linguists
Advertisements

Python 3 March 15, NLTK import nltk nltk.download()
Analysis of Algorithms
NLTK & Python Day 4 LING Computational Linguistics Harry Howard Tulane University.
String and Lists Dr. Benito Mendoza. 2 Outline What is a string String operations Traversing strings String slices What is a list Traversing a list List.
Computer Science 111 Fundamentals of Programming I Sequences: Lists.
NLTK & BASIC TEXT STATS DAY /08/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University.
Copyright © 2012 Pearson Education, Inc. Publishing as Pearson Addison-Wesley C H A P T E R 9 More About Strings.
Handling Lists F. Duveau 16/12/11 Chapter 9.2. Objectives of the session: Tools: Everything will be done with the Python interpreter in the Terminal Learning.
COMPUTATION WITH STRINGS 2 DAY 2 - 8/29/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University.
Anyone recognize this string? GACGGGCTCTGACCCCCTT CGCG List other places where you use strings regularly.
CIT 590 Intro to Programming Lecture 5 – completing lists.
NLTK & Python Day 5 LING Computational Linguistics Harry Howard Tulane University.
Lists CS303E: Elements of Computers and Programming.
COMPUTATION WITH STRINGS 1 DAY 2 - 8/27/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University.
OCR Computing GCSE © Hodder Education 2013 Slide 1 OCR GCSE Computing Python programming 8: Fun with strings.
NLTK & Python Day 6 LING Computational Linguistics Harry Howard Tulane University.
©2012 Paula Matuszek CSC 9010: Text Mining Applications Lab 3 Dr. Paula Matuszek (610)
By Austin Laudenslager AN INTRODUCTION TO PYTHON.
Mr. Fowler Computer Science 14 Feb 2011 Strings in Python.
CIT 590 Intro to Programming Lecture 4. How are assignments evaluated Pay attention to what the HW says it is trying to teach you about ‘modular programming’
COMPUTATION WITH STRINGS 3 DAY 4 - 9/03/14 LING 3820 & 6820 Natural Language Processing Harry Howard Tulane University.
Computer Science 101 Python Lists. Literals, Assignment, Comparisons, Concatenation Similar to the behavior of strings so far a = [1, 2, 3] b = range(1,
CIT 590 Intro to Programming Lecture 4. Random utilities to improve efficiency Search everything! Beyond Compare Keyboard shortcuts Not essentially but.
String and Lists Dr. José M. Reyes Álamo. 2 Outline What is a string String operations Traversing strings String slices What is a list Traversing a list.
Introduction to Automata Theory Theory of Computation Lecture 6 Tasneem Ghnaimat.
Python for NLP and the Natural Language Toolkit
String and Lists Dr. José M. Reyes Álamo.
Topic: Python Lists – Part 1
COMPSCI 107 Computer Science Fundamentals
NLTK Natural Language Processing with Python, Steven Bird, Ewan Klein, and Edward Loper, O'REILLY, 2009.
Main Points: - Working with strings. - Problem Solving.
Containers and Lists CIS 40 – Introduction to Programming in Python
CSCE 590 Web Scraping – NLTK
Computation with strings 3 Day 4 - 9/07/16
Computation with strings 1 Day 2 - 8/31/16
LING 388: Computers and Language
Lists Part 1 Taken from notes by Dr. Neil Moore & Dr. Debby Keen
LING 388: Computers and Language
Introduction to Strings
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
Computer Science 312 Haskell Lists 1.
LING 388: Computers and Language
LING 3820 & 6820 Natural Language Processing Harry Howard
Manipulating Text In today’s lesson we will look at:
LING 388: Computers and Language
LING/C SC/PSYC 438/538 Lecture 12 Sandiway Fong.
Thinking about Strings
CEV208 Computer Programming
String and Lists Dr. José M. Reyes Álamo.
Lists in Python Creating lists.
Chapter 5: Lists and Dictionaries
Programming Training Main Points: - Working with strings.
LING/C SC/PSYC 438/538 Lecture 18 Sandiway Fong.
Rosen 5th ed., §3.2 ~9 slides, ~½ lecture
Introduction to Strings
Discrete Mathematics and its Applications
LING 408/508: Computational Techniques for Linguists
CS1110 Today: collections.
CMSC201 Computer Science I for Majors Final Exam Information
CISC101 Reminders Assignment 2 due today.
Topics Basic String Operations String Slicing
Bryan Burlingame 13 March 2019
Introduction to Computer Science
Bryan Burlingame Halloween 2018
Introduction to Strings
Topics Basic String Operations String Slicing
CSE 231 Lab 6.
Topics Basic String Operations String Slicing
Statistical Machine Translation
Presentation transcript:

LING 388: Computers and Language Lecture 19

nltk book: Language Processing and Python 2   A Closer Look at Python: Texts as Lists of Words: http://www.nltk.org/book/ch01.html Assuming sent1,..,sent9 from nltk.book import *

nltk book: Language Processing and Python sent2, sent3 + for concatenation

nltk book: Language Processing and Python .append() to the end of the list (mutates the list) .append() vs .extend() to the end of the list: from stackoverflow.com

nltk book: Language Processing and Python Indexing [<index>]: Slices [<index>:<index>]: (can omit either <index>, default value)

nltk book: Language Processing and Python We know indexing works on strings (as well as lists): Repetition (*), Concatenation (+): .join() .split()

nltk book: Language Processing and Python Understanding check: Answer: Last two words by alphabetic sorting…

nltk book: Language Processing and Python 3.1   Frequency Distributions methods: .plot() .most_common() .hapaxes()

nltk book: Language Processing and Python

nltk book: Language Processing and Python specifically relevant to Moby Dick; other reported words are generic "English plumbing"

nltk book: Language Processing and Python

nltk book: Language Processing and Python Extract long words (using list comprehension):

nltk book: Language Processing and Python text5: chat corpus Pick out all the words longer than 7 characters that occur more than 7 times (using list comprehension) and sort them:

nltk book: Language Processing and Python Classes: FreqDist vs. Text

nltk book: Language Processing and Python Word length distribution (3.4 Counting Other Things)

nltk book: Language Processing and Python fdistl1.plot() fdistl1.plot(cumulative=True)