6
ML-Text Mining Examples in R

ML-Text Mining - data-action-lab.com

  • Upload
    others

  • View
    7

  • Download
    0

Embed Size (px)

Citation preview

Page 1: ML-Text Mining - data-action-lab.com

ML-Text MiningExamples in R

Page 2: ML-Text Mining - data-action-lab.com

Text Mining Demo in R

Previous slides discussed some of the theory behind text mining and NLP.

What does this look like in practice?

In this deck, we’ll take a look at R code that:

Creates a word cloud out of text data stored in a csv fileExtracts key words from text data using an R NLP library

Page 3: ML-Text Mining - data-action-lab.com

WordClouds

• Great for generating a quick visual summary of large amounts of text

• Can be very evocative• The nature of your text will have a strong

impact on the exact effect. Example: Word cloud of restaurant reviews

systemslearning

analysis

data

cell

controldesign

modeling

machine

imaging

energy

theory

modelling

dynamics

processing

protein

materials

models

optimization

development

networks

quantum

engineering

management

interactionsbiology

system

chemistry

computational

gene

change

molecular

computing

climate

ecology

cells

software

model

interaction

stress

methods

spectroscopy

image

simulation

network

functional

structure

water

evolution

transport

surface

flow

signal

regulation

neural

computer

function

magnetic

information

metabolism

microscopy

environmental

carbon

high

processes

algorithms

human

plant

brain

sensing

memory

process

optical

organic

synthesis

deep

proteins

performance

numerical

expression

mass

detection

risk

signaling

natural

behaviour

soil

power

transfer

intelligence

quality

cognitive

physiology

structural

science

resonance

nonlinear

chemical

fluid

genetics

Page 4: ML-Text Mining - data-action-lab.com

WordCloud Code DemoSee supplemental text file for R code.

Page 5: ML-Text Mining - data-action-lab.com

Keyword Extraction

Keyword extraction is still quite a difficult problem. It often relies on NLP, which involves identifying parts of words, rather than text mining, which focuses on statistical patterns.

To carry out keyword extraction you must first match words to their language parts – e.g. noun, verb.

You can play around with the algorithm used to extract keyword by, e.g. placing more emphasis on nouns, verbs, combinations, etc.

Data exploration is useful here.

Page 6: ML-Text Mining - data-action-lab.com

Keyword Extraction DemoSee supplemental text file for R code.