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

node-khaiii

v0.1.1

Published

카카오에서 개발한 한국어 형태소 분석기 khaiii의 Node 버전

Downloads

9

Readme

node-khaiii

https://img.shields.io/github/license/zoomkoding/node-khaiii https://img.shields.io/github/v/release/zoomkoding/node-khaiii?include_prereleases&sort=semver&label=version

카카오에서 개발한 한국어 형태소 분석기 khaiii의 Node 버전입니다.

Installation

⚠️ node-khaiii를 사용하시려면 반드시 khaiii의 설치 및 빌드에서 Python Binding까지 진행하셔야 합니다!

$ npm i node-khaiii

Quick Example

const khaiii = require('node-khaiii');

khaiii({    
	tags: 'N,SL', // 필터하고 싶은 태그가 있다면 ,로 구분해서 넣어주세요.    
	text: '형태소 분석을 통해 유저 인풋의 키워드를 찾아보려 합니다.',    
	onFinish: (data) => {      
			console.log(data.result);  
			// {"형태소":"NNG","분석":"NNG","유":"NNP","저":"NNG","인풋":"NNG","키워드":"NNG"}
	},
});

khaiii({    
	// tags: 'N,SL', // 태그를 따로 전달하지 않으면 모든 태그가 보여집니다
	text: '형태소 분석을 통해 키워드 검색을 도전합니다.',    
	onFinish: (data) => {      
			console.log(data.result);  
			// {"형태소":"NNG","분석":"NNG","을":"JKO","통하":"VV","여":"EC","유":"NNP","저":"NNG","인풋":"NNG","의":"JKG","키워드":"NNG","를":"JKO","찾아보리":"VV","어":"EC","하":"VX","ㅂ니다":"EF",".":"SF"}
	},
});

API

khaiii({ tags, text, onFinish })

  • tags : 보고 싶은 태그의 형태소만 볼 수 있습니다. (,로 구분해서 전달, 한글 형태소 품사 태그표)
  • text : 형태소 분석을 원하는 문자열을 전달합니다.
  • onFinish : 형태소 분석이 된 결과가 전달될 콜백 함수입니다.
    • onFinish는 성공여부를 알려주는 code 와 분석 결과 result 로 이루어진 JSON object를 반환합니다.