Drkcore

21 02 2011 Ruby javascript Tweet

恋するプログラムをJavascriptで書いていくことにした

そういえば去年の最終Haskell読書会で、だれかと恋するプログラムの本の話になってYahooの日本語形態素解析API使えば出来んじゃないか?という思考に至ったので、気の向いたときにやっていくことにした。

ProductName 恋するプログラム―Rubyでつくる人工無脳
秋山 智俊
毎日コミュニケーションズ / ?円 ( 2005-04 )


3-3

function Responder(name) {
  this.name = name;
  this.response = function (input) {
    return input + "ってなに?"
  };
}

function Unmo(name) {
  this.name = name;
  this.responder = new Responder('What');
  this.dialogue = function (input) {
    return this.responder.response(input);
  };
  this.responder_name = function () {
    return this.responder.name;
  };
}

var u = new Unmo('proto');
var input = "あれ";

console.log(u.dialogue(input));

復刊リクエストも動いているようなので復刊されるといいですね。

About

  • もう5年目(wishlistありマス♡)
  • 最近はPythonとDeepLearning
  • 日本酒自粛中
  • ドラムンベースからミニマルまで
  • ポケモンGOゆるめ

Tag

Python Deep Learning javascript chemoinformatics Emacs sake and more...

Ad

© kzfm 2003-2021