Group Abstract Group Abstract

Message Boards Message Boards

Wolfram Language for Motivational Words

Posted 10 years ago

When I saw this picture on Linkedin I thought: "What are the other 100 points words?"

enter image description here

Well, pretty easy with WL, using just 3 lines of code. First let's create our wordValue function:

index = First/@PositionIndex@CharacterRange["a","z"];
wordValue[word_String]:= Total[Lookup[index, #, 0]&/@StringPartition[ToLowerCase@RemoveDiacritics@word,1]]

Testing the code we have:

wordValue/@{"knowledge", "hardwork", "attitude"}
{96, 98, 100}

Great, the check is ok! Now what are the other words? One more line:

words100 = Select[DictionaryLookup[], wordValue[#]==100&]

Now, take care with "useless and inefficient elephants" in your company, these are 100 points words!

wordValue/@{"useless", "inefficient", "elephants"}
{100, 100, 100}

Here is a Word Cloud with a sample of 100 words from the total of 1054:

WordCloud[RandomSample[words100, 100], WordOrientation -> "Random"]

enter image description here

POSTED BY: Rodrigo Murta
8 Replies

enter image description here - another post of yours has been selected for the Staff Picks group, congratulations !

We are happy to see you at the tops of the "Featured Contributor" board. Thank you for your wonderful contributions, and please keep them coming!

POSTED BY: EDITORIAL BOARD
Posted 10 years ago
POSTED BY: Mike Spring
Posted 10 years ago

I found this could be easily achieved in one line of code

WordCloud[
 Select[WordList[], Total[LetterNumber[Characters[#]]] == 100 &], 
 WordSpacings -> "3", WordOrientation -> "Random"]
POSTED BY: Amalie Jenner
POSTED BY: Sander Huisman

By the way, @Rodrigo Murta, the new function LetterNumber would make things easier:

LetterNumber["?", "Greek"]
(* 11 *)
POSTED BY: Vitaliy Kaurov

Hi @Daniel Interesting this Google API for search. Tks for sharing!

POSTED BY: Rodrigo Murta
POSTED BY: Vitaliy Kaurov
POSTED BY: Daniel Carvalho
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard