Fixing tweets filtering and write words for external cloud.

This commit is contained in:
ruidajo 2022-05-15 12:31:23 -05:00
parent a515a24a81
commit 463781085b
2 changed files with 4 additions and 8 deletions

View File

@ -13,7 +13,7 @@ tweets
subcollection := self messages subcollection := self messages
select: [ :each | (each authorId = '1502504562984374276') or: [ each authorId = self id ] ] select: [ :each | (each authorId = '1502504562984374276') or: [ each authorId = self id ] ]
]. ].
(self userName ~= 'FranciaMarquezM' or: [ self userName ~= 'sandralajas' ]) (self userName ~= 'FranciaMarquezM' and: [ self userName ~= 'sandralajas' ])
ifTrue: [ subcollection := self messages select: [ :each | each authorId = self id ] ]. ifTrue: [ subcollection := self messages select: [ :each | each authorId = self id ] ].
^ TweetsCollection new ^ TweetsCollection new
messages: subcollection; messages: subcollection;

View File

@ -3,15 +3,11 @@ writeWordsFile
"TO DO: Debug Tweet words to work better with Urls" "TO DO: Debug Tweet words to work better with Urls"
| rawTweets rawWords collectionsWords count | | rawTweets rawWords collectionsWords count |
self messages ifNil: [ ^ self ]. self messages ifNil: [ ^ self ].
rawTweets := self tweets messages. rawTweets := self tweets.
rawWords := OrderedCollection new. rawWords := OrderedCollection new.
collectionsWords := ((rawTweets select: collectionsWords := rawTweets collect: [ :tweet | (tweet words reject: [ :w |
[ :tweet | tweet authorId = self id ]) w includesSubstring: (self class nitterProvider asUrl host copyWithoutAll: '.')])].
collect: [ :tweet | (tweet words
reject: [ :w |
w includesSubstring:
((self class nitterProvider asUrl host copyWithoutAll: '.'))]) ]).
collectionsWords do: [ :word | rawWords addAll: word ]. collectionsWords do: [ :word | rawWords addAll: word ].
rawWords := ' ' join:rawWords. rawWords := ' ' join:rawWords.