Quantcast
Viewing all articles
Browse latest Browse all 186

Deleting common words from a text

I have a sentence:

text= {"Concerning the main ecological question on the complexity-stability relationship, our findings reveal that high species diversities and dynamical stability of growing ecological networks are very constrained under a widespread biochemical warfare between the interacting species. Indeed, the rate in which species abundance decreases as the number of strong allelopathic interactions increases is faster than those predicted by May’s classical analysis"};

I would like to remove the banal terms from the text listed in an indicated list that includes a special character shown below:

list={"’s", "concerning", "the", "main", "on", "our", "that", "of", "are", "in", "as", "is", "to", "a", "by", "may", "for", "be", "an", "and", "other", "others", "which", "not", "out"};

Version 13.1 of Mathematica has the function DeleteElements. Using it can delete elements from a list.

DeleteElements[text, list];

However, earlier versions of Mathematica do not have this tool. How should a list of words be removed from a text in older versions of Mathematica?

Thanks in advance.


Viewing all articles
Browse latest Browse all 186

Trending Articles