SlideShare una empresa de Scribd logo
1 de 37
Descargar para leer sin conexión
Data Mining:
Concepts and Techniques
Mining Text Data
Mining Text and Web Data


Text mining, natural language processing and
information extraction: An Introduction



Text categorization methods
Mining Text Data: An Introduction
Data Mining / Knowledge Discovery

Structured Data

omeLoan (
oanee: Frank Rizzo
ender: MWF
gency: Lake View
mount: $200,000
erm: 15 years

Multimedia

Free Text

Hypertext

Frank Rizzo bought
his home from Lake
View Real Estate in
1992.
He paid $200,000
under a15-year loan
Loans($200K,[map],...) from MW Financial.

<a href>Frank Rizzo
</a> Bought
<a hef>this home</a>
from <a href>Lake
View Real Estate</a>
In <b>1992</b>.
<p>...
Bag-of-Tokens Approaches
Documents

Four score and seven years
ago our fathers brought forth
on this continent, a new
nation, conceived in Liberty,
and dedicated to the
proposition that all men are
created equal.
Now we are engaged in a
great civil war, testing
whether that nation, or …

Token Sets

Feature
Extraction

nation – 5
civil - 1
war – 2
men – 2
died – 4
people – 5
Liberty – 1
God – 1
…

Loses all order-specific information!
Severely limits context!
Natural Language Processing
A dog is chasing a boy on the playground
Det

Noun Aux

Noun Phrase

Verb

Complex Verb

Semantic analysis
Dog(d1).
Boy(b1).
Playground(p1).
Chasing(d1,b1,p1).

+

Det Noun Prep Det
Noun Phrase

Noun
Noun Phrase

Lexical
analysis
(part-of-speech
tagging)

Prep Phrase
Verb Phrase

Syntactic analysis
(Parsing)
Verb Phrase

Sentence

Scared(x) if Chasing(_,x,_).

Scared(b1)
Inference

(Taken from ChengXiang Zhai, CS 397cxz – Fall 2003)

A person saying this may
be reminding another person to
get the dog back…
Pragmatic analysis
(speech act)
General NLP—Too Difficult!








Word-level ambiguity
 “design” can be a noun or a verb (Ambiguous POS)
 “root” has multiple meanings (Ambiguous sense)
Syntactic ambiguity
 “natural language processing” (Modification)
 “A man saw a boy with a telescope .” (PP Attachment)
Anaphora resolution
 “John persuaded Bill to buy a TV for himself .”
(himself = John or Bill?)
Presupposition
 “He has quit smoking.” implies that he smoked before.

Humans rely on context to interpret (when possible).
This context may extend beyond a given document!
(Taken from ChengXiang Zhai, CS 397cxz – Fall 2003)
Shallow Linguistics
Progress on Useful Sub-Goals:
• English Lexicon
• Part-of-Speech Tagging
• Word Sense Disambiguation
• Phrase Detection / Parsing
WordNet
An extensive lexical network for the English language
• Contains over 138,838 words.
• Several graphs, one for each part-of-speech.
• Synsets (synonym sets), each defining a semantic sense.
• Relationship information (antonym, hyponym, meronym …)
• Downloadable for free (UNIX, Windows)
• Expanding to other languages (Global WordNet Association)
• Funded >$3 million, mainly government (translation interest)
• Founder George Miller, National Medal of Science, 1991.
watery

moist

parched

wet

dry

damp

anhydrous

arid

synonym
antonym
Part-of-Speech Tagging
This
Det

sentence
N

Training data (Annotated
text)
serves as an example of
V1

“This is a new sentence.”

P

Det

N

POS Tagger

P

annotated
V2

text…
N

This is a new
Det Aux Det Adj

sentence.
N

Pick the most1 likely ttag tsequence.
p ( w ,..., wk , 1 ,..., k )

 p (t1 | w1 )... p(tk | wk ) p( w1 )... p( wk )

p ( w1 ,..., wk , t1 ,..., t k ) =  k
Independent assignment
∏ p ( wi | ti ) p (ti | ti −1 )
Most common tag
 =1
 p (t1 | w1 )... p(tk | wk ) p(iw1 )... p ( wk )

= k
∏ p ( wi | ti ) p (ti | ti −1 )
Partial dependency
 i =1
(HMM)
Word Sense Disambiguation
?

“The difficulties of computational linguistics are rooted in ambiguity.”
N
Aux V
P
N
Supervised Learning
Features:
• Neighboring POS tags (N Aux V P N)
• Neighboring words (linguistics are rooted in ambiguity)
• Stemmed form (root)
• Dictionary/Thesaurus entries of neighboring words
• High co-occurrence words (plant, tree, origin,…)
• Other senses of word within discourse
Algorithms:
• Rule-based Learning (e.g. IG guided)
• Statistical Learning (i.e. Naïve Bayes)
• Unsupervised Learning (i.e. Nearest Neighbor)
Parsing
Choose most likely parse tree…

Grammar

Lexicon

V → chasing
Aux→ is
N → dog
N → boy
N→ playground
Det→ the
Det→ a
P → on

Probability of this tree=0.000015

NP

Probabilistic CFG
S→ NP VP
NP → Det BNP
NP → BNP
NP→ NP PP
BNP→ N
VP → V
VP → Aux V NP
VP → VP PP
PP → P NP

S

Det

BNP

A

1.0
0.3
0.4
0.3

N

.
.
.

V

NP

is chasing

P

NP

on
a boy

Probability of this tree=0.000011

S
NP

0.01

Det

0.003

A

…

PP

the playground

1.0

…

VP
Aux

dog

…
…

VP

VP

BNP
N
dog

Aux
is

NP

V
chasing NP

a boy

PP
P

NP

on
the playground
Mining Text and Web Data


Text mining, natural language processing and
information extraction: An Introduction



Text information system and information
retrieval



Text categorization methods



Mining Web linkage structures



Summary
Text Databases and IR




Text databases (document databases)
 Large collections of documents from various sources:
news articles, research papers, books, digital libraries,
e-mail messages, and Web pages, library database, etc.
 Data stored is usually semi-structured
 Traditional information retrieval techniques become
inadequate for the increasingly vast amounts of text
data
Information retrieval
 A field developed in parallel with database systems
 Information is organized into (a large number of)
documents
 Information retrieval problem: locating relevant
documents based on user input, such as keywords or
example documents
Information Retrieval


Typical IR systems





Online library catalogs
Online document management systems

Information retrieval vs. database systems


Some DB problems are not present in IR, e.g., update,
transaction management, complex objects



Some IR problems are not addressed well in DBMS,
e.g., unstructured documents, approximate search
using keywords and relevance
Basic Measures for Text Retrieval

Relevant

Relevant &
Retrieved

Retrieved

All Documents



Precision: the percentage of retrieved documents that are in fact relevant
to the query (i.e., “correct” responses)

| {Relevant} ∩ {Retrieved } |
precision =
| {Retrieved } |


Recall: the percentage of documents that are relevant to the query and
were, in fact, retrieved

Recall

∩
= | {Relevant} {Retrieved } |
| {Relevant} |
Information Retrieval Techniques




Basic Concepts
 A document can be described by a set of
representative keywords called index terms.
 Different index terms have varying relevance when
used to describe document contents.
 This effect is captured through the assignment of
numerical weights to each index term of a document.
(e.g.: frequency, tf-idf)
DBMS Analogy
 Index Terms  Attributes
 Weights  Attribute Values
Information Retrieval Techniques





Index Terms (Attribute) Selection:
 Stop list
 Word stem
 Index terms weighting methods
Terms  Documents Frequency Matrices
Information Retrieval Models:
 Boolean Model
 Vector Model
 Probabilistic Model
Boolean Model






Consider that index terms are either present or
absent in a document
As a result, the index term weights are assumed to
be all binaries
A query is composed of index terms linked by three
connectives: not, and, and or




e.g.: car and repair, plane or airplane

The Boolean model predicts that each document is
either relevant or non-relevant based on the match of
a document to the query
Keyword-Based Retrieval






A document is represented by a string, which can be
identified by a set of keywords
Queries may use expressions of keywords
 E.g., car and repair shop, tea or coffee, DBMS but not
Oracle
 Queries and retrieval should consider synonyms, e.g.,
repair and maintenance
Major difficulties of the model
 Synonymy: A keyword T does not appear anywhere in
the document, even though the document is closely
related to T, e.g., data mining
 Polysemy: The same keyword may mean different
things in different contexts, e.g., mining
Similarity-Based Retrieval in Text
Data







Finds similar documents based on a set of common
keywords
Answer should be based on the degree of relevance
based on the nearness of the keywords, relative frequency
of the keywords, etc.
Basic techniques
Stop list
 Set of words that are deemed “irrelevant”, even
though they may appear frequently
 E.g., a, the, of, for, to, with , etc.
 Stop lists may vary when document set varies
Similarity-Based Retrieval in Text
Data






Word stem
 Several words are small syntactic variants of each
other since they share a common word stem
 E.g., drug, drugs, drugged
A term frequency table
 Each entry frequent_table(i, j) = # of occurrences of
the word ti in document di

Usually, the ratio instead of the absolute number of
occurrences is used
Similarity metrics: measure the closeness of a
document to a query (a set of keywords)

v1 ⋅ v2
Relative term occurrences
sim(v1 , v2 ) =

| v1 || v2 |
Cosine distance:
Indexing Techniques




Inverted index
 Maintains two hash- or B+-tree indexed tables:

document_table: a set of document records <doc_id,
postings_list>
 term_table: a set of term records, <term, postings_list>
 Answer query: Find all docs associated with one or a set of terms
 + easy to implement
 – do not handle well synonymy and polysemy, and posting lists could
be too long (storage could be very large)
Signature file
 Associate a signature with each document
 A signature is a representation of an ordered list of terms that
describe the document
 Order is obtained by frequency analysis, stemming and stop lists
Types of Text Data
Mining










Keyword-based association analysis
Automatic document classification
Similarity detection
 Cluster documents by a common author
 Cluster documents containing information from a
common source
Link analysis: unusual correlation between entities
Sequence analysis: predicting a recurring event
Anomaly detection: find information that violates usual
patterns
Hypertext analysis
 Patterns in anchors/links
 Anchor text correlations with linked objects
Keyword-Based Association
Analysis


Motivation




Collect sets of keywords or terms that occur frequently together and
then find the association or correlation relationships among them

Association Analysis Process




Preprocess the text data by parsing, stemming, removing stop
words, etc.
Evoke association mining algorithms





Consider each document as a transaction
View a set of keywords in the document as a set of items in the
transaction

Term level association mining



No need for human effort in tagging documents
The number of meaningless results and the execution time is greatly
reduced
Text Classification






Motivation
 Automatic classification for the large number of on-line text
documents (Web pages, e-mails, corporate intranets, etc.)
Classification Process
 Data preprocessing
 Definition of training set and test sets
 Creation of the classification model using the selected
classification algorithm
 Classification model validation
 Classification of new/unknown text documents
Text document classification differs from the classification of
relational data
 Document databases are not structured according to attributevalue pairs
Text Classification(2)


Classification Algorithms:
 Support Vector Machines
 K-Nearest Neighbors
 Naïve Bayes
 Neural Networks
 Decision Trees
 Association rule-based
 Boosting
Document Clustering




Motivation
 Automatically group related documents based on their
contents
 No predetermined training sets or taxonomies
 Generate a taxonomy at runtime
Clustering Process
 Data preprocessing: remove stop words, stem, feature
extraction, lexical analysis, etc.
 Hierarchical clustering: compute similarities applying
clustering algorithms.
 Model-Based clustering (Neural Network Approach):
clusters are represented by “exemplars”. (e.g.: SOM)
Text Categorization





Pre-given categories and labeled document
examples (Categories may form hierarchy)
Classify new documents
A standard classification (supervised learning )
problem
Sports

Categorization
System

Business
Education

Sports
Business
Education

…

…

Science
Applications






News article classification
Automatic email filtering
Webpage classification
Word sense disambiguation
……
Categorization Methods




Manual: Typically rule-based
 Does not scale up (labor-intensive, rule inconsistency)
 May be appropriate for special data on a particular
domain
Automatic: Typically exploiting machine learning techniques
 Vector space model based








Prototype-based (Rocchio)
K-nearest neighbor (KNN)
Decision-tree (learn rules)
Neural Networks (learn non-linear classifier)
Support Vector Machines (SVM)

Probabilistic or generative model based


Naïve Bayes classifier
Vector Space Model


Represent a doc by a term vector



Each term defines one dimension



N terms define a N-dimensional space



Element of vector corresponds to term weight





Term: basic concept, e.g., word or phrase

E.g., d = (x1,…,xN), xi is “importance” of term i

New document is assigned to the most likely category
based on vector similarity.
VS Model: Illustration
Starbucks
C2

Category 2

Category 3
C3

new doc

Microsoft

Java

C1 Category 1
What VS Model Does Not
Specify






How to select terms to capture “basic concepts”
 Word stopping

e.g. “a”, “the”, “always”, “along”
 Word stemming
 e.g. “computer”, “computing”, “computerize” =>
“compute”
 Latent semantic indexing
How to assign weights
 Not all words are equally important: Some are more
indicative than others
 e.g. “algebra” vs. “science”
How to measure the similarity
How to Assign Weights


Two-fold heuristics based on frequency
 TF (Term frequency)






More frequent within a document  more relevant
to semantics
e.g., “query” vs. “commercial”

IDF (Inverse document frequency)




Less frequent among documents  more
discriminative
e.g. “algebra” vs. “science”
TF Weighting


Weighting:


More frequent => more relevant to topic





e.g. “query” vs. “commercial”
Raw TF= f(t,d): how many times term t appears in
doc d

Normalization:


Document length varies => relative frequency preferred


e.g., Maximum frequency normalization
How to Measure Similarity?




Given two document
Similarity definition
 dot product



normalized dot product (or cosine)
Illustrative Example
doc1

text
mining
search
engine
text

travel
text

doc2

Sim(newdoc,doc1)=4.8*2.4+4.5*4.5
Sim(newdoc,doc2)=2.4*2.4

Sim(newdoc,doc3)=0

map
travel
text
IDF(faked) 2.4

doc3

To whom is newdoc
more similar?

government
president
congress

……

mining travel
4.5
2.8

doc1
doc2
doc3

2(4.8) 1(4.5)
1(2.4 )

newdoc

1(2.4) 1(4.5)

map search engine govern president congress
3.3
2.1
5.4
2.2
3.2
4.3
1(2.1)

1(5.4)

2 (5.6) 1(3.3)
1 (2.2) 1(3.2)

1(4.3)

Más contenido relacionado

La actualidad más candente

Textmining Information Extraction
Textmining Information ExtractionTextmining Information Extraction
Textmining Information Extractionguest0edcaf
 
Techniques of information retrieval
Techniques of information retrieval Techniques of information retrieval
Techniques of information retrieval Tariq Hassan
 
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...shakimov
 
Lecture: Summarization
Lecture: SummarizationLecture: Summarization
Lecture: SummarizationMarina Santini
 
Machine learning-and-data-mining-19-mining-text-and-web-data
Machine learning-and-data-mining-19-mining-text-and-web-dataMachine learning-and-data-mining-19-mining-text-and-web-data
Machine learning-and-data-mining-19-mining-text-and-web-dataitstuff
 
Presentation of OpenNLP
Presentation of OpenNLPPresentation of OpenNLP
Presentation of OpenNLPRobert Viseur
 
Survey of Generative Clustering Models 2008
Survey of Generative Clustering Models 2008Survey of Generative Clustering Models 2008
Survey of Generative Clustering Models 2008Roman Stanchak
 
Conceptual foundations of text mining and preprocessing steps nfaoui el_habib
Conceptual foundations of text mining and preprocessing steps nfaoui el_habibConceptual foundations of text mining and preprocessing steps nfaoui el_habib
Conceptual foundations of text mining and preprocessing steps nfaoui el_habibEl Habib NFAOUI
 
Introduction to natural language processing (NLP)
Introduction to natural language processing (NLP)Introduction to natural language processing (NLP)
Introduction to natural language processing (NLP)Alia Hamwi
 
Text mining, By Hadi Mohammadzadeh
Text mining, By Hadi MohammadzadehText mining, By Hadi Mohammadzadeh
Text mining, By Hadi MohammadzadehHadi Mohammadzadeh
 
DistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talk
DistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talkDistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talk
DistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talkGezim Sejdiu
 
Elements of Text Mining Part - I
Elements of Text Mining Part - IElements of Text Mining Part - I
Elements of Text Mining Part - IJaganadh Gopinadhan
 

La actualidad más candente (19)

Textmining Information Extraction
Textmining Information ExtractionTextmining Information Extraction
Textmining Information Extraction
 
Linked (Open) Data
Linked (Open) DataLinked (Open) Data
Linked (Open) Data
 
NLTK
NLTKNLTK
NLTK
 
Techniques of information retrieval
Techniques of information retrieval Techniques of information retrieval
Techniques of information retrieval
 
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
Learning Multilingual Semantic Parsers for Question Answering over Linked Dat...
 
Lecture: Summarization
Lecture: SummarizationLecture: Summarization
Lecture: Summarization
 
Machine learning-and-data-mining-19-mining-text-and-web-data
Machine learning-and-data-mining-19-mining-text-and-web-dataMachine learning-and-data-mining-19-mining-text-and-web-data
Machine learning-and-data-mining-19-mining-text-and-web-data
 
SWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDFSWT Lecture Session 2 - RDF
SWT Lecture Session 2 - RDF
 
Presentation of OpenNLP
Presentation of OpenNLPPresentation of OpenNLP
Presentation of OpenNLP
 
Survey of Generative Clustering Models 2008
Survey of Generative Clustering Models 2008Survey of Generative Clustering Models 2008
Survey of Generative Clustering Models 2008
 
Conceptual foundations of text mining and preprocessing steps nfaoui el_habib
Conceptual foundations of text mining and preprocessing steps nfaoui el_habibConceptual foundations of text mining and preprocessing steps nfaoui el_habib
Conceptual foundations of text mining and preprocessing steps nfaoui el_habib
 
OpenNLP demo
OpenNLP demoOpenNLP demo
OpenNLP demo
 
Introduction to natural language processing (NLP)
Introduction to natural language processing (NLP)Introduction to natural language processing (NLP)
Introduction to natural language processing (NLP)
 
Tesxt mining
Tesxt miningTesxt mining
Tesxt mining
 
SWT Lecture Session 8 - Rules
SWT Lecture Session 8 - RulesSWT Lecture Session 8 - Rules
SWT Lecture Session 8 - Rules
 
Text mining, By Hadi Mohammadzadeh
Text mining, By Hadi MohammadzadehText mining, By Hadi Mohammadzadeh
Text mining, By Hadi Mohammadzadeh
 
Text mining
Text miningText mining
Text mining
 
DistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talk
DistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talkDistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talk
DistLODStats: Distributed Computation of RDF Dataset Statistics - ISWC 2018 talk
 
Elements of Text Mining Part - I
Elements of Text Mining Part - IElements of Text Mining Part - I
Elements of Text Mining Part - I
 

Destacado

Analytics machine learning in weka
Analytics machine learning in wekaAnalytics machine learning in weka
Analytics machine learning in wekaSudhakar Chavan
 
WEKA: A Useful Tool for Air Quality Forecasting
WEKA: A Useful Tool for Air Quality ForecastingWEKA: A Useful Tool for Air Quality Forecasting
WEKA: A Useful Tool for Air Quality Forecastingbutest
 
WebSite Visit Forecasting Using Data Mining Techniques
WebSite Visit Forecasting Using Data Mining  TechniquesWebSite Visit Forecasting Using Data Mining  Techniques
WebSite Visit Forecasting Using Data Mining TechniquesChandana Napagoda
 
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)Ankit Pandey
 
