Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
In a previous post, a user @ogster1974 was able to help (thankyou!) create a new table in the loadscript to break a field from my inbox into individual strings so I could visualise the words in a WordCloud.
The following is the successful code:
SubjectWords:
LOAD
1 as WordCount,
message_id,
SubField("subject",' ') as Word
Resident Mail
;
I would like to now designate some words to be excluded from the WorldCloud such as 'the', 'a', and 'and'.
I had a go at the following but it produces an error.
SubjectWords:
LOAD
1 as WordCount,
message_id,
SubField("subject",' ') as Word
Resident Mail
Where WildMatch(Word, '*the*', '*a*', '*and*') = 0;
The error is that the field 'Word' is not found.
Any advice would be greatly appreciated!
two ways to deal with this.
SubjectWordsTmp:
LOAD
1 as WordCount,
message_id,
SubField("subject",' ') as Word
Resident Mail
;
NoConcatenate
SubjectWords:
LOAD
*
Resident SubjectWordsTmp
Where WildMatch(Word, '*the*', '*a*', '*and*') = 0;
Drop Table SubjectWordsTmp;
or just get rid of the small words.
SubjectWordsTmp:
LOAD
1 as WordCount,
message_id,
SubField("subject",' ') as Word,
Len(SubField("subject",' ')) as WordLength
Resident Mail
;
NoConcatenate
SubjectWords:
LOAD
*
Resident SubjectWordsTmp
Where WordLength <= 4;
Drop Table SubjectWordsTmp;