GithubHelp home page GithubHelp logo

Word Type Search about unofficial-jisho-api HOT 5 OPEN

mistval avatar mistval commented on August 30, 2024
Word Type Search

from unofficial-jisho-api.

Comments (5)

afortiori avatar afortiori commented on August 30, 2024 1

Wow, thanks! This is super cool.

from unofficial-jisho-api.

mistval avatar mistval commented on August 30, 2024

Hi, I'll see if I can add that information when I have some time 👍

from unofficial-jisho-api.

afortiori avatar afortiori commented on August 30, 2024

Thanks! :)

from unofficial-jisho-api.

mistval avatar mistval commented on August 30, 2024

I added a new scrapeForPhrase function to master that can get you the word type among other things. I need to test it a bit more and write documentation before I push a new version to NPM, but if you want to try it out now you can do npm install https://github.com/mistval/unofficial-jisho-api to install the master branch.

console.log(JSON.stringify(await jisho.scrapeForPhrase('ゆっくり'), null, 2)) returns the following:

{
  "found": true,
  "tags": [
    "Common word",
    "JLPT N5"
  ],
  "meanings": [
    {
      "seeAlsoTerms": [],
      "sentences": [],
      "meaning": "slowly; at ease; restful",
      "supplemental": [
        "Onomatopoeic or mimetic word"
      ],
      "meaningAbstract": "",
      "meaningTags": [
        "adverb",
        "noun",
        "suru verb",
        "adverb taking the 'to' particle"
      ]
    }
  ],
  "query": "ゆっくり",
  "uri": "https://jisho.org/word/%E3%82%86%E3%81%A3%E3%81%8F%E3%82%8A"
}

The word type is in the "meaningTags" property, it's the same as in the entry on Jisho.org.

As for the inflections, those are actually conjugated by JavaScript in the browser (here), so I'd have to do something like use Puppeteer to execute that code, I'll look into that some other time if I get a chance.

from unofficial-jisho-api.

mistval avatar mistval commented on August 30, 2024

New version 1.2.0 on NPM has the above mentioned scrapeForPhrase function. Please see the README or jsdocs for more info.

from unofficial-jisho-api.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.