Machine Learning and Data Mining: 19 Mining Text And Web Data
Machine Learning and Data Mining: 19 Mining Text And Web DataMachine Learning and Data Mining: 19 Mining Text And Web Data
Machine Learning and Data Mining: 19 Mining Text And Web DataPier Luca Lanzi
 

Destacado (6)

Thesaurus based Index Term Extraction
Thesaurus based Index Term ExtractionThesaurus based Index Term Extraction
Thesaurus based Index Term Extraction
 
Analytics machine learning in weka
Analytics machine learning in wekaAnalytics machine learning in weka
Analytics machine learning in weka
 
WEKA: A Useful Tool for Air Quality Forecasting
WEKA: A Useful Tool for Air Quality ForecastingWEKA: A Useful Tool for Air Quality Forecasting
WEKA: A Useful Tool for Air Quality Forecasting
 
WebSite Visit Forecasting Using Data Mining Techniques
WebSite Visit Forecasting Using Data Mining  TechniquesWebSite Visit Forecasting Using Data Mining  Techniques
WebSite Visit Forecasting Using Data Mining Techniques
 
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
Data Mining Techniques using WEKA (Ankit Pandey-10BM60012)
 
Machine Learning and Data Mining: 19 Mining Text And Web Data
Machine Learning and Data Mining: 19 Mining Text And Web DataMachine Learning and Data Mining: 19 Mining Text And Web Data
Machine Learning and Data Mining: 19 Mining Text And Web Data
 

Similar a Web and text

Neural Text Embeddings for Information Retrieval (WSDM 2017)
Neural Text Embeddings for Information Retrieval (WSDM 2017)Neural Text Embeddings for Information Retrieval (WSDM 2017)
Neural Text Embeddings for Information Retrieval (WSDM 2017)Bhaskar Mitra
 
Semantic Search Component
Semantic Search ComponentSemantic Search Component
Semantic Search ComponentMario Flecha
 
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...Iman Mirrezaei
 
Chapter 2: Text Operation in information stroage and retrieval
Chapter 2: Text Operation in information stroage and retrievalChapter 2: Text Operation in information stroage and retrieval
Chapter 2: Text Operation in information stroage and retrievalcaptainmactavish1996
 
IE: Named Entity Recognition (NER)
IE: Named Entity Recognition (NER)IE: Named Entity Recognition (NER)
IE: Named Entity Recognition (NER)Marina Santini
 
Chapter 2 Text Operation and Term Weighting.pdf
Chapter 2 Text Operation and Term Weighting.pdfChapter 2 Text Operation and Term Weighting.pdf
Chapter 2 Text Operation and Term Weighting.pdfJemalNesre1
 
Deep Learning for Search
Deep Learning for SearchDeep Learning for Search
Deep Learning for SearchBhaskar Mitra
 
