Hello,
I'm trying to do text classification by using Matlab. While I got struck in the beginning. I have training data in csv file like {bug fixes; stability improved; new feature added} And how can I convert it into a cell array with a single word in each cell, like {bug;fixes;stability;improved;...}?
I am trying to use textscan but it seems not work.
Thanks a lot.

1 comentario

Image Analyst
Image Analyst el 19 de Nov. de 2014
There's no comma in {bug fixes; stability improved; new feature added}. And you forgot to attach the csv file to make it easy for us to help you. Can you do that?

Iniciar sesión para comentar.

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 19 de Nov. de 2014
Editada: Azzi Abdelmalek el 19 de Nov. de 2014

0 votos

v={'bug fixes'; 'stability improved'; 'new feature added'}
out=regexp(v,'\S+','match')
out= [out{:}]

Más respuestas (0)

Categorías

Más información sobre Characters and Strings en Centro de ayuda y File Exchange.

Etiquetas

Preguntada:

el 19 de Nov. de 2014

Comentada:

el 20 de Nov. de 2014

Community Treasure Hunt

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

Start Hunting!

Translated by