Share with others

Implementation of Single Pass Algorithm for Clustering – BE(IT) CLP-II Practical

Aim  : To implement Single Pass Algorithm for Clustering  in Documents and Files . 
Objective : To study Clustering in files or Documents using single pass algorithm  

Given below is the Single Pass Algorithm for Clustering  with source code in Java Language . For this code to work you should have three files for sample input (Text Files ) .

Source Code for Single Pass Algorithm

Output of Single Pass Algorithm

Enter the no of Tokens

5
Enter the no of Documents
5
Enter the threshhold
10
Enter the Document Token Matrix
Enter(0,0)
1
Enter(0,1)
3
Enter(0,2)
3
Enter(0,3)
2
Enter(0,4)
2
Enter(1,0)
2
Enter(1,1)
1
Enter(1,2)
0
Enter(1,3)
1
Enter(1,4)
2
Enter(2,0)
0
Enter(2,1)
2
Enter(2,2)
0
Enter(2,3)
0
Enter(2,4)
1
Enter(3,0)
0
Enter(3,1)
3
Enter(3,2)
1
Enter(3,3)
0
Enter(3,4)
5
Enter(4,0)
1
Enter(4,1)
0
Enter(4,2)
1
Enter(4,3)
0
Enter(4,4)
1

0 0 1 3
1 2
2 4


Share with others