English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I'm supposed to program it in a way that it lists out all the 3-word phrases found in a document.
Example in a passage:
(Mary had a little lamb,and the lamb was white as snow)
So it will give me these results in EXCEL in a list:
Mary had a
had a little
a little lamb
lamb,and
.
.
Now the problem is, "lamb,and" must be removed cause it contains punctuations.
How do I delete those cells that has punctuation marks?
I cannot delete the entire row.
I must delete only that particular cell.
--------------------------------------------

Anybody knows the code for this?
If yes, please help.
Really urgent cause the project is due soon.


thanks!!

2007-11-17 05:40:57 · 1 answers · asked by SPB 1 in Computers & Internet Programming & Design

1 answers

Actually I beleive that your code needs improvment in the extraction of words. It appears that you are seperating out words when ever a single space is detected and that the next non space is a word.. This means that the comma is being processed as a word.

WWhat not add code to your extraction routine. When a space is detected it checks the next non space character ad if it detect a punctuation it ignores it and continues scanning until a valid letter or number is found.

2007-11-17 07:55:22 · answer #1 · answered by MarkG 7 · 0 0

fedest.com, questions and answers