1 var AI_CandidateWordTag = function(str){
2 AI_CandidateWordTag.base.call(this, AI_CandidateWordTag.base.prototype.Type_CandidateWord);
6 }.extend(AI_MemoryTag, {
7 parseToStringData: function(){
8 //uuid:type:str:wordCount:wordLevel
9 var e = encodeURIComponent;
13 d.l = this.wordLevel.toString();
15 return AI_CandidateWordTag.base.prototype.parseToStringData.call(this, d);
17 loadFromMemoryData: function(data){
18 var e = decodeURIComponent;
20 this.wordCount = data.c;
21 this.wordLevel = data.l;
25 var AI_WordTag = function(str, uuid){
26 AI_WordTag.base.call(this, AI_WordTag.base.prototype.Type_Word);
34 }.extend(AI_MemoryTag, {
35 parseToStringData: function(){
36 //uuid:type:str:wordCount:wordLevel
37 var e = encodeURIComponent;
41 return AI_WordTag.base.prototype.parseToStringData.call(this, d);
43 loadFromMemoryData: function(data){
44 var e = decodeURIComponent;
46 this.wordCount = data.c;
50 var AI_DatabaseInfoTag = function(){
51 AI_DatabaseInfoTag.base.call(this, AI_DatabaseInfoTag.base.prototype.Type_DatabaseInfo);
52 this.readLineCount = 0;
53 }.extend(AI_MemoryTag, {
54 parseToStringData: function(){
55 //uuid:type:str:wordCount:wordLevel
57 d.rlc = this.readLineCount;
58 return AI_DatabaseInfoTag.base.prototype.parseToStringData.call(this, d);
60 loadFromMemoryData: function(data){
61 this.readLineCount = data.rlc;
63 bindDatabaseInfo: function(aimemory){
64 //このインスタンスがもつ情報をAI_Memoryのデータに反映させる
65 aimemory.dbInfo.readLineCount = this.readLineCount;
69 var AI_PatternTag = function(pattern, uuid, func){
70 AI_PatternTag.base.call(this, AI_PatternTag.base.prototype.Type_Pattern);
71 // p.func(this.env, separated, separated_UUID);
72 //patternには関数も指定できる。その場合、関数の形式は
73 //f(separated, separated_UUID)となる。戻り値がtrueの場合、パターンはマッチしたとみなされる
75 this.pattern = pattern;
83 }.extend(AI_MemoryTag, {
84 parseToStringData: function(){
89 var AI_MeaningTag = function(uuid, description){
90 AI_MeaningTag.base.call(this, AI_MeaningTag.base.prototype.Type_Meaning);
92 this.description = description;
97 }.extend(AI_MemoryTag, {
98 parseToStringData: function(){