C# Класс ElizaCore.ElizaMain

Eliza main class.
Eliza main class. Stores the processed script. Does the input transformations.
Показать файл Открыть проект

Открытые методы

Метод Описание
ElizaMain ( ) : System
ElizaMain ( ILineSource linesource ) : System
IsFinished ( ) : bool
ProcessInput ( string s ) : string

Process a line of input.

Process a line of input.

Приватные методы

Метод Описание
Assemble ( Decomp d, string reply, Key gotoKey ) : string

Assembly a reply from a decomp rule and the input.

Assembly a reply from a decomp rule and the input. If the reassembly rule is goto, return null and give the gotoKey to use. Otherwise return the response.

Collect ( string s ) : void

Process a line of script input.

Process a line of script input.

Decompose ( Key key, string s, Key gotoKey ) : string

Decompose a string according to the given key.

Decompose a string according to the given key. Try each decomposition rule in order. If it matches, assemble a reply and return it. If assembly fails, try another decomposition rule. If assembly is a goto rule, return null and give the key. If assembly succeeds, return the reply;

ReadScript ( ILineSource linesource ) : int
Sentence ( string s ) : string

Process a sentence.

Process a sentence. (1) Make pre transformations. (2) Check for quit word. (3) Scan sentence for keys, build key stack. (4) Try decompositions for each key.

Описание методов

ElizaMain() публичный Метод

public ElizaMain ( ) : System
Результат System

ElizaMain() публичный Метод

public ElizaMain ( ILineSource linesource ) : System
linesource ILineSource
Результат System

IsFinished() публичный Метод

public IsFinished ( ) : bool
Результат bool

ProcessInput() публичный Метод

Process a line of input.
Process a line of input.
public ProcessInput ( string s ) : string
s string
Результат string