C# 클래스 ElizaCore.ElizaMain

Eliza main class.
Eliza main class. Stores the processed script. Does the input transformations.
파일 보기 프로젝트 열기: xamarin/monotouch-samples

공개 메소드들

메소드 설명
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