this.root = new Array();
//サブリスト
this.candidateWordList = new Array();
+ this.candidateWordListLastModifiedDate = new Date();
+ this.candidateWordListLastCleanedDate = new Date();
+ //
this.wordList = new Array();
this.wordListLastModifiedDate = new Date();
+ //
this.patternList = new Array();
}
AI_Memory.prototype = {
//タグに合わせて追加条件を満たしているか確認し、それぞれのサブリストに分配
if(tag instanceof AI_CandidateWordTag){
this.candidateWordList.push(tag);
+ this.candidateWordListLastModifiedDate = new Date();
}
if(tag instanceof AI_WordTag){
if(this.wordList.isIncluded(tag, function(a, b){ return ((a.str == b.str) && (a !== s)); })){
*/
removeMemoryTagByObject: function(obj){
this.root.removeAnObject(obj);
- this.candidateWordList.removeAnObject(obj);
+ if(this.candidateWordList.removeAnObject(obj)){
+ this.candidateWordListLastModifiedDate = new Date();
+ }
if(this.wordList.removeAnObject(obj)){
this.wordListLastModifiedDate = new Date();
}
var w = this.wordList[i].str;
for(var j = 0, jLen = this.candidateWordList.length; j < jLen; j++){
if(this.candidateWordList[j].str == w){
- this.env.debug("Word duplicated in CWL. Remove.\n");
+ this.env.debug("Word duplicated in CWL. Removed.\n");
this.removeMemoryTagByObject(this.candidateWordList[j]);
j--;
jLen--;
}
}
- }
+ }
+
+ this.env.wordRecognition.cleanCandidateWordList();
+ //候補リスト並べ替え
+ this.env.wordRecognition.sortCandidateWordListByWordCount();
+ this.env.wordRecognition.computeEachWordLevel();
+ this.env.wordRecognition.sortCandidateWordListByWordLevel();
+ //
this.env.debug("Memory verifying done.\n");
},
getUUIDFromWord: function(str){