Research Article

Anomalous Behavior Detection Framework Using HTM-Based Semantic Folding Technique

Algorithm 1

Pseudocode/Algorithm of the Proposed System.
Input Documents as doc
OutPut Clusters as preCluster
--------------------------------------------------------------------
Processing for Pooling and SDR
Function PoolSDR()
for d in docs:
  wtSet=(word_tokenize(d))
  for t in wtSet:
   ww=sentiwordnet.senti_synsets(t)
   if len(ww)>0 and t not in stop_words:
    for w in ww:
      if w.synset[0]. in bucketArray:
       bk=[i, t,bucketArray.index(w.synset.name())]
       bucket.append(bk)
       if len(bucket)>8:
        break
      else:
       bucketArray.append(w.synset.name())
       bk=[i, t,bucketArray.index(w.synset.name())]
       bucket.append(bk)
       if len(bucket)>8:
        break
     end if
    end if
    end for
   end if
  end for
end for
end function
Process for Clustering
Function Cluster()
i=1
Cluster=""
for b in bucket:
  if (b[0]==i):
   Cluster=str(Cluster) + " + str(b[2])
  else:
   preCluster.append(Cluster)
   Cluster=""
   i=i+1
   Cluster=str(Cluster) + "" + str(b [2])
  end if
end for
end function