1 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Euromasters summer school 2005 Introduction to NLTK Part II Trevor Cohn July 12, 2005.

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING Chunking: Shallow Parsing Eric Atwell, Language Research Group.
Advertisements

C O N T E X T - F R E E LANGUAGES ( use a grammar to describe a language) 1.
Sequence Classification: Chunking Shallow Processing Techniques for NLP Ling570 November 28, 2011.
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Approaches to Parsing.
Parsing with Context Free Grammars Reading: Chap 13, Jurafsky & Martin
Chunk Parsing CS1573: AI Application Development, Spring 2003 (modified from Steven Bird’s notes)
For Monday Read Chapter 23, sections 3-4 Homework –Chapter 23, exercises 1, 6, 14, 19 –Do them in order. Do NOT read ahead.
1 Earley Algorithm Chapter 13.4 October 2009 Lecture #9.
PCFG Parsing, Evaluation, & Improvements Ling 571 Deep Processing Techniques for NLP January 24, 2011.
Parsing context-free grammars Context-free grammars specify structure, not process. There are many different ways to parse input in accordance with a given.
Albert Gatt LIN3022 Natural Language Processing Lecture 8.
Parsing with CFG Ling 571 Fei Xia Week 2: 10/4-10/6/05.
1 SIMS 290-2: Applied Natural Language Processing Marti Hearst Sept 20, 2004.
1 CSC 594 Topics in AI – Applied Natural Language Processing Fall 2009/ Shallow Parsing.
Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books עיבוד שפות טבעיות - שיעור שבע Tagging, Partial Parsing Context.
Parsing — Part II (Ambiguity, Top-down parsing, Left-recursion Removal)
Parsing SLP Chapter 13. 7/2/2015 Speech and Language Processing - Jurafsky and Martin 2 Outline  Parsing with CFGs  Bottom-up, top-down  CKY parsing.
Basic Parsing with Context- Free Grammars 1 Some slides adapted from Julia Hirschberg and Dan Jurafsky.
Context-Free Grammar CSCI-GA.2590 – Lecture 3 Ralph Grishman NYU.
1 Basic Parsing with Context Free Grammars Chapter 13 September/October 2012 Lecture 6.
11 CS 388: Natural Language Processing: Syntactic Parsing Raymond J. Mooney University of Texas at Austin.
March 2006 CLINT-CS 1 Introduction to Computational Linguistics Chunk Parsing.
PARSING David Kauchak CS457 – Fall 2011 some slides adapted from Ray Mooney.
COM90042 Trevor Cohn 1 WSTA Lectures 18 & 19 Grammars and Parsing Some Applications  Grammar checking  Machine translation  Dialogue systems  Summarization.
Probabilistic Parsing Reading: Chap 14, Jurafsky & Martin This slide set was adapted from J. Martin, U. Colorado Instructor: Paul Tarau, based on Rada.
October 2008csa3180: Setence Parsing Algorithms 1 1 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up.
For Friday Finish chapter 23 Homework: –Chapter 22, exercise 9.
October 2005CSA3180: Text Processing II1 CSA3180: Natural Language Processing Text Processing 2 Shallow Parsing and Chunking Python and NLTK NLTK Exercises.
Ling 570 Day 17: Named Entity Recognition Chunking.
LINGUISTICA GENERALE E COMPUTAZIONALE ANALISI SINTATTICA (PARSING)
CS : Language Technology for the Web/Natural Language Processing Pushpak Bhattacharyya CSE Dept., IIT Bombay Constituent Parsing and Algorithms (with.
10. Parsing with Context-free Grammars -Speech and Language Processing- 발표자 : 정영임 발표일 :
May 2006CLINT-LN Parsing1 Computational Linguistics Introduction Parsing with Context Free Grammars.
October 2005csa3180: Parsing Algorithms 11 CSA350: NLP Algorithms Sentence Parsing I The Parsing Problem Parsing as Search Top Down/Bottom Up Parsing Strategies.
Parsing with Context Free Grammars CSC 9010 Natural Language Processing Paula Matuszek and Mary-Angela Papalaskari This slide set was adapted from: Jim.
Parsing I: Earley Parser CMSC Natural Language Processing May 1, 2003.
PARSING David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
For Wednesday Read chapter 23 Homework: –Chapter 22, exercises 1,4, 7, and 14.
Syllabus Text Books Classes Reading Material Assignments Grades Links Forum Text Books עיבוד שפות טבעיות - שיעור שבע Partial Parsing אורן גליקמן.
Rules, Movement, Ambiguity
CSA2050 Introduction to Computational Linguistics Parsing I.
NLP. Introduction to NLP Background –Developed by Jay Earley in 1970 –No need to convert the grammar to CNF –Left to right Complexity –Faster than O(n.
Sentence Parsing Parsing 3 Dynamic Programming. Jan 2009 Speech and Language Processing - Jurafsky and Martin 2 Acknowledgement  Lecture based on  Jurafsky.
PARSING 2 David Kauchak CS159 – Spring 2011 some slides adapted from Ray Mooney.
1 Context Free Grammars October Syntactic Grammaticality Doesn’t depend on Having heard the sentence before The sentence being true –I saw a unicorn.
Quick Speech Synthesis CMSC Natural Language Processing April 29, 2003.
CPSC 503 Computational Linguistics
CS 4705 Lecture 10 The Earley Algorithm. Review Top-Down vs. Bottom-Up Parsers –Both generate too many useless trees –Combine the two to avoid over-generation:
csa3050: Parsing Algorithms 11 CSA350: NLP Algorithms Parsing Algorithms 1 Top Down Bottom-Up Left Corner.
February 2007CSA3050: Tagging III and Chunking 1 CSA2050: Natural Language Processing Tagging 3 and Chunking Transformation Based Tagging Chunking.
Natural Language Processing Lecture 15—10/15/2015 Jim Martin.
CPSC 422, Lecture 27Slide 1 Intelligent Systems (AI-2) Computer Science cpsc422, Lecture 27 Nov, 16, 2015.
1 Introduction to Computational Linguistics Eleni Miltsakaki AUTH Spring 2006-Lecture 2.
October 2005CSA3180: Text Processing II1 CSA3180: Natural Language Processing Text Processing 2 Python and NLTK Shallow Parsing and Chunking NLTK Lite.
Parsing and Code Generation Set 24. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program,
Instructor: Nick Cercone CSEB - 1 Parsing and Context Free Grammars Parsers, Top Down, Bottom Up, Left Corner, Earley.
GRAMMARS & PARSING. Parser Construction Most of the work involved in constructing a parser is carried out automatically by a program, referred to as a.
NLP. Introduction to NLP #include int main() { int n, reverse = 0; printf("Enter a number to reverse\n"); scanf("%d",&n); while (n != 0) { reverse =
November 2004csa3050: Parsing Algorithms 11 CSA350: NLP Algorithms Parsing Algorithms 1 Top Down Bottom-Up Left Corner.
PARSING David Kauchak CS159 – Fall Admin Assignment 3 Quiz #1  High: 36  Average: 33 (92%)  Median: 33.5 (93%)
Natural Language Processing Vasile Rus
Statistical NLP Winter 2009
Basic Parsing with Context Free Grammars Chapter 13
CS 388: Natural Language Processing: Syntactic Parsing
Introduction to Linguistics
Parsing and More Parsing
Lecture 7: Introduction to Parsing (Syntax Analysis)
Chunk Parsing CS1573: AI Application Development, Spring 2003
CSA2050 Introduction to Computational Linguistics
David Kauchak CS159 – Spring 2019
Presentation transcript:

1 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Euromasters summer school 2005 Introduction to NLTK Part II Trevor Cohn July 12, 2005

2 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Outline ● Syntactic parsing – shallow parsing (chunking) – CFG parsing ● shift reduce parsing ● chart parsing: top down, bottom up, earley ● Classification – at word level or at document level

3 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Identification and Classification ● Segmentation and Labelling – tokenization + tagging: sequences of characters – chunking: sequences of words ● similarities between tokenization/tagging and chunking: – omitted material, finite-state, application-specific

4 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Motivations ● Locating information – e.g. text retrieval – index a document collection on its noun phrases ● e.g. “Rangers Football Club”, “Edinburgh University” ● Ignoring information – e.g. syntactic analysis – throw away noun phrases to study higher-level patterns ● e.g. phrases involving “gave” in Penn treebank: ● gave NP; gave up NP in NP; gave NP up; gave NP help; gave NP to NP

5 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Comparison with Parsing ● Full parsing: build a complete parse tree – Low Accuracy, slow, domain specific – Unnecessary details for many super-tasks ● Chunk parsing: just model chunks of the parse – Smaller solution space – Relevant context is small and local – Chunks are non-recursive – Chunk parsing can be implemented with a finite state machine ● Fast ● Low memory requirements – Chunk parsing can be applied to very large text sources (e.g., the web)

6 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chunk Parsing Goal: divide a sentence into a sequence of chunks. ● Chunks are non-overlapping regions of a text [I] saw [a tall man] in [the park]. ● Chunks are non-recursive – a chunk can not contain other chunks ● Chunks are non-exhaustive – not all words are included in chunks

7 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chunk Parsing Examples ● Noun-phrase chunking: [I] saw [a tall man] in [the park]. ● Verb-phrase chunking: The man who [was in the park] [saw me]. ● Prosodic chunking: [I saw] [a tall man] [in the park].

8 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chunks and Constituency Constituents: [ a tall man in [the park] ]. Chunks: [a tall man] in [the park]. ● Chunks are not constituents – Constituents are recursive ● Chunks are typically subsequences of constituents – Chunks do not cross major constituent boundaries

9 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Representation ● BIO (or IOB) ● Trees

10 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Reading from BIO-tagged data >>> from nltk.tokenreader.conll import * >>> text = '''he PRP B-NP accepted VBD B-VP the DT B-NP position NN I-NP of IN B-PP vice NN B-NP chairman NN I-NP of IN B-PP Carlyle NNP B-NP Group NNP I-NP,, O ''' >>> reader = ConllTokenReader(chunk_types=['NP']) >>> text_tok = reader.read_token(text) >>> print text_tok['SENTS'][0]['TREE'] (S: (NP: ) (NP: )... Data is from NLTK “chunking” corpus

11 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chunk Parsing Techniques ● Chunk parsers usually ignore lexical content – Only need to look at part-of-speech tags ● Possible steps in chunk parsing – Chunking, unchunking – Chinking – Merging, splitting ● Evaluation – Baseline

12 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chunking ● Define a regular expression that matches the sequences of tags in a chunk – A simple noun phrase chunk regexp: ? * ● Chunk all matching subsequences: the/DT little/JJ cat/NN sat/VBD on/IN the/DT mat/NN [ the/DT little/JJ cat/NN ] sat/VBD on/IN [ the/DT mat/NN ] ● If matching subsequences overlap, the first one gets priority ● (Unchunking is the opposite of chunking)

13 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chinking ● A chink is a subsequence of the text that is not a chunk. ● Define a regular expression that matches the sequences of tags in a chink – A simple chink regexp for finding NP chunks: ( | )+ ● Chunk anything that is not a matching subsequence: the/DT little/JJ cat/NN sat/VBD on/IN the/DT mat/NN [ the/DT little/JJ cat/NN ] sat/VBD on/IN [ the/DT mat/NN ] ChinkChunk

14 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Merging ● Combine adjacent chunks into a single chunk ● Define a regular expression that matches the sequences of tags on both sides of the point to be merged – Merge a chunk ending in JJ with a chunk starting with NN left: right: [ the/DT little/JJ ] [ cat/NN ] sat/VBD on/IN the/DT mat/NN [ the/DT little/JJ cat/NN ] sat/VBD on/IN the/DT mat/NN ● (Splitting is the opposite of merging)

15 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Evaluating Performance ● Basic measures: Target ¬ Target Selected True positive False positive ¬Selected False negative True negative ● Precision – What proportion of selected items are correct? ● Recall = – What proportion of target items are selected? ● See section 7 of chunking tutorial, ChunkScore class

16 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Cascaded Chunking

17 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Grammars and Parsing ● Some Applications – Grammar checking – Machine translation – Dialogue systems – Summarization ● Sources of complexity – Size of search space – No independent source of knowledge about the underlying structures – Lexical and structural ambiguity

18 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Syntax the part of a grammar that represents a speaker's knowledge of the structure of phrases and sentences Why word order is significant: – may have no effect on meaning ● Jack Horner stuck in his thumb Jack Horner stuck his thumb in – may change meaning ● Salome danced for Herod Herod danced for Salome – may render a sentence ungrammatical ● *for danced Herod Salome

19 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Syntactic Constituency 1. Ability to stand alone: exclamations and answers What do many executives do? Eat at really fancy restaurants Do fancy restaurants do much business? *Well, executives eat at 2. Substitution by a pro-form: pronouns, pro-verbs (do, be, have), pro-adverbs (there, then), pro-adjective (such) Many executives do 3. Movement: fronting or extraposing a fragment At really fancy restaurants, many executives eat *Fancy restaurants many executives eat at really

20 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Constituency: Tree diagrams

21 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Major Syntactic Constituents ● Noun Phrase (NP) – referring expressions ● Verb Phrase (VP) – predicating expressions ● Prepositional Phrase (PP) – direction, location, etc ● Adjectival Phrase (AdjP) – modified adjectives (e.g. "really fancy") ● Adverbial Phrase (AdvP) ● Complementizers (COMP)

22 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Penn Treebank (S (S-TPC-1 (NP-SBJ (NP (NP A form) (PP of (NP asbestos))) (RRC (ADVP-TMP once) (VP used (NP *) (S-CLR (NP-SBJ *) (VP to (VP make (NP Kent cigarette filters))))))) (VP has (VP caused (NP (NP a high percentage) (PP of (NP cancer deaths)) (PP-LOC among (NP (NP a group) (PP of (NP (NP workers) (RRC (VP exposed (NP *) (PP-CLR to (NP it)) (ADVP-TMP (NP (QP more than 30) years) ago))))))))))), (NP- SBJ researchers) (VP reported (SBAR 0 (S *T*-1))).))

23 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Phrase Structure Grammar Grammaticality: ● doesn't depend on: – having heard the sentence before – the sentence being true (I saw a unicorn yesterday) – the sentence being meaningful (colorless green ideas sleep furiously vs *furiously sleep ideas green colorless) – learned rules of grammar ● a formal property that we can investigate and model

24 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Recursive Grammars ● set of well formed English sentences is infinite – no a priori length limit – Sentence from A.A.Milne (next slide) ● a grammar is a finite-statement about well-formedness – it has to involve iteration or recursion ● examples of recursive rules – NP  NP PP (in a single rule) – NP  S, S  NP VP (recursive pair) ● therefore search is over a possibly infinite set

25 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Recursive Grammars (cont) You can imagine Piglet's joy when at last the ship came in sight of him. In after-years he liked to think that he had been in Very Great Danger during the Terrible Flood, but the only danger he had really been in was the last half-hour of his imprisonment, when Owl, who had just flown up, sat on a branch of his tree to comfort him, and told him a very long story about an aunt who had once laid a seagull's egg by mistake, and the story went on and on, rather like this sentence, until Piglet who was listening out of his window without much hope, went to sleep quietly and naturally, slipping slowly out of the window towards the water until he was only hanging on by his toes, at which moment, luckily, a sudden loud squawk from Owl, which was really part of the story, being what his aunt said, woke the Piglet up and just gave him time to jerk himself back into safety and say, "How interesting, and did she?" when -- well, you can imagine his joy when at last he saw the good ship, Brain of Pooh (Captain, C. Robin; Ist Mate, P. Bear) coming over the sea to rescue him... A.A. Milne: In which Piglet is Entirely Surrounded by Water

26 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Trees from Local Trees ● A tree is just a set of connected local trees ● Each local tree is licensed by a production ● Each production is included in the grammar ● The fringe of the tree is a given sentence ● Parsing = discovering the tree(s) for a given sentence ● A SEARCH PROBLEM A BCD x

27 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Syntactic Ambiguity ● I saw the man in the park with a telescope – several "readings" – attachment ambiguity saw VP with a telescope PP in the park PP the man NP saw VP with a telescope PP in the park PP the man NP

28 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Grammars S -> NP, VPNP -> Det, N VP -> V, NPVP -> V, NP, PP NP -> Det, N, PPPP -> P, NP NP -> 'I'N -> 'man' Det -> 'the'Det -> 'a' V -> 'saw'P -> 'in' P -> 'with'N -> 'park' N -> 'dog'N -> 'telescope'

29 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Kinds of Parsing ● Top down, Bottom up ● Chart parsing ● Chunk parsing (earlier)

30 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Top-Down Parsing (Recursive Descent Parsing) parse(goal, sent): – if goal and string are empty we're done, else – is the first element of the goal the same as the first element in the string? ● if so, strip off these first elements and continue processing – otherwise, check if any of the rule LHSs match the first element of the goal ● if so, replace this element with the RHS of the rule ● do this for all rules ● new continue with the new goal ● Demonstration

31 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Bottom-Up Parsing parse(sent): – if sent is [S] then finish – otherwise, for every rule, check if the RHS of the rule matches any substring of the sentence – if it does, replace the substring the the LHS of the rule – continue with this sentence ● Demonstration

32 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Issues and Solutions ● top-down parsing: – wasted processing hypothesizing words and phrases (relevant lexical items are absent), repeated parsing of subtrees – infinite recursion on left-recursive rules (transforming the grammar) ● bottom-up parsing: – builds sequences of constituents that top-down parsing will never consider ● solutions: – BU to find categories of lexical items, then TD – left-corner parsing (bottom-up filtering)

33 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chart Parsing 1.Problems with naive parsers 2.Tokens and charts 3.Productions, trees and charts 4.Chart Parsers 5.Adding edges to the chart 6.Rules and strategies 7.Demonstration

34 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Issues and Solutions ● top-down parsing: – wasted processing hypothesizing words and phrases (relevant lexical items are absent), repeated parsing of subtrees – infinite recursion on left-recursive rules (transforming the grammar) ● bottom-up parsing: – builds sequences of constituents that top-down parsing will never consider ● solutions: – BU to find categories of lexical items, then TD – left-corner parsing (bottom-up filtering) ● More general, flexible solution: dynamic programming

35 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Tokens and Charts ● An input sentence can be stored in a chart – Sentence = list of tokens – Token = (type, location) -> Edge ● E.g. [I 0:1, saw 1:2, the 2:3, dog 3:4 ] – NLTK: – Abbrev: ● Chart representation: I sawthedog

36 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Productions, Trees & Charts ● Productions: – A  BCD, C  x ● Trees: A BCD C x ● Charts: A B C D C x terminal pre-terminal nonterminals

37 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Edges and “Dotted” Productions ● Edges decorated with dotted production and tree BCD A  BCD A BC D BCD A BC BCD A B BCD A ● Partial vs complete edges; zero-width edges

38 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Charts and Chart Parsers ● Chart: – collection of edges ● Chart parser: – Consults three sources of information: ● Grammar ● Input sentence ● Existing chart – Action: ● Add more edges to the chart ● Report any completed parse trees ● Three ways of adding edges to the chart...

39 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Adding Edges to the Chart 1.Adding LeafEdges 2.Adding self loops I sawthedog BCD A  BC D A

40 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Adding Edges to the Chart (cont) 3.Adding “fundamental rule” edges BCE A  BCD A BC F D  EF D EF BCE A  BC D F EF A BC D

41 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chart Rules: Bottom-Up Rule ● Bottom-Up Rule: – For each complete edge C, set X = LHS of production For each grammar rule with X as first element on RHS Insert zero-width edge to left of C Bottom Up Init Rule |[--]......| 'I'. Bottom Up Init Rule |. [--].....| 'saw'. Bottom Up Init Rule |.. [--]....| 'the'. Bottom Up Init Rule |... [--]...| 'dog'. Bottom Up Init Rule |.... [--]..| 'with'. Bottom Up Init Rule |..... [--].| 'my'. Bottom Up Init Rule | [--]| 'cookie'. Bottom Up Rule | >.| N -> * 'cookie' Bottom Up Rule |..... >..| Det -> * 'my' Bottom Up Rule |.... >...| P -> * 'with' Bottom Up Rule |... >....| N -> * 'dog' Bottom Up Rule |.. >.....| Det -> * 'the' Bottom Up Rule |. >......| V -> * 'saw' Bottom Up Rule |> | NP -> * 'I'

42 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Chart Rules: Top-Down Rules ● Top down initialization: – For every production whose LHS is the base category: create the corresponding dotted rule put dot position at the start of RHS Top Down Init Rule |> | S -> * NP VP ● Top down expand rule: – For each production and for each incomplete edge: if the expected constituent matches the production: insert zero-width edge with this production on right Top Down Rule |> | NP -> * 'I' Top Down Rule |> | NP -> * Det N Top Down Rule |> | NP -> * NP PP Top Down Rule |> | Det -> * 'the' Top Down Rule |> | Det -> * 'my'

43 Introduction to NLTK part 2 Euromasters SS Trevor Cohn Rules, Strategies, Demo ● Fundamental rule: – For each pair of edges e 1 and e 2 : If e 1 is incomplete and its expected constituent is X: If e 2 is complete and its LHS is X: Add e 3 spanning both e 1 and e 2, with dot moved right ● Parsing Strategies: – [TopDownInitRule, TopDownExpandRule, FundamentalRule] – [BottomUpRule, FundamentalRule] ● Demonstration: – python nltk/draw/chart.py

44 Introduction to NLTK part 2 Euromasters SS Trevor Cohn There's more to NLTK ● corpora [nltk.corpus] – more than 16 in NLTK data ● probabilistic parsing [nltk.parser.probabilistic] ● classification [nltk.feature, nltk.classifier] – maximum entropy, naive Bayes ● hidden Markov models [nltk.hmm] ● clustering [ntk.clusterer] ● stemming [nltk.stemmer] ● user contributions [nltk_contrib] – wordnet interface, festival interface, user projects ●... and much more