Message Boards Message Boards

2
|
9893 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Word cloud for WeChat chat room log

Posted 9 years ago
Attachments:
POSTED BY: Dan Lou
4 Replies
Posted 9 years ago

Thanks, Sander! I just tested and it is actually working. So I can simplify the line of code to be:

mtest = Complement[mtest, stopList]];

Probably I was testing the Complement function with the earlier version of imported CSV data, and had the wrong impression it does not work, but in fact it is the CSV file that is causing the problem.

POSTED BY: Dan Lou

Note that it might be slightly different as Complement returns a sorted list with all the duplicates also removed... Just check if that is OK in your case; I see you do a Tally after it, so I'm not 100% sure if Complement gives you the desired result.

POSTED BY: Sander Huisman
Posted 9 years ago

Yeah, that's an issue.

Or maybe I can try to tally first, then Complement, then try to get the matched ones from the tallied list.

POSTED BY: Dan Lou

Thanks for sharing!! Pretty neat Why does complement not work for you?

If I grab some Chinese characters from wikipedia: it seems to work:

chars={"?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?","?"}
partchars=chars[[;; ;; 3]]
Complement[chars,partchars]
POSTED BY: Sander Huisman
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract