Page 1 Language Modeling. Page 2 Next Word Prediction From a NY Times story... Stocks... Stocks plunged this …. Stocks plunged this morning, despite a.

Slides:



Advertisements
Similar presentations
School of something FACULTY OF OTHER School of Computing FACULTY OF ENGINEERING Word-counts, visualizations and N-grams Eric Atwell, Language Research.
Advertisements

Language Modeling: Ngrams
1 CS 388: Natural Language Processing: N-Gram Language Models Raymond J. Mooney University of Texas at Austin.
N-Grams and Corpus Linguistics 6 July Linguistics vs. Engineering “But it must be recognized that the notion of “probability of a sentence” is an.
N-gram model limitations Important question was asked in class: what do we do about N-grams which were not in our training corpus? Answer given: we distribute.
Albert Gatt Corpora and Statistical Methods – Lecture 7.
SI485i : NLP Set 4 Smoothing Language Models Fall 2012 : Chambers.
CMSC 723 / LING 645: Intro to Computational Linguistics February 25, 2004 Lecture 5 (Dorr): Intro to Probabilistic NLP and N-grams (chap ) Prof.
CS 4705 N-Grams and Corpus Linguistics Julia Hirschberg CS 4705.
CSC 9010: Special Topics, Natural Language Processing. Spring, Matuszek & Papalaskari 1 N-Grams CSC 9010: Special Topics. Natural Language Processing.
1 N-Grams and Corpus Linguistics September 2009 Lecture #5.
NATURAL LANGUAGE PROCESSING. Applications  Classification ( spam )  Clustering ( news stories, twitter )  Input correction ( spell checking )  Sentiment.
N-Grams and Corpus Linguistics.  Regular expressions for asking questions about the stock market from stock reports  Due midnight, Sept. 29 th  Use.
1 I256: Applied Natural Language Processing Marti Hearst Sept 13, 2006.
Part II. Statistical NLP Advanced Artificial Intelligence Markov Models and N-gramms Wolfram Burgard, Luc De Raedt, Bernhard Nebel, Kristian Kersting Some.
N-Grams and Corpus Linguistics
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2007 Lecture 5 2 August 2007.
CS 4705 Lecture 13 Corpus Linguistics I. From Knowledge-Based to Corpus-Based Linguistics A Paradigm Shift begins in the 1980s –Seeds planted in the 1950s.
N-Gram Language Models CMSC 723: Computational Linguistics I ― Session #9 Jimmy Lin The iSchool University of Maryland Wednesday, October 28, 2009.
CS 4705 Lecture 6 N-Grams and Corpus Linguistics.
Ngram models and the Sparsity problem John Goldsmith November 2002.
N-gram model limitations Q: What do we do about N-grams which were not in our training corpus? A: We distribute some probability mass from seen N-grams.
1 Language Model (LM) LING 570 Fei Xia Week 4: 10/21/2009 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAAAAA A A.
1 Smoothing LING 570 Fei Xia Week 5: 10/24/07 TexPoint fonts used in EMF. Read the TexPoint manual before you delete this box.: AAA A A AA A A A.
N-Grams and Language Modeling
1 LM Approaches to Filtering Richard Schwartz, BBN LM/IR ARDA 2002 September 11-12, 2002 UMASS.
CS 4705 Lecture 15 Corpus Linguistics III. Training and Testing Probabilities come from a training corpus, which is used to design the model. –overly.
Language Model. Major role: Language Models help a speech recognizer figure out how likely a word sequence is, independent of the acoustics. A lot of.
Introduction to Language Models Evaluation in information retrieval Lecture 4.
CS 4705 N-Grams and Corpus Linguistics. Homework Use Perl or Java reg-ex package HW focus is on writing the “grammar” or FSA for dates and times The date.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 19: 10/31.
LING 438/538 Computational Linguistics Sandiway Fong Lecture 18: 10/26.
1 SIMS 290-2: Applied Natural Language Processing Marti Hearst Sept 15, 2004.
Language Modeling Julia Hirschberg CS Approaches to Language Modeling Context-Free Grammars –Use in HTK Ngram Models.
CS 4705 N-Grams and Corpus Linguistics. Spelling Correction, revisited M$ suggests: –ngram: NorAm –unigrams: anagrams, enigmas –bigrams: begrimes –trigrams:
CS 4705 Lecture 14 Corpus Linguistics II. Relating Conditionals and Priors P(A | B) = P(A ^ B) / P(B) –Or, P(A ^ B) = P(A | B) P(B) Bayes Theorem lets.
SI485i : NLP Set 3 Language Models Fall 2012 : Chambers.
1 Advanced Smoothing, Evaluation of Language Models.
1 N-Grams and Corpus Linguistics September 6, 2012 Lecture #4.
Machine Translation Course 3 Diana Trandab ă ț Academic year:
NGrams 09/16/2004 Instructor: Rada Mihalcea Note: some of the material in this slide set was adapted from an NLP course taught by Bonnie Dorr at Univ.
Natural Language Processing Language Model. Language Models Formal grammars (e.g. regular, context free) give a hard “binary” model of the legal sentences.
Multi-Style Language Model for Web Scale Information Retrieval Kuansan Wang, Xiaolong Li and Jianfeng Gao SIGIR 2010 Min-Hsuan Lai Department of Computer.
Lanugage Modeling Lecture 12 Spoken Language Processing Prof. Andrew Rosenberg.
Lecture 1, 7/21/2005Natural Language Processing1 CS60057 Speech &Natural Language Processing Autumn 2007 Lecture 7 8 August 2007.
6. N-GRAMs 부산대학교 인공지능연구실 최성자. 2 Word prediction “I’d like to make a collect …” Call, telephone, or person-to-person -Spelling error detection -Augmentative.
N-Grams and Corpus Linguistics guest lecture by Dragomir Radev
NLP Language Models1 Language Models, LM Noisy Channel model Simple Markov Models Smoothing Statistical Language Models.
Chapter 6: Statistical Inference: n-gram Models over Sparse Data
Statistical NLP: Lecture 8 Statistical Inference: n-gram Models over Sparse Data (Ch 6)
Chapter 6: N-GRAMS Heshaam Faili University of Tehran.
Chapter6. Statistical Inference : n-gram Model over Sparse Data 이 동 훈 Foundations of Statistic Natural Language Processing.
1 Introduction to Natural Language Processing ( ) LM Smoothing (The EM Algorithm) AI-lab
Lecture 4 Ngrams Smoothing
Ngram models and the Sparcity problem. The task Find a probability distribution for the current word in a text (utterance, etc.), given what the last.
Estimating N-gram Probabilities Language Modeling.
Natural Language Processing Statistical Inference: n-grams
Maximum Entropy techniques for exploiting syntactic, semantic and collocational dependencies in Language Modeling Sanjeev Khudanpur, Jun Wu Center for.
N-Gram Model Formulas Word sequences Chain rule of probability Bigram approximation N-gram approximation.
Statistical Methods for NLP Diana Trandab ă ț
ECE 8443 – Pattern Recognition ECE 8527 – Introduction to Machine Learning and Pattern Recognition Objectives: Bayes Rule Mutual Information Conditional.
Language Modeling Part II: Smoothing Techniques Niranjan Balasubramanian Slide Credits: Chris Manning, Dan Jurafsky, Mausam.
Language Model for Machine Translation Jang, HaYoung.
Statistical Methods for NLP
N-Grams Chapter 4 Part 2.
N-Grams and Corpus Linguistics
N-Grams and Corpus Linguistics
CSCE 771 Natural Language Processing
Chapter 6: Statistical Inference: n-gram Models over Sparse Data
Presentation transcript:

