From 463781085ba619b65fffa06f1f6579b771d35b44 Mon Sep 17 00:00:00 2001 From: ruidajo Date: Sun, 15 May 2022 12:31:23 -0500 Subject: [PATCH] Fixing tweets filtering and write words for external cloud. --- .../NitterUser.class/instance/tweets.st | 2 +- .../NitterUser.class/instance/writeWordsFile.st | 10 +++------- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/Socialmetrica.package/NitterUser.class/instance/tweets.st b/Socialmetrica.package/NitterUser.class/instance/tweets.st index 7b1fa66..103512b 100644 --- a/Socialmetrica.package/NitterUser.class/instance/tweets.st +++ b/Socialmetrica.package/NitterUser.class/instance/tweets.st @@ -13,7 +13,7 @@ tweets subcollection := self messages 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 ] ]. ^ TweetsCollection new messages: subcollection; diff --git a/Socialmetrica.package/NitterUser.class/instance/writeWordsFile.st b/Socialmetrica.package/NitterUser.class/instance/writeWordsFile.st index 6b50811..d1f1651 100644 --- a/Socialmetrica.package/NitterUser.class/instance/writeWordsFile.st +++ b/Socialmetrica.package/NitterUser.class/instance/writeWordsFile.st @@ -3,15 +3,11 @@ writeWordsFile "TO DO: Debug Tweet words to work better with Urls" | rawTweets rawWords collectionsWords count | self messages ifNil: [ ^ self ]. - rawTweets := self tweets messages. + rawTweets := self tweets. rawWords := OrderedCollection new. - collectionsWords := ((rawTweets select: - [ :tweet | tweet authorId = self id ]) - collect: [ :tweet | (tweet words - reject: [ :w | - w includesSubstring: - ((self class nitterProvider asUrl host copyWithoutAll: '.'))]) ]). + collectionsWords := rawTweets collect: [ :tweet | (tweet words reject: [ :w | + w includesSubstring: (self class nitterProvider asUrl host copyWithoutAll: '.')])]. collectionsWords do: [ :word | rawWords addAll: word ]. rawWords := ' ' join:rawWords.