RhymeTime - a Vocab Helper Tool for Nexus

Recently, I've been playing around with the Datamuse API, and decided to turn it into a Nexus Package.


After installation (and a reload of the Nexus client), you'll be able to search for synonyms, definitions, rhymes, and a few other options, all without having to switch tabs. Feel like you've been using the same word too often in your emotes, but don't want to tab over and risk missing something? RhymeTime can take care of that for you.

The full command list can be found in-game by typing 'rhymetime'. It's as follows: 

-----------------------------
RhymeTime Commands
-----------------------------

define (word): Retrieves a definition of a given word.
synonym (word): Retrieves synonyms of a given word.
rhyme (word): Retrieves rhymes of a given word.
adjective (word): Retrieves adjectives of a given word.
adjective (word) topic (topic): Retrieves adjectives of a given word related to a topic.
suggest (word): Retrieves suggestions for a given string of letters.
associate (word): Retrieves associations of a given word.


In the future, I may add a few more options like being able to filter the results by syllable count. Pleease let me know if you find any bugs!

Comments

  • edited February 2021
    This is awesome. Is there any way to turn this into a mudlet thing?
  • QuixoteQuixote Manchester, UK
    Still a WIP, but I got bored.

    -- Accept two args: word and API method. The method can be found in the actions
    -- table below. More actions may be added in due course!
    
    function GrabWordDefinition(word, action)
      if not word or not action or not type(action) == "string" or not table.contains(actions, word) then 
        return e:error("Function grabWordDefinition() requires a word and action")
      end
      
      local url = [[https://itsrhymetime.herokuapp.com/api/]]
      local loc = getMudletHomeDir().."dict.json"
      local url = url[action].."//"..word
      
      local actions = {
        def = "definition",
        syn = "synonym",
        adj = "adjective",
        sug = "suggest",
        ass = "associate"
      }
          
      downloadFile(loc, url)
    end

  • hmm, this is pretty neat looking. The heroku app endpoint, is that something you setup or is just publically available? If the former, do you mind if I use it for a mudlet package with aliases and such? And/or are you willing to share that so I could run my own?

    Don't want to step on any toes, but also don't want to reinvent the wheel if there's a perfectly good one I can use. 
  • edited February 2021
    You're welcome to use the heroku app! It's a simple little Express server I made that mostly just ferries queries to the Datamuse API to get around CORS. I think Mudlet might be able to request Datamuse directly, and it'd probably be a little faster (in particular, the heroku app sleeps after an hour of inactivity and has to wake up if its pinged), but I don't mind anyone using it at all. 
Sign In or Register to comment.