Page 1 Language Modeling

Page 2 Next Word Prediction From a NY Times story... Stocks... Stocks plunged this …. Stocks plunged this morning, despite a cut in interest rates Stocks plunged this morning, despite a cut in interest rates by the Federal Reserve, as Wall... Stocks plunged this morning, despite a cut in interest rates by the Federal Reserve, as Wall Street began

Page 3 Stocks plunged this morning, despite a cut in interest rates by the Federal Reserve, as Wall Street began trading for the first time since last … Stocks plunged this morning, despite a cut in interest rates by the Federal Reserve, as Wall Street began trading for the first time since last Tuesday's terrorist attacks.

Page 4 Human Word Prediction Clearly, at least some of us have the ability to predict future words in an utterance. How? Domain knowledge Syntactic knowledge Lexical knowledge

Page 5 Claim A useful part of the knowledge needed to allow Word Prediction can be captured using simple statistical techniques In particular, we'll rely on the notion of the probability of a sequence (a phrase, a sentence)

Page 6 N-grams N-grams  ‘N-words’ ? It’s ‘N’ consecutive words that one can find in a given corpus or set of documents ? ‘N-gram’ model is a probabilistic model that computes probability of Nth word occurring after seeing ‘N-1’ words – also known as language model in speech recognition

Page 7 Some Interesting Facts The most frequent 250 words takes account of approximately 50% of all tokens in any random text ‘the’ is usually the most frequent word ‘the’ occurs 69,971 times in 1 million word Brown corpus (7%) The top 20 words in 1 year of Wall Street Journal is The, of, to, in, and, for, that, is, on, it, by, with, as, at, said, mister, from, its, are, he, million

