JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 28
  • Score
    100M100P100Q49282F
  • License MIT

A rendition of ELIZA program engine by Weizenbaum sharable for all javascript environments

Package Exports

  • eliza-core

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (eliza-core) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Eliza: Implementation for JavaScript

NPM version tested with jest

A JavaScript(TypeScript) code version of Eliza ported from Charles Hayden's Java implementation: http://chayden.net/eliza/Eliza.html.

This rendition of ELIZA in TypeScript/JavaScript is designed as a complete and faithful implementation of the original design that was described by Joseph Weizenbaum: https://doi.org/10.1145/365153.365168. The psychologist script that was attached on that paper is included as well, though the format is a little revised for clarity and the possibility in other languages that is not segmented with spaces in design, such as Japanese and Chinese. Additionally, a Japanese script package as a deliberate example for this interpreter has been released as well: https://www.npmjs.com/package/eliza-jp

Usage

const eliza = require('eliza-core');
const util = require('eliza-util');
loadEliza(util.fromFile(util.SCRIPT_PATH + '/eliza.script')).then(eliza => {
  console.log(eliza.processInput('Hello, Eliza'));
});