Created
April 9, 2016 15:21
-
-
Save golbin/581b2365692629a3e837d6c2081cf064 to your computer and use it in GitHub Desktop.
mecab-ya examples
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var mecab = require('mecab-ya'); | |
var text = '아버지가방에들어가신다'; | |
mecab.pos(text, function (err, result) { | |
console.log(result); | |
/* | |
[ [ '아버지', 'NNG' ], | |
[ '가', 'JKS' ], | |
[ '방', 'NNG' ], | |
[ '에', 'JKB' ], | |
[ '들어가', 'VV' ], | |
[ '신다', 'EP+EC' ] ] | |
*/ | |
}); | |
mecab.morphs(text, function (err, result) { | |
console.log(result); | |
/* | |
[ '아버지', '가', '방', '에', '들어가', '신다' ] | |
*/ | |
}); | |
mecab.nouns(text, function (err, result) { | |
console.log(result); | |
/* | |
[ '아버지', '방' ] | |
*/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment