I figured out the adj question. We were indeed being led astray by the similarity between “adj” and “adv”. We should have been looking at the simlilarity between “adv” and “v”. When we use a regular expression like (adj|v). on the string “quickly, adv.”, we see that the string does contain “v.”. However, the string does not contain ” v.”
3 Comments to “Adjectives and Adverbs”
Archives
- ►2009 (81)
- ►December (5)
- ►November (14)
- Homework 11 solution
- Notes for Nov. 19th
- Notes for Nov. 17th
- Homework 10 Solution
- Homework 11 - Part of speech tagging
- language identification
- Notes for Nov. 12th
- Homework 10 clarifications
- Notes for Nov. 10th
- Homework 10 - Advanced function usage
- Notes for Nov. 5th
- Final project topics due this Friday
- Notes for Nov. 3rd
- Homework 9 Solution
- ►October (26)
- Homework 9 tips and correction
- Notes for Oct. 29
- Homework 8 solution
- Notes for October 27th
- Homework 9 - Finding novel words
- Slides from Oct. 22nd
- Notes for Oct 22nd
- Class cancelled Oct. 20th
- Homework 7 solution
- Homework 8 - More with python scripts, regular expressions, and tokenization
- Slides from Oct. 15th
- A note on homework 7
- Notes on normalization and tokenization
- Slides from Oct. 13th
- Notes for Oct. 13th
- Homework 6 solutions
- Homework 7 - Accepting command line arguments and options, and manipulating and formatting text with python
- Slides from Oct. 8th
- Notes for Oct. 8th
- Slides for Oct. 6th
- Notes for Oct. 6th
- Homework 5 solution - Using the NLTK to investigate corpora and word frequency
- Homework 6 - Writing python functions and investigating semantic relations with the NLTK
- Slides from Oct. 1
- Syllabus change and complete notes
- Notes for Oct. 1st
- ►September (27)
- Slides for Sep. 29th
- Notes for Sep 29th
- Homework 4 solutions - More regular expressions, Python lists and word frequency
- Homework 5 - Using the NLTK to investigate corpora and word frequency
- Slides from Sep 24th
- Slides for Sep. 22nd
- Homework 3 solution
- Python, cygwin, and matplotlib problems on Windows
- Homework 4 - More regular expressions, Python lists and word frequency
- Slides on python lists and word frequency
- Notes for Sep. 17th
- Slides from Sep. 15th
- Adjectives and Adverbs
- Course evaluation
- Useful .rc files
- Homework 2 solution - More UNIX basics and regular expressions
- Homework 3 questions
- Schedule change
- Notes for Sep. 10th
- Slides from Sep. 8th
- Homework assignment 1 - Unix Basics - Solution
- Sep 8th notes on unix
- Sort on Linux vs. BSD (Mac)
- Homework 2 - More UNIX basics and regular expressions
- Slides from Sep 3rd.
- Notes for Sep. 3rd
- Slides for Sep 1st.
- ►August (9)
- ►2009 (81)
Categories
- ▶homework (26)
- A note on homework 7
- Final project topics due this Friday
- Homework 10 - Advanced function usage
- Homework 10 clarifications
- Homework 10 Solution
- Homework 11 - Part of speech tagging
- Homework 11 solution
- Homework 2 - More UNIX basics and regular expressions
- Homework 2 solution - More UNIX basics and regular expressions
- Homework 3 questions
- Homework 3 solution
- Homework 4 - More regular expressions, Python lists and word frequency
- Homework 4 solutions - More regular expressions, Python lists and word frequency
- Homework 5 - Using the NLTK to investigate corpora and word frequency
- Homework 5 solution - Using the NLTK to investigate corpora and word frequency
- Homework 6 - Writing python functions and investigating semantic relations with the NLTK
- Homework 6 solutions
- Homework 7 - Accepting command line arguments and options, and manipulating and formatting text with python
- Homework 7 solution
- Homework 8 - More with python scripts, regular expressions, and tokenization
- Homework 8 solution
- Homework 9 - Finding novel words
- Homework 9 Solution
- Homework assignment 1 - Unix Basics
- Homework assignment 1 - Unix Basics - Solution
- Sort on Linux vs. BSD (Mac)
- ▶News (16)
- Adjectives and Adverbs
- Class cancelled Oct. 20th
- Course evaluation
- Final grades / happy holidays
- Final presentation schedule
- Homework 9 tips and correction
- language identification
- Notes for Oct. 1st
- Python, cygwin, and matplotlib problems on Windows
- Schedule change
- Schedule change
- Sort on Linux vs. BSD (Mac)
- Syllabus change and complete notes
- UNIX textbook online
- Useful .rc files
- Welcome to Ling 5200
- ▶notes (23)
- Introduction notes
- Notes for August 27th
- Notes for Dec. 1st
- Notes for Nov. 10th
- Notes for Nov. 12th
- Notes for Nov. 17th
- Notes for Nov. 19th
- Notes for Nov. 3rd
- Notes for Nov. 5th
- Notes for Oct 22nd
- Notes for Oct. 13th
- Notes for Oct. 1st
- Notes for Oct. 29
- Notes for Oct. 6th
- Notes for Oct. 8th
- Notes for October 27th
- Notes for Sep 29th
- Notes for Sep. 10th
- Notes for Sep. 17th
- Notes for Sep. 1st
- Notes for Sep. 3rd
- Notes on normalization and tokenization
- Sep 8th notes on unix
- ▶slides (16)
- Slides for Oct. 6th
- Slides for Sep 1st.
- Slides for Sep. 22nd
- Slides for Sep. 29th
- slides from Aug. 25th
- Slides from Aug. 27th
- Slides from Oct. 1
- Slides from Oct. 13th
- Slides from Oct. 15th
- Slides from Oct. 22nd
- Slides from Oct. 8th
- Slides from Sep 24th
- Slides from Sep 3rd.
- Slides from Sep. 15th
- Slides from Sep. 8th
- Slides on python lists and word frequency
- ▶Uncategorized (2)
- ▶homework (26)
Did you mean to say: the string does contain “v”. However the string does not contain “adj.”?
No. I meant what I said. Another example:
echo "quickly, adv." | grep -E '(adj|n|v)\.'
This matches, which might lead you to believe that that the presence of adj in your regular expression is the reason. However, it is the presence of v
Compare with:
echo "quickly, adv." | grep -E ' (adj|n|v)\.'
This does not match, because we are looking for a space followed by either adj., n., or v.. The space is necessary.
ah, I didn’t see the space in the last ” v.”