Page 8 N-Gram Models of Language Use the previous N-1 words in a sequence to predict the next word Language Model (LM) unigrams, bigrams, trigrams,… How do we train these models? Very large corpora

Page 9 Applications Why do we want to predict a word, given some preceding words? Rank the likelihood of sequences containing various alternative hypotheses, e.g. for ASR Theatre owners say popcorn/unicorn sales have doubled... Assess the likelihood/goodness of a sentence, e.g. for text generation or machine translation The doctor recommended a cat scan.

Page 10 Counting Words in Corpora What is a word? e.g., are cat and cats the same word? September and Sept? zero and oh? Is _ a word? * ? ‘(‘ ? How many words are there in don’t ? Gonna ?

Page 11 Terminology Sentence: unit of written language Utterance: unit of spoken language Types: number of distinct words in a corpus (vocabulary size) Tokens: total number of words

Page 12 Corpora Corpora are collections of text and speech Brown Corpus Wall Street Journal AP news DARPA/NIST text/speech corpora (Call Home, ATIS, switchboard, Broadcast News, TDT, Communicator) TRAINS, Radio News

Page 13 Simple N-Grams Assume a language has V word types in its lexicon, how likely is word x to follow word y? Simplest model of word probability: 1/V Alternative 1: estimate likelihood of x occurring in new text based on its general frequency of occurrence estimated from a corpus (unigram probability) popcorn is more likely to occur than unicorn Alternative 2: condition the likelihood of x occurring in the context of previous words (bigrams, trigrams,…) mythical unicorn is more likely than mythical popcorn

Page 14 Computing the Probability of a Word Sequence Conditional Probability P(A 1,A 2 ) = P(A 1 ) P(A 2 |A 1 ) The Chain Rule generalizes to multiple events P(A 1, …,A n ) = P(A 1 ) P(A 2 |A 1 ) P(A 3 |A 1,A 2 )…P(A n |A 1 …A n-1 ) Compute the product of component conditional probabilities? P(the mythical unicorn) = P(the) P(mythical|the) P(unicorn|the mythical) The longer the sequence, the less likely we are to find it in a training corpus P(Most biologists and folklore specialists believe that in fact the mythical unicorn horns derived from the narwhal) Solution: approximate using n-grams

Page 15 Bigram Model Approximate by P(unicorn|the mythical) by P(unicorn|mythical) Markov assumption: the probability of a word depends only on the probability of a limited history Generalization: the probability of a word depends only on the probability of the n previous words trigrams, 4-grams, … the higher n is, the more data needed to train backoff models

Page 16 Using N-Grams For N-gram models  P(w n-1,w n ) = P(w n | w n-1 ) P(w n-1 ) By the Chain Rule we can decompose a joint probability, e.g. P(w 1,w 2,w 3 ) P(w 1,w 2,...,w n ) = P(w 1 |w 2,w 3,...,w n ) P(w 2 |w 3,...,w n ) … P(w n-1 |w n ) P(w n ) For bigrams then, the probability of a sequence is just the product of the conditional probabilities of its bigrams P(the,mythical,unicorn) = P(unicorn|mythical) P(mythical|the) P(the| )

Page 17 Training and Testing N-Gram probabilities come from a training corpus overly narrow corpus: probabilities don't generalize overly general corpus: probabilities don't reflect task or domain A separate test corpus is used to evaluate the model, typically using standard metrics held out test set; development test set cross validation results tested for statistical significance

Page 18 A Simple Example P(I want to eat Chinese food) = P(I | ) P(want | I) P(to | want) P(eat | to) P(Chinese | eat) P(food | Chinese)

Page 19 A Bigram Grammar Fragment from BERP.001Eat British.03Eat today.007Eat dessert.04Eat Indian.01Eat tomorrow.04Eat a.02Eat Mexican.04Eat at.02Eat Chinese.05Eat dinner.02Eat in.06Eat lunch.03Eat breakfast.06Eat some.03Eat Thai.16Eat on

Page 20.01British lunch.05Want a.01British cuisine.65Want to.15British restaurant.04I have.60British food.08I don’t.02To be.29I would.09To spend.32I want.14To have.02 I’m.26To eat.04 Tell.01Want Thai.06 I’d.04Want some.25 I

Page 21 P(I want to eat British food) = P(I| ) P(want|I) P(to|want) P(eat|to) P(British|eat) P(food|British) =.25*.32*.65*.26*.001*.60 = vs. I want to eat Chinese food = Probabilities seem to capture ``syntactic'' facts, ``world knowledge'' eat is often followed by an NP British food is not too popular N-gram models can be trained by counting and normalization

Page 22 BERP Bigram Counts Lunch Food Chinese Eat To Want I lunchFoodChineseEatToWantI

Page 23 BERP Bigram Probabilities Normalization: divide each row's counts by appropriate unigram counts for w n-1 Computing the bigram probability of I I C(I,I)/C(all I) p (I|I) = 8 / 3437 =.0023 Maximum Likelihood Estimation (MLE): relative frequency of e.g LunchFoodChineseEatToWantI

Page 24 What do we learn about the language? What's being captured with... P(want | I) =.32 P(to | want) =.65 P(eat | to) =.26 P(food | Chinese) =.56 P(lunch | eat) =.055 What about... P(I | I) =.0023 P(I | want) =.0025 P(I | food) =.013

Page 25 P(I | I) =.0023 I I I I want P(I | want) =.0025 I want I want P(I | food) =.013 the kind of food I want is...

Page 26 Approximating Shakespeare As we increase the value of N, the accuracy of the n-gram model increases, since choice of next word becomes increasingly constrained Generating sentences with random unigrams... Every enter now severally so, let Hill he late speaks; or! a more to leg less first you enter With bigrams... What means, sir. I confess she? then all sorts, he is trim, captain. Why dost stand forth thy canopy, forsooth; he is this palpable hit the King Henry.

Page 27 Trigrams Sweet prince, Falstaff shall die. This shall forbid it should be branded, if renown made it empty. Quadrigrams What! I will go seek the traitor Gloucester. Will you not tell me who I am?

Page 28 There are 884,647 tokens, with 29,066 word form types, in about a one million word Shakespeare corpus Shakespeare produced 300,000 bigram types out of 844 million possible bigrams: so, 99.96% of the possible bigrams were never seen (have zero entries in the table) Quadrigrams worse: What's coming out looks like Shakespeare because it is Shakespeare

Page 29 N-Gram Training Sensitivity If we repeated the Shakespeare experiment but trained our n- grams on a Wall Street Journal corpus, what would we get? This has major implications for corpus selection or design

Page 30 Some Useful Empirical Observations A small number of events occur with high frequency A large number of events occur with low frequency You can quickly collect statistics on the high frequency events You might have to wait an arbitrarily long time to get valid statistics on low frequency events Some of the zeroes in the table are really zeros But others are simply low frequency events you haven't seen yet. How to address?

Page 31 Smoothing Techniques Every n-gram training matrix is sparse, even for very large corpora Solution: estimate the likelihood of unseen n-grams Problems: how do you adjust the rest of the corpus to accommodate these ‘phantom’ n-grams?

Page 32 Add-one Smoothing For unigrams: Add 1 to every word (type) count Normalize by N (tokens) /(N (tokens) +V (types)) Smoothed count (adjusted for additions to N) is Normalize by N to get the new unigram probability: Add delta smoothing

Page 33 Basic Idea: Use Count of things you have seen once to estimate the things you haven’t seen i.e. Estimate the probability of seeing something for the first time View training corpus as series of events, one for each token (N) and one for each new type (T). Probability of seeing something new is This probability mass will assigned to unseen cases Witten-Bell Discounting

Page 34 Witten-Bell (cont…) A zero ngram is just an ngram you haven’t seen yet…but every ngram in the corpus was unseen once…so... How many times did we see an ngram for the first time? Once for each ngram type (T) Est. total probability of unseen bigrams as Each of Z unseen cases will be assigned an equal portion probability mass - T/N+T Seen cases will have probabilities discounted as

Page 35 Witten-Bell (cont…) But for bigrams we can condition on the first word: Instead of trying to find what is the probability of finding a new bigram we can ask what is the probability of finding a new bigram that starts with the given word w Then unseen portion will be assigned probability mass And for seen cases we discount as follows:

Page 36 Distributing Among the Zeros If a bigram “wx wi” has a zero count Number of bigrams starting with wx that were not seen Actual frequency of bigrams beginning with wx Number of bigram types starting with wx

Page 37 Re-estimate amount of probability mass for zero (or low count) ngrams by looking at ngrams with higher counts For any n-gram that occurs ‘c’ times assume it occurs c* times, where Nc is the n number n-grams occurring c times Estimate a smoothed count E.g. N 0 ’s adjusted count is a function of the count of ngrams that occur once, N 1 Probability mass assigned to unseen cases works out to be n1/N Counts for bigrams that never occurred (c0) will be just count of bigrams that occurred once by count of bigrams that never occurred. How do we know count of bigrams that never occurred? Good-Turing Discounting

Page 38 Backoff methods (e.g. Katz ‘87) If you don’t have a count for ‘n-gram’ backoff to weighted ‘n-1’ gram Alphas needed to make a proper probability distribution (If we backoff when probability is zero, we are adding extra probability mass) For e.g. a trigram model Compute unigram, bigram and trigram probabilities In use: – Where trigram unavailable back off to bigram if available, o.w. unigram probability

Page 39 Summary N-gram models are approximation to the correct model given by chain rule N-gram probabilities can be used to estimate the likelihood Of a word occurring in a context (N-1) N-gram models suffer from sparse data Smoothing techniques deal with problems of unseen words in corpus

Page 40 Statistical Techniques in NLP

Page 41 Example: Text Summarization Let’s say we are doing text summarization using sentence extraction Someone gave us a document where each sentence is scored between 1 to 20 and Extracting top 10% scoring sentence can potentially be a summary We have 100 such documents Problem: Use a machine learning technique to build a model that predicts the score of sentences in a new document

Page 42 Example: Text Summarization CORPUS 100 documents Each sentence scored (1 to 20) Machine Learning Corpus- Based Model

Page 43 Regression for our Text Summarization Problem For simplicity let’s assume all of documents are of equal length ‘N’ Our training dataset (100 documents) We have 100xN sentences in total 100xN scores, let’s call these scores y’s For each sentence we know it’s position in the document. Let’s call these sentence positions x’s so we get 100xN sentence positions

Page 44 Regression as Function Approximation Using our training data ‘X’ we must predict a score for each sentence in a new document We can do such prediction by finding a function y=f(x) that fits the training data well Need to find out what f(x) to use Need to compute how good the training data fits with the chosen f(x)

Page 45 Empirical Risk Minimization Need to compute how good the data fits the chosen function f(x) We can define a loss function L(y, f(x)) Find average loss: Simple Loss Function:

Page 46 Linear Regression We can choose f(x) to be linear, polynomial, exponential or any other class of functions If we use linear function we get linear regression, widely used modeling technique Where m is slope and c is intercept on y axis

Page 47 Text Summarization with Linear Regression We had Nx100 (x i, y i ) pairs where x was sentence position and y was score for the sentence Let’s look at a sample plot Sentence position Score (x i, y i ) (x i, f(x i )) Error (y i - f(x i )) The line we have found by minimizing average squared error is our model (summarizer) Given any new ‘x’ (i.e. sentence position of a new document) we can predict ‘y’ – score that represents it’s significance to summary

Page 48 Naïve Bayes Classifier Let’s assume instead of score between 1 to 20 for each sentence, all the sentence have been classified into two classes – IN SUMMARY (1), NOT IN SUMMARY (0) Now, given a document we want to predict the class (1) or (0) for each sentence in the document. All the sentence in class (1) should be included in the summary This is a binary classification problem

Page 49 Intuitive Example of Naïve Bayes Classifier Let us assume the objects can be classified into RED or GREEN We have a corpus with objected manually labeled as RED or GREEN We need to figure out if the test object is RED or GREEN Number of green objects is twice that of red. So, it is reasonable to assume that a new object (not observed yet) is twice likely to be green than red (prior probability) All figures in the given example are from electronic textbook StatSoft

Page 50 Example (RED or GREEN classification) There are total of 60 objects with 40 GREEN and 20 RED Prior probability of GREEN  # of GREEN objects Total # of objects Prior probability of RED  # of RED objects Total # of objects Prior probability of GREEN  Prior probability of RED  20 60

Page 51 Example (RED or GREEN classification) Looking at the picture it is reasonable to assume that likelihood of object being RED or GREEN can be computed by number of RED or GREEN objects in the vicinity Need to figure out if the test object is GREEN or RED Likelihood of X being GREEN  # of GREEN objects in vicinity of X Total # of GREEN Likelihood of X being RED  # of RED objects in vicinity of X Total # of RED

Page 52 Example (RED or GREEN classification) Looking at the picture it is reasonable to assume that likelihood of object being RED or GREEN can be computed by number of RED or GREEN objects in the vicinity Need to figure out if the test object is GREEN or RED Likelihood of X being GREEN  # of GREEN objects in vicinity of X Total # of GREEN Likelihood of X being RED  # of RED objects in vicinity of X Total # of RED  1/40  3/20

Page 53 Example (RED or GREEN classification) Posterior probability of X being GREEN = Prior probability of GREEN x Likelihood of X given GREEN = 40/60 x 1/40 = 1/60 Posterior probability of X being RED = Prior probability of RED x Likelihood of X given RED = 20/60 x 3/40 = 1/40 Hence, we classify our new object X as RED using our Bayesian classifier model.

Page 54 Document Vectors Documents can be represented in different types of vectors: binary vector, multinomial vector, feature vector Binary Vector: For each dimension, 1 if the word type is in the document and 0 otherwise Multinomial Vector: For each dimension, count # of times word type appears in the document Feature Vector: Extract various features from the document and represent them in a vector. Dimension equals the number of features

Page 55 Example of a multinomial document vector Screening of the critically acclaimed film NumaFung Reserved tickets can be picked up on the day of the show at the box office at Arledge Cinema. Tickets will not be reserved if not paid for in advance. 4 THE 2 TICKETS 2 RESERVED 2 OF 2 NOT 2 BE 2 AT 1 WILL 1 UP 1 SHOW 1 SCREENING 1 PICKED 1 PAID 1 ON 1 OFFICE 1 NUMAFUNG 1 IN 1 IF 1 FOR 1 FILM 1 DAY 1 CRITICALLY 1 CINEMA 1 CAN 1 BOX 1 ARLEDGE 1 ADVANCE 1 ACCLAIMED

Page 56 Example of a multinomial document vector 4 THE 2 SEATS 2 RESERVED 2 OF 2 NOT 2 BE 2 AT 1 WILL 1 UP 1 SHOW 1 SHOWING 1 PICKED 1 PAID 1 ON 1 OFFICE 1 VOLCANO 1 IN 1 IF 1 FOR 1 FILM 1 DAY 1 CRITICALLY 1 CINEMA 1 CAN But if you want to compare previous vector to this new vector we cannot do any computation like cosine measure with this vector. Why? ->Different dimensions Hence, if you have multiple documents you need to first find set of all words (dimensions) in the set of documents. Values for all the words that does not appear in the given document is 0

Page 57 Feature Vectors Instead of just using words to represent documents, we can also extract features and use them to represent the document For example, let’s classify History and Physics documents We are given ‘N’ documents which are labeled as ‘HISTORY’ or ‘PHYSICS’ We can extract features like document length (LN), number of nouns (NN), number of verbs (VB), number of person names (PN), number of place (CN) names, number of organization names (ON), number of sentences (NS), number of pronouns (PNN)

Page 58 Feature Vectors Extracting such features you get a feature vector of length ‘K’ where ‘K’ is the number of dimensions (features) for each document Length Noun Count Verb Count # Person Name # Place Name # Orgzn Name … HISTPHYSICSHIST

Page 59 Feature Vectors Length Noun Count Verb Count # Person Name # Place Name # Orgzn Name … HISTPHYSICSHIST After such feature vector representation we can use various learning algorithms including Naïve Bayes, Decision Trees, to classify the new document using the training document set HIST