npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yahoo-jlp

v0.2.0-alpha

Published

Node.js module for Yahoo! JAPAN jlp api

Downloads

4

Readme

node-yahoo-jlp

Build Status Coverage Status Dependency Status

Node.js module for Yahoo! JAPAN jlp api. (http://developer.yahoo.co.jp/webapi/jlp/)

Installation

You can install via npm:

npm install yahoo-jlp

Usage:

var Yahoojlp = require('yahoo-jlp');

// set appid
var yjlp = new Yahoojlp('your_app_id');

// parse
yjlp.parse('日本語文を形態素に分割します。', function (err, response, data) {
  console.log(data);
});

// convert
yjlp.convert('ひらがなをかんじにへんかんします。', function (err, response, data) {
  console.log(data);
});

// ruby
yjlp.ruby('漢字かな交じり文にふりがなを付けます。', function (err, response, data) {
  console.log(data);
});

// proofreading
yjlp.check('日本語文の校正をします。', function (err, response, data) {
  console.log(data);
});

// check dependency relations
yjlp.relation('日本語文の係り受け関係を解析します。', function (err, response, data) {
  console.log(data);
});

// extract key phrase
yjlp.keyphrase('日本語文から特徴的な表現を抽出します。', function (err, response, data) {
  console.log(data);
});

Documentation

Yahoojlp(appid)

Create yjlp instance.

  • appid String your application ID provided by Yahoo! JAPAN.

yjlp.parse(params, callback)

Parse Japanese to morpheme. (http://developer.yahoo.co.jp/webapi/jlp/ma/v1/parse.html)

  • params Object|String allowed parameters. String must be sentence to parse.
  • callback Function callback function.

params

  • sentence String sentense to parse.
  • results Array|String ma, uniq.
  • response Array|String surface, reading, pos, baseform, feature.
  • filter Array|Number 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13.
  • ma_response Array|String overwrite response when result has ma.
  • ma_filter Array|String overwrite filter when result has ma.
  • uniq_response Array|String overwrite response when result has uniq.
  • uniq_filter Array|String overwrite filter when result has uniq.
  • uniq_by_baseform Boolean|String true.

yjlp.convert(params, callback)

Convert Japanese from hiragana to kanji. (http://developer.yahoo.co.jp/webapi/jlp/jim/v1/conversion.html)

  • params Object|String allowed parameters. String must be sentence to parse.
  • callback Function callback function.

params

  • sentence String sentense to parse. MAX length is 80.
  • format String roman.
  • mode String normal, roman, predictive.
  • response Array|String katakana, hiragana, alphanumeric, half_katakana, half_alphanumeric.
  • dictionary Array|String default, name, place, zip, symbol.
  • results Number integer, MAX is 999

yjlp.ruby(params, callback)

Put ruby to kanji. (http://developer.yahoo.co.jp/webapi/jlp/furigana/v1/furigana.html)

  • params Object|String allowed parameters. String must be sentence to parse.
  • callback Function callback function.

params

  • sentence String sentense to parse.
  • grade Number 1, 2, 3, 4, 5, 6, 7, 8.

yjlp.check(params, callback)

Proofread Japanese. (http://developer.yahoo.co.jp/webapi/jlp/kousei/v1/kousei.html)

  • params Object|String allowed parameters. String must be sentence to parse.
  • callback Function callback function.

params

  • sentence String sentense to parse.
  • filter_group Array|Number 1, 2, 3.
  • no_filter Array|Number 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17.

yjlp.proofread(params, callback)

Synonym of yjlp.check.

yjlp.relation(sentence, callback)

Check dependency relations of Japanese. (http://developer.yahoo.co.jp/webapi/jlp/da/v1/parse.html)

  • sentence String sentense to parse. One sentence.
  • callback Function callback function.

yjlp.keyphrase(sentence, callback)

Extract key phrase from Japanese. (http://developer.yahoo.co.jp/webapi/jlp/keyphrase/v1/extract.html)

  • sentence String sentense to parse.
  • callback Function callback function.

callback

Callback function argument will be (err, response, data).

  • err Object
  • response Object
  • data Object

License

MIT license