项目作者: alyldas

项目描述 :
Markov is a simple Markov algorithm (famously known as Normal algorithms) interpreter.
高级语言: JavaScript
项目地址: git://github.com/alyldas/Markov-old.git
创建时间: 2017-12-01T13:40:39Z
项目社区:https://github.com/alyldas/Markov-old

开源协议:

下载


Markov

Markov is a simple Markov algorithm (famously known as Normal algorithms) interpreter.

Example of use

To execute the algorithm in the Developer Console, you must go to address https://alyldas.github.io/Markov/, open the Developer Console and execute the following commands in sequence:

  1. var algorithm = new Markov.Algorithm();
  2. algorithm.addStatement(Markov.Statement.compile(statement));, where statement is “lhs -> rhs”, as example.
  3. var runner = new Markov.Runner(algorithm, inputWord);
  4. runner.run(); or runner.step(); as long as ‘runner.done’ = false

During the execution, the property ‘runner.context’ changes.