Created
May 18, 2015 12:50
-
-
Save ikr7/45b1a7e9df28f6549bcb to your computer and use it in GitHub Desktop.
あ
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 spawn = require('child_process').spawn; | |
var fs = require('fs'); | |
var rs = fs.createReadStream('./kani.txt'); | |
var mecab = spawn('/usr/local/bin/mecab'); | |
// Read ストリーム --> MeCab --> 標準出力 | |
// ってかんじでデータをわたしていく | |
rs.pipe(mecab.stdin); | |
mecab.stdout.pipe(process.stdout); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment