Modifying external word cloud parameters.

This commit is contained in:
ruidajo 2022-04-14 19:20:45 -05:00
parent f97b193c5e
commit 4341383a8c
3 changed files with 17 additions and 3 deletions

View File

@ -0,0 +1,14 @@
accessing
installExternalWordCloudCommons
| commonFiles folder |
commonFiles := #(
'https://mutabit.com/repos.fossil/mutabit/uv/wiki/commons/nube-mascara.jpg'.
'http://mutabit.com/repos.fossil/mutabit/raw/tip?at=stopwords-es.txt').
folder := TweetsCollection dataStore / 'commons'.
folder exists ifFalse: [ folder ensureCreateDirectory].
commonFiles do: [ :fileUrl |
ZnClient new
url: fileUrl;
downloadTo: self folder parent / 'commons'.]

View File

@ -3,13 +3,13 @@ writeWordsFile
| rawTweets rawWords collectionsWords count |
self messages ifNil: [ ^ self ].
rawTweets := self messages messages.
rawTweets := self tweets messages.
rawWords := OrderedCollection new.
collectionsWords := ((rawTweets select:
[ :tweet | tweet user userName = self userName ])
[ :tweet | tweet authorId = self id ])
collect: [ :tweet | (tweet words
reject: [ :w | w includesSubstring: 'nitter42lfr' ]) ]).
reject: [ :w | w includesSubstring: self class nitterProvider ]) ]).
collectionsWords do: [ :word | rawWords addAll: word ].
rawWords := ' ' join:rawWords.