MATLAB Answers

How to parse noun and adjective words from an array of texts

5 views (last 30 days)
Salad Box
Salad Box on 10 Jun 2019
Edited: Salad Box on 10 Jun 2019
I have an array (n x 1) of strings. See example below.
'I thought about illness'
'I think I associated it with fresh or bright'
'I thought about ice and winter'
For each line/row of strings, I would like to only take the noun and adjective words.
For instance, the first line will be 'illness';
second line will be 'fresh', 'bright';
third line will be 'ice', 'winter'.
  1. How to do that?
  2. How to store those nouns and adjectives?
  3. In this example, all the noun and adjective words have only been mentioned once, what if some words been mentioned more than once in different rows? How do I count how many times one word has been mentioned?
This work is for generating a word cloud later.
Please can you help?


Sign in to comment.

Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by