Text mining and analytics v6 - p1
Text mining and analytics   v6 - p1Text mining and analytics   v6 - p1
Text mining and analytics v6 - p1Dave King
 
Topic models, vector semantics and applications
Topic models, vector semantics and applicationsTopic models, vector semantics and applications
Topic models, vector semantics and applicationsVasileios Lampos
 
Information Retrieval
Information Retrieval Information Retrieval
Information Retrieval ShujaatZaheer3
 
Enriching the semantic web tutorial session 1
Enriching the semantic web tutorial session 1Enriching the semantic web tutorial session 1
Enriching the semantic web tutorial session 1Tobias Wunner
 
PPT slides
PPT slidesPPT slides
PPT slidesbutest
 
An-Exploration-of-scientific-literature-using-Natural-Language-Processing
An-Exploration-of-scientific-literature-using-Natural-Language-ProcessingAn-Exploration-of-scientific-literature-using-Natural-Language-Processing
An-Exploration-of-scientific-literature-using-Natural-Language-ProcessingTheodore J. LaGrow
 

Similar a Web and text (20)

Neural Text Embeddings for Information Retrieval (WSDM 2017)
Neural Text Embeddings for Information Retrieval (WSDM 2017)Neural Text Embeddings for Information Retrieval (WSDM 2017)
Neural Text Embeddings for Information Retrieval (WSDM 2017)
 
Semantic Search Component
Semantic Search ComponentSemantic Search Component
Semantic Search Component
 
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
The Triplex Approach for Recognizing Semantic Relations from Noun Phrases, Ap...
 
Text Mining
Text MiningText Mining
Text Mining
 
Chapter 2: Text Operation in information stroage and retrieval
Chapter 2: Text Operation in information stroage and retrievalChapter 2: Text Operation in information stroage and retrieval
Chapter 2: Text Operation in information stroage and retrieval
 
NLP
NLPNLP
NLP
 
NLP
NLPNLP
NLP
 
IE: Named Entity Recognition (NER)
IE: Named Entity Recognition (NER)IE: Named Entity Recognition (NER)
IE: Named Entity Recognition (NER)
 
Chapter 2 Text Operation and Term Weighting.pdf
Chapter 2 Text Operation and Term Weighting.pdfChapter 2 Text Operation and Term Weighting.pdf
Chapter 2 Text Operation and Term Weighting.pdf
 
Some Information Retrieval Models and Our Experiments for TREC KBA
Some Information Retrieval Models and Our Experiments for TREC KBASome Information Retrieval Models and Our Experiments for TREC KBA
Some Information Retrieval Models and Our Experiments for TREC KBA
 
Deep Learning for Search
Deep Learning for SearchDeep Learning for Search
Deep Learning for Search
 
Text mining and analytics v6 - p1
Text mining and analytics   v6 - p1Text mining and analytics   v6 - p1
Text mining and analytics v6 - p1
 
Topic models, vector semantics and applications
Topic models, vector semantics and applicationsTopic models, vector semantics and applications
Topic models, vector semantics and applications
 
Information Retrieval
Information Retrieval Information Retrieval
Information Retrieval
 
Enriching the semantic web tutorial session 1
Enriching the semantic web tutorial session 1Enriching the semantic web tutorial session 1
Enriching the semantic web tutorial session 1
 
Week12
Week12Week12
Week12
 
PPT slides
PPT slidesPPT slides
PPT slides
 
text
texttext
text
 
An-Exploration-of-scientific-literature-using-Natural-Language-Processing
An-Exploration-of-scientific-literature-using-Natural-Language-ProcessingAn-Exploration-of-scientific-literature-using-Natural-Language-Processing
An-Exploration-of-scientific-literature-using-Natural-Language-Processing
 
Topical_Facets
Topical_FacetsTopical_Facets
Topical_Facets
 

Más de Institute of Technology Telkom

Más de Institute of Technology Telkom (20)

Econopysics
EconopysicsEconopysics
Econopysics
 
Science and religion 100622120615-phpapp01
Science and religion 100622120615-phpapp01Science and religion 100622120615-phpapp01
Science and religion 100622120615-phpapp01
 
Konvergensi sains dan_spiritualitas
Konvergensi sains dan_spiritualitasKonvergensi sains dan_spiritualitas
Konvergensi sains dan_spiritualitas
 
Matematika arah kiblat mikrajuddin abdullah 2017
Matematika arah kiblat   mikrajuddin abdullah 2017Matematika arah kiblat   mikrajuddin abdullah 2017
Matematika arah kiblat mikrajuddin abdullah 2017
 
Iau solar effects 2005
Iau solar effects 2005Iau solar effects 2005
Iau solar effects 2005
 
Hfmsilri2jun14
Hfmsilri2jun14Hfmsilri2jun14
Hfmsilri2jun14
 
Fisika komputasi
Fisika komputasiFisika komputasi
Fisika komputasi
 
Computer Aided Process Planning
Computer Aided Process PlanningComputer Aided Process Planning
Computer Aided Process Planning
 
Archimedes
ArchimedesArchimedes
Archimedes
 
Web data mining
Web data miningWeb data mining
Web data mining
 
Time series Forecasting using svm
Time series Forecasting using  svmTime series Forecasting using  svm
Time series Forecasting using svm
 
Timeseries forecasting
Timeseries forecastingTimeseries forecasting
Timeseries forecasting
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
World population 1950--2050
World population 1950--2050World population 1950--2050
World population 1950--2050
 
neural networks
 neural networks neural networks
neural networks
 
Artificial neural networks
Artificial neural networks Artificial neural networks
Artificial neural networks
 
002 ray modeling dynamic systems
002 ray modeling dynamic systems002 ray modeling dynamic systems
002 ray modeling dynamic systems
 
002 ray modeling dynamic systems
002 ray modeling dynamic systems002 ray modeling dynamic systems
002 ray modeling dynamic systems
 
System dynamics majors fair
System dynamics majors fairSystem dynamics majors fair
System dynamics majors fair
 
System dynamics math representation
System dynamics math representationSystem dynamics math representation
System dynamics math representation
 

Último

PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEPART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEMISSRITIMABIOLOGYEXP
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxMadhavi Dharankar
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research DiscourseAnita GoswamiGiri
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptxmary850239
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineCeline George
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
The role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipThe role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipKarl Donert
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...Nguyen Thanh Tu Collection
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfChristalin Nelson
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsArubSultan
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfChristalin Nelson
 

Último (20)

PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFEPART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
PART 1 - CHAPTER 1 - CELL THE FUNDAMENTAL UNIT OF LIFE
 
Objectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptxObjectives n learning outcoms - MD 20240404.pptx
Objectives n learning outcoms - MD 20240404.pptx
 
Scientific Writing :Research Discourse
Scientific  Writing :Research  DiscourseScientific  Writing :Research  Discourse
Scientific Writing :Research Discourse
 
Paradigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTAParadigm shift in nursing research by RS MEHTA
Paradigm shift in nursing research by RS MEHTA
 
4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx4.9.24 Social Capital and Social Exclusion.pptx
4.9.24 Social Capital and Social Exclusion.pptx
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
How to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command LineHow to Uninstall a Module in Odoo 17 Using Command Line
How to Uninstall a Module in Odoo 17 Using Command Line
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
Plagiarism,forms,understand about plagiarism,avoid plagiarism,key significanc...
 
The role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenshipThe role of Geography in climate education: science and active citizenship
The role of Geography in climate education: science and active citizenship
 
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
Mattingly "AI & Prompt Design" - Introduction to Machine Learning"
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
BÀI TẬP BỔ TRỢ TIẾNG ANH 8 - I-LEARN SMART WORLD - CẢ NĂM - CÓ FILE NGHE (BẢN...
 
DBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdfDBMSArchitecture_QueryProcessingandOptimization.pdf
DBMSArchitecture_QueryProcessingandOptimization.pdf
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
Shark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristicsShark introduction Morphology and its behaviour characteristics
Shark introduction Morphology and its behaviour characteristics
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
DiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdfDiskStorage_BasicFileStructuresandHashing.pdf
DiskStorage_BasicFileStructuresandHashing.pdf
 

Web and text

  • 1. Data Mining: Concepts and Techniques Mining Text Data
  • 2. Mining Text and Web Data  Text mining, natural language processing and information extraction: An Introduction  Text categorization methods
  • 3. Mining Text Data: An Introduction Data Mining / Knowledge Discovery Structured Data omeLoan ( oanee: Frank Rizzo ender: MWF gency: Lake View mount: $200,000 erm: 15 years Multimedia Free Text Hypertext Frank Rizzo bought his home from Lake View Real Estate in 1992. He paid $200,000 under a15-year loan Loans($200K,[map],...) from MW Financial. <a href>Frank Rizzo </a> Bought <a hef>this home</a> from <a href>Lake View Real Estate</a> In <b>1992</b>. <p>...
  • 4. Bag-of-Tokens Approaches Documents Four score and seven years ago our fathers brought forth on this continent, a new nation, conceived in Liberty, and dedicated to the proposition that all men are created equal. Now we are engaged in a great civil war, testing whether that nation, or … Token Sets Feature Extraction nation – 5 civil - 1 war – 2 men – 2 died – 4 people – 5 Liberty – 1 God – 1 … Loses all order-specific information! Severely limits context!
  • 5. Natural Language Processing A dog is chasing a boy on the playground Det Noun Aux Noun Phrase Verb Complex Verb Semantic analysis Dog(d1). Boy(b1). Playground(p1). Chasing(d1,b1,p1). + Det Noun Prep Det Noun Phrase Noun Noun Phrase Lexical analysis (part-of-speech tagging) Prep Phrase Verb Phrase Syntactic analysis (Parsing) Verb Phrase Sentence Scared(x) if Chasing(_,x,_). Scared(b1) Inference (Taken from ChengXiang Zhai, CS 397cxz – Fall 2003) A person saying this may be reminding another person to get the dog back… Pragmatic analysis (speech act)
  • 6. General NLP—Too Difficult!     Word-level ambiguity  “design” can be a noun or a verb (Ambiguous POS)  “root” has multiple meanings (Ambiguous sense) Syntactic ambiguity  “natural language processing” (Modification)  “A man saw a boy with a telescope .” (PP Attachment) Anaphora resolution  “John persuaded Bill to buy a TV for himself .” (himself = John or Bill?) Presupposition  “He has quit smoking.” implies that he smoked before. Humans rely on context to interpret (when possible). This context may extend beyond a given document! (Taken from ChengXiang Zhai, CS 397cxz – Fall 2003)
  • 7. Shallow Linguistics Progress on Useful Sub-Goals: • English Lexicon • Part-of-Speech Tagging • Word Sense Disambiguation • Phrase Detection / Parsing
  • 8. WordNet An extensive lexical network for the English language • Contains over 138,838 words. • Several graphs, one for each part-of-speech. • Synsets (synonym sets), each defining a semantic sense. • Relationship information (antonym, hyponym, meronym …) • Downloadable for free (UNIX, Windows) • Expanding to other languages (Global WordNet Association) • Funded >$3 million, mainly government (translation interest) • Founder George Miller, National Medal of Science, 1991. watery moist parched wet dry damp anhydrous arid synonym antonym
  • 9. Part-of-Speech Tagging This Det sentence N Training data (Annotated text) serves as an example of V1 “This is a new sentence.” P Det N POS Tagger P annotated V2 text… N This is a new Det Aux Det Adj sentence. N Pick the most1 likely ttag tsequence. p ( w ,..., wk , 1 ,..., k )  p (t1 | w1 )... p(tk | wk ) p( w1 )... p( wk )  p ( w1 ,..., wk , t1 ,..., t k ) =  k Independent assignment ∏ p ( wi | ti ) p (ti | ti −1 ) Most common tag  =1  p (t1 | w1 )... p(tk | wk ) p(iw1 )... p ( wk )  = k ∏ p ( wi | ti ) p (ti | ti −1 ) Partial dependency  i =1 (HMM)
  • 10. Word Sense Disambiguation ? “The difficulties of computational linguistics are rooted in ambiguity.” N Aux V P N Supervised Learning Features: • Neighboring POS tags (N Aux V P N) • Neighboring words (linguistics are rooted in ambiguity) • Stemmed form (root) • Dictionary/Thesaurus entries of neighboring words • High co-occurrence words (plant, tree, origin,…) • Other senses of word within discourse Algorithms: • Rule-based Learning (e.g. IG guided) • Statistical Learning (i.e. Naïve Bayes) • Unsupervised Learning (i.e. Nearest Neighbor)
  • 11. Parsing Choose most likely parse tree… Grammar Lexicon V → chasing Aux→ is N → dog N → boy N→ playground Det→ the Det→ a P → on Probability of this tree=0.000015 NP Probabilistic CFG S→ NP VP NP → Det BNP NP → BNP NP→ NP PP BNP→ N VP → V VP → Aux V NP VP → VP PP PP → P NP S Det BNP A 1.0 0.3 0.4 0.3 N . . . V NP is chasing P NP on a boy Probability of this tree=0.000011 S NP 0.01 Det 0.003 A … PP the playground 1.0 … VP Aux dog … … VP VP BNP N dog Aux is NP V chasing NP a boy PP P NP on the playground
  • 12. Mining Text and Web Data  Text mining, natural language processing and information extraction: An Introduction  Text information system and information retrieval  Text categorization methods  Mining Web linkage structures  Summary
  • 13. Text Databases and IR   Text databases (document databases)  Large collections of documents from various sources: news articles, research papers, books, digital libraries, e-mail messages, and Web pages, library database, etc.  Data stored is usually semi-structured  Traditional information retrieval techniques become inadequate for the increasingly vast amounts of text data Information retrieval  A field developed in parallel with database systems  Information is organized into (a large number of) documents  Information retrieval problem: locating relevant documents based on user input, such as keywords or example documents
  • 14. Information Retrieval  Typical IR systems    Online library catalogs Online document management systems Information retrieval vs. database systems  Some DB problems are not present in IR, e.g., update, transaction management, complex objects  Some IR problems are not addressed well in DBMS, e.g., unstructured documents, approximate search using keywords and relevance
  • 15. Basic Measures for Text Retrieval Relevant Relevant & Retrieved Retrieved All Documents  Precision: the percentage of retrieved documents that are in fact relevant to the query (i.e., “correct” responses) | {Relevant} ∩ {Retrieved } | precision = | {Retrieved } |  Recall: the percentage of documents that are relevant to the query and were, in fact, retrieved Recall ∩ = | {Relevant} {Retrieved } | | {Relevant} |
  • 16. Information Retrieval Techniques   Basic Concepts  A document can be described by a set of representative keywords called index terms.  Different index terms have varying relevance when used to describe document contents.  This effect is captured through the assignment of numerical weights to each index term of a document. (e.g.: frequency, tf-idf) DBMS Analogy  Index Terms  Attributes  Weights  Attribute Values
  • 17. Information Retrieval Techniques    Index Terms (Attribute) Selection:  Stop list  Word stem  Index terms weighting methods Terms  Documents Frequency Matrices Information Retrieval Models:  Boolean Model  Vector Model  Probabilistic Model
  • 18. Boolean Model    Consider that index terms are either present or absent in a document As a result, the index term weights are assumed to be all binaries A query is composed of index terms linked by three connectives: not, and, and or   e.g.: car and repair, plane or airplane The Boolean model predicts that each document is either relevant or non-relevant based on the match of a document to the query
  • 19. Keyword-Based Retrieval    A document is represented by a string, which can be identified by a set of keywords Queries may use expressions of keywords  E.g., car and repair shop, tea or coffee, DBMS but not Oracle  Queries and retrieval should consider synonyms, e.g., repair and maintenance Major difficulties of the model  Synonymy: A keyword T does not appear anywhere in the document, even though the document is closely related to T, e.g., data mining  Polysemy: The same keyword may mean different things in different contexts, e.g., mining
  • 20. Similarity-Based Retrieval in Text Data     Finds similar documents based on a set of common keywords Answer should be based on the degree of relevance based on the nearness of the keywords, relative frequency of the keywords, etc. Basic techniques Stop list  Set of words that are deemed “irrelevant”, even though they may appear frequently  E.g., a, the, of, for, to, with , etc.  Stop lists may vary when document set varies
  • 21. Similarity-Based Retrieval in Text Data    Word stem  Several words are small syntactic variants of each other since they share a common word stem  E.g., drug, drugs, drugged A term frequency table  Each entry frequent_table(i, j) = # of occurrences of the word ti in document di  Usually, the ratio instead of the absolute number of occurrences is used Similarity metrics: measure the closeness of a document to a query (a set of keywords)  v1 ⋅ v2 Relative term occurrences sim(v1 , v2 ) =  | v1 || v2 | Cosine distance:
  • 22. Indexing Techniques   Inverted index  Maintains two hash- or B+-tree indexed tables:  document_table: a set of document records <doc_id, postings_list>  term_table: a set of term records, <term, postings_list>  Answer query: Find all docs associated with one or a set of terms  + easy to implement  – do not handle well synonymy and polysemy, and posting lists could be too long (storage could be very large) Signature file  Associate a signature with each document  A signature is a representation of an ordered list of terms that describe the document  Order is obtained by frequency analysis, stemming and stop lists
  • 23. Types of Text Data Mining        Keyword-based association analysis Automatic document classification Similarity detection  Cluster documents by a common author  Cluster documents containing information from a common source Link analysis: unusual correlation between entities Sequence analysis: predicting a recurring event Anomaly detection: find information that violates usual patterns Hypertext analysis  Patterns in anchors/links  Anchor text correlations with linked objects
  • 24. Keyword-Based Association Analysis  Motivation   Collect sets of keywords or terms that occur frequently together and then find the association or correlation relationships among them Association Analysis Process   Preprocess the text data by parsing, stemming, removing stop words, etc. Evoke association mining algorithms    Consider each document as a transaction View a set of keywords in the document as a set of items in the transaction Term level association mining   No need for human effort in tagging documents The number of meaningless results and the execution time is greatly reduced
  • 25. Text Classification    Motivation  Automatic classification for the large number of on-line text documents (Web pages, e-mails, corporate intranets, etc.) Classification Process  Data preprocessing  Definition of training set and test sets  Creation of the classification model using the selected classification algorithm  Classification model validation  Classification of new/unknown text documents Text document classification differs from the classification of relational data  Document databases are not structured according to attributevalue pairs
  • 26. Text Classification(2)  Classification Algorithms:  Support Vector Machines  K-Nearest Neighbors  Naïve Bayes  Neural Networks  Decision Trees  Association rule-based  Boosting
  • 27. Document Clustering   Motivation  Automatically group related documents based on their contents  No predetermined training sets or taxonomies  Generate a taxonomy at runtime Clustering Process  Data preprocessing: remove stop words, stem, feature extraction, lexical analysis, etc.  Hierarchical clustering: compute similarities applying clustering algorithms.  Model-Based clustering (Neural Network Approach): clusters are represented by “exemplars”. (e.g.: SOM)
  • 28. Text Categorization    Pre-given categories and labeled document examples (Categories may form hierarchy) Classify new documents A standard classification (supervised learning ) problem Sports Categorization System Business Education Sports Business Education … … Science
  • 29. Applications      News article classification Automatic email filtering Webpage classification Word sense disambiguation ……
  • 30. Categorization Methods   Manual: Typically rule-based  Does not scale up (labor-intensive, rule inconsistency)  May be appropriate for special data on a particular domain Automatic: Typically exploiting machine learning techniques  Vector space model based       Prototype-based (Rocchio) K-nearest neighbor (KNN) Decision-tree (learn rules) Neural Networks (learn non-linear classifier) Support Vector Machines (SVM) Probabilistic or generative model based  Naïve Bayes classifier
  • 31. Vector Space Model  Represent a doc by a term vector   Each term defines one dimension  N terms define a N-dimensional space  Element of vector corresponds to term weight   Term: basic concept, e.g., word or phrase E.g., d = (x1,…,xN), xi is “importance” of term i New document is assigned to the most likely category based on vector similarity.
  • 32. VS Model: Illustration Starbucks C2 Category 2 Category 3 C3 new doc Microsoft Java C1 Category 1
  • 33. What VS Model Does Not Specify    How to select terms to capture “basic concepts”  Word stopping  e.g. “a”, “the”, “always”, “along”  Word stemming  e.g. “computer”, “computing”, “computerize” => “compute”  Latent semantic indexing How to assign weights  Not all words are equally important: Some are more indicative than others  e.g. “algebra” vs. “science” How to measure the similarity
  • 34. How to Assign Weights  Two-fold heuristics based on frequency  TF (Term frequency)    More frequent within a document  more relevant to semantics e.g., “query” vs. “commercial” IDF (Inverse document frequency)   Less frequent among documents  more discriminative e.g. “algebra” vs. “science”
  • 35. TF Weighting  Weighting:  More frequent => more relevant to topic    e.g. “query” vs. “commercial” Raw TF= f(t,d): how many times term t appears in doc d Normalization:  Document length varies => relative frequency preferred  e.g., Maximum frequency normalization
  • 36. How to Measure Similarity?   Given two document Similarity definition  dot product  normalized dot product (or cosine)
  • 37. Illustrative Example doc1 text mining search engine text travel text doc2 Sim(newdoc,doc1)=4.8*2.4+4.5*4.5 Sim(newdoc,doc2)=2.4*2.4 Sim(newdoc,doc3)=0 map travel text IDF(faked) 2.4 doc3 To whom is newdoc more similar? government president congress …… mining travel 4.5 2.8 doc1 doc2 doc3 2(4.8) 1(4.5) 1(2.4 ) newdoc 1(2.4) 1(4.5) map search engine govern president congress 3.3 2.1 5.4 2.2 3.2 4.3 1(2.1) 1(5.4) 2 (5.6) 1(3.3) 1 (2.2) 1(3.2) 1(4.3)

Notas del editor

  1. &lt;number&gt; Throughout this course we have been discussing Data Mining over a variety of data types. Two former types we covered were Structured Data (relational) and multimedia data. Today and in the last class we have been discussing Data Mining over free text, and our next section will cover hypertext, such as web pages. Text mining is well motivated, due to the fact that much of the world’s data can be found in free text form (newspaper articles, emails, literature, etc.). There is a lot of information available to mine. While mining free text has the same goals as data mining in general (extracting useful knowledge/stats/trends), text mining must overcome a major difficulty – there is no explicit structure. Machines can reason will relational data well since schemas are explicitly available. Free text, however, encodes all semantic information within natural language. Our text mining algorithms, then, must make some sense out of this natural language representation. Humans are great at doing this, but this has proved to be a problem for machines.
  2. &lt;number&gt; The previous text mining presentations “made sense” out of free text by viewing text as a bag-of-tokens (words, n-grams). This is the same approach as IR. Under that model we can already summarize, classify, cluster, and compute co-occurrence stats over free text. These are quite useful for mining and managing large volumes of free text. However, there is a potential to do much more. The BOT approach loses a LOT of information contained in text, such as word order, sentence structure, and context. These are precisely the features that humans use to interpret text. Thus the natural question is can we do better?
  3. &lt;number&gt; NLP, or Computational Linguistics, is an entire field dedicated to the study of automatically understanding free text. This field has been active since the 50’s. General NLP attempts to understand document completely (at the level of a human reader). There are several steps involved in NLP. …Blah…
  4. &lt;number&gt; General NLP has proven to be too difficult. It is dubbed “AI-Complete”, meaning that such a program would basically have to have near-human intelligence (i.e. solve AI). The reason NLP in general is so difficult is that text is highly ambiguous. NL is meant for human consumption and often contains ambiguities under the assumption that humans will be able to develop context and interpret the intended meaning. For instance [rewind], in this example the sentence could mean that either the dog, or the boy, or both are on the playground. As a human we know that it is probably both, but that is due to our knowledge that a dog is probably chasing close behind the boy, playgrounds are large, they are probably playing, and a playground is a place to play. This background knowledge probably is not contained in a document containing this sentence. Despite such obstacles, computational linguists have made great progress on several subproblems. We will now talk about four of these subproblems.
  5. &lt;number&gt; Several subgoals to NLP have been addressed to derive more info than just bag-of-tokens view. English lexicon, POS Tagging, WSD, Parsing Even with imperfect performance, these solutions already open the door for more intelligent text processing.
  6. &lt;number&gt; WordNet is an extensive lexical network for the human language. Consists of a graph of synsets for each part of speech. Contains synonym and antonym relationships. (hyponym=isa/subset, maple is a tree -&gt; maple is a hyponym of tree) (meronym=hasa, tree has a leaf -&gt; leaf is a meronym of tree) As will see, this is useful throughout NLP/ShallowLinguistics. This encodes some of the lexicon that humans carry with them when interpreting text.
  7. &lt;number&gt; POS Tagging attempts to label each word with the appropriate part of speech. Past approaches were rule-based (manual, then learned). Current trend, however, is toward statistical approaches (HMM). This shift is common throughout NLP, due to the ability of statistical approaches to robustly handle noise and/or unexpected events. Conceptually statistical approaches are more fitting due to the fact that uncertainty is sometimes unavoidable (ambiguity). Current algorithms (Brill’s Tagger, CLAWS taggers) report accuracy in the 97% range.
  8. &lt;number&gt; WSD attempts to resolve ambiguity by labeling each word with a precise sense, as intended in the document. This is typically performed after POS tagging, since POS tags are quite useful for WSD. Current approaches address this as a supervised learning problem. Features include neighboring words w/ POS tags, stemmed form of word, high co-occurrence words (with stem). Quite a few supervised learning algorithms have been applied (rule-lists, bayesian, NN). Performance depends heavily upon the particular text, but from what I’ve read 90%+ accuracy is common.
  9. &lt;number&gt; Parsing attempts to infer the precise grammatical relationships between different words in a given sentence. For example, POS are grouped into phrases and phrases are combined into sentences. Approaches include parsing with probabilistic CFG’s, “link dictionaries”, and tree adjoining techniques (super-tagging). Current techniques can only parse at the sentence level, in some cases reporting accuracy in the 90% range. Again, the performance heavily depends upon the grammatical correctness and the degree of ambiguity of the text.