Changeset 8475
- Timestamp:
- 2004-11-05T16:27:02+13:00 (19 years ago)
- Location:
- trunk
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/greenstone3-extensions/vishnu/src/vishnu/builder/CKIndexer.java
r8291 r8475 111 111 /**** sort hashtable by value ****/ 112 112 113 Enumeration enum = corpus_hash.keys();113 Enumeration enumer = corpus_hash.keys(); 114 114 String[] words_ck = new String[num_ck]; 115 115 int[] freqs_ck = new int[num_ck]; 116 116 117 117 int count = 0; 118 while( enum .hasMoreElements() ){119 words_ck[count] = (String)enum .nextElement();118 while( enumer.hasMoreElements() ){ 119 words_ck[count] = (String)enumer.nextElement(); 120 120 freqs_ck[count] = -((Integer)corpus_hash.get(words_ck[count])).intValue(); 121 121 count++; … … 164 164 private int pruneKeywords(Hashtable corpus_hash, int minLength, int min, int max){ 165 165 Set ck_set = corpus_hash.keySet(); 166 Enumeration enum = corpus_hash.keys();166 Enumeration enumer = corpus_hash.keys(); 167 167 168 168 int count = 0; 169 169 int pcount = 0; 170 170 171 while( enum .hasMoreElements() ) {172 173 String word = (String)enum .nextElement();171 while( enumer.hasMoreElements() ) { 172 173 String word = (String)enumer.nextElement(); 174 174 int freq = ((Integer)corpus_hash.get(word)).intValue(); 175 175 -
trunk/greenstone3-extensions/vishnu/src/vishnu/server/CKServer.java
r8344 r8475 92 92 count_ck_all += ht.size(); 93 93 94 Enumeration enum = ht.keys();95 while( enum .hasMoreElements() ){96 Integer term_index = (Integer)enum .nextElement();94 Enumeration enumer = ht.keys(); 95 while( enumer.hasMoreElements() ){ 96 Integer term_index = (Integer)enumer.nextElement(); 97 97 98 98 Integer set_freq; … … 108 108 /**** compute interesting weight for each keyword ****/ 109 109 110 Enumeration enum = keyHash.keys();110 Enumeration enumer = keyHash.keys(); 111 111 112 112 float[] weight_ck = new float[keyHash.size()]; … … 114 114 int count = 0; 115 115 116 while( enum .hasMoreElements() ){117 Integer index_ck = (Integer)enum .nextElement();116 while( enumer.hasMoreElements() ){ 117 Integer index_ck = (Integer)enumer.nextElement(); 118 118 Integer set_freq = (Integer)keyHash.get(index_ck); 119 119 -
trunk/greenstone3-extensions/vishnu/src/vishnu/server/CKTester.java
r8344 r8475 73 73 count_ck_all += ht.size(); 74 74 75 Enumeration enum = ht.keys();76 while( enum .hasMoreElements() ){77 Integer term_index = (Integer)enum .nextElement();75 Enumeration enumer = ht.keys(); 76 while( enumer.hasMoreElements() ){ 77 Integer term_index = (Integer)enumer.nextElement(); 78 78 79 79 Integer set_freq; … … 92 92 /**** compute interesting weight for each keyword ****/ 93 93 94 Enumeration enum = keyHash.keys();94 Enumeration enumer = keyHash.keys(); 95 95 96 96 float[] weight_ck = new float[keyHash.size()]; … … 98 98 int count = 0; 99 99 100 while( enum .hasMoreElements() ){101 Integer index_ck = (Integer)enum .nextElement();100 while( enumer.hasMoreElements() ){ 101 Integer index_ck = (Integer)enumer.nextElement(); 102 102 Integer set_freq = (Integer)keyHash.get(index_ck); 103 103 -
trunk/greenstone3-extensions/vishnu/src/vishnu/testvis/sammon/ClusterPanel.java
r8189 r8475 316 316 Font normal = new Font("Courier",Font.PLAIN,16); 317 317 Font bold = new Font("Courier",Font.BOLD,16); 318 for (Enumeration enum = clusters.elements() ; enum.hasMoreElements();)318 for (Enumeration enumer = clusters.elements() ; enumer.hasMoreElements();) 319 319 { 320 320 321 SammCluster cluster = (SammCluster) enum .nextElement();321 SammCluster cluster = (SammCluster) enumer.nextElement(); 322 322 int x = (int) (cluster.getX()*(offScreenSize.width-2*RADIUS)) + RADIUS; 323 323 int y = (int) (cluster.getY()*(offScreenSize.height-2*RADIUS)) + RADIUS; … … 407 407 Font normal = new Font("Courier",Font.PLAIN,16); 408 408 Font bold = new Font("Courier",Font.BOLD,16); 409 for (Enumeration enum = clusters.elements() ; enum.hasMoreElements();)409 for (Enumeration enumer = clusters.elements() ; enumer.hasMoreElements();) 410 410 { 411 411 412 SammCluster cluster = (SammCluster) enum .nextElement();412 SammCluster cluster = (SammCluster) enumer.nextElement(); 413 413 int x = (int) (cluster.getX()*(offScreenSize.width-2*RADIUS)) + RADIUS; 414 414 int y = (int) (cluster.getY()*(offScreenSize.height-2*RADIUS)) + RADIUS; -
trunk/gsdl3/extensions/vishnu/src/vishnu/builder/CKIndexer.java
r8291 r8475 111 111 /**** sort hashtable by value ****/ 112 112 113 Enumeration enum = corpus_hash.keys();113 Enumeration enumer = corpus_hash.keys(); 114 114 String[] words_ck = new String[num_ck]; 115 115 int[] freqs_ck = new int[num_ck]; 116 116 117 117 int count = 0; 118 while( enum .hasMoreElements() ){119 words_ck[count] = (String)enum .nextElement();118 while( enumer.hasMoreElements() ){ 119 words_ck[count] = (String)enumer.nextElement(); 120 120 freqs_ck[count] = -((Integer)corpus_hash.get(words_ck[count])).intValue(); 121 121 count++; … … 164 164 private int pruneKeywords(Hashtable corpus_hash, int minLength, int min, int max){ 165 165 Set ck_set = corpus_hash.keySet(); 166 Enumeration enum = corpus_hash.keys();166 Enumeration enumer = corpus_hash.keys(); 167 167 168 168 int count = 0; 169 169 int pcount = 0; 170 170 171 while( enum .hasMoreElements() ) {172 173 String word = (String)enum .nextElement();171 while( enumer.hasMoreElements() ) { 172 173 String word = (String)enumer.nextElement(); 174 174 int freq = ((Integer)corpus_hash.get(word)).intValue(); 175 175 -
trunk/gsdl3/extensions/vishnu/src/vishnu/server/CKServer.java
r8344 r8475 92 92 count_ck_all += ht.size(); 93 93 94 Enumeration enum = ht.keys();95 while( enum .hasMoreElements() ){96 Integer term_index = (Integer)enum .nextElement();94 Enumeration enumer = ht.keys(); 95 while( enumer.hasMoreElements() ){ 96 Integer term_index = (Integer)enumer.nextElement(); 97 97 98 98 Integer set_freq; … … 108 108 /**** compute interesting weight for each keyword ****/ 109 109 110 Enumeration enum = keyHash.keys();110 Enumeration enumer = keyHash.keys(); 111 111 112 112 float[] weight_ck = new float[keyHash.size()]; … … 114 114 int count = 0; 115 115 116 while( enum .hasMoreElements() ){117 Integer index_ck = (Integer)enum .nextElement();116 while( enumer.hasMoreElements() ){ 117 Integer index_ck = (Integer)enumer.nextElement(); 118 118 Integer set_freq = (Integer)keyHash.get(index_ck); 119 119 -
trunk/gsdl3/extensions/vishnu/src/vishnu/server/CKTester.java
r8344 r8475 73 73 count_ck_all += ht.size(); 74 74 75 Enumeration enum = ht.keys();76 while( enum .hasMoreElements() ){77 Integer term_index = (Integer)enum .nextElement();75 Enumeration enumer = ht.keys(); 76 while( enumer.hasMoreElements() ){ 77 Integer term_index = (Integer)enumer.nextElement(); 78 78 79 79 Integer set_freq; … … 92 92 /**** compute interesting weight for each keyword ****/ 93 93 94 Enumeration enum = keyHash.keys();94 Enumeration enumer = keyHash.keys(); 95 95 96 96 float[] weight_ck = new float[keyHash.size()]; … … 98 98 int count = 0; 99 99 100 while( enum .hasMoreElements() ){101 Integer index_ck = (Integer)enum .nextElement();100 while( enumer.hasMoreElements() ){ 101 Integer index_ck = (Integer)enumer.nextElement(); 102 102 Integer set_freq = (Integer)keyHash.get(index_ck); 103 103 -
trunk/gsdl3/extensions/vishnu/src/vishnu/testvis/sammon/ClusterPanel.java
r8189 r8475 316 316 Font normal = new Font("Courier",Font.PLAIN,16); 317 317 Font bold = new Font("Courier",Font.BOLD,16); 318 for (Enumeration enum = clusters.elements() ; enum.hasMoreElements();)318 for (Enumeration enumer = clusters.elements() ; enumer.hasMoreElements();) 319 319 { 320 320 321 SammCluster cluster = (SammCluster) enum .nextElement();321 SammCluster cluster = (SammCluster) enumer.nextElement(); 322 322 int x = (int) (cluster.getX()*(offScreenSize.width-2*RADIUS)) + RADIUS; 323 323 int y = (int) (cluster.getY()*(offScreenSize.height-2*RADIUS)) + RADIUS; … … 407 407 Font normal = new Font("Courier",Font.PLAIN,16); 408 408 Font bold = new Font("Courier",Font.BOLD,16); 409 for (Enumeration enum = clusters.elements() ; enum.hasMoreElements();)409 for (Enumeration enumer = clusters.elements() ; enumer.hasMoreElements();) 410 410 { 411 411 412 SammCluster cluster = (SammCluster) enum .nextElement();412 SammCluster cluster = (SammCluster) enumer.nextElement(); 413 413 int x = (int) (cluster.getX()*(offScreenSize.width-2*RADIUS)) + RADIUS; 414 414 int y = (int) (cluster.getY()*(offScreenSize.height-2*RADIUS)) + RADIUS; -
trunk/gsdl3/packages/vishnu/src/vishnu/builder/CKIndexer.java
r8291 r8475 111 111 /**** sort hashtable by value ****/ 112 112 113 Enumeration enum = corpus_hash.keys();113 Enumeration enumer = corpus_hash.keys(); 114 114 String[] words_ck = new String[num_ck]; 115 115 int[] freqs_ck = new int[num_ck]; 116 116 117 117 int count = 0; 118 while( enum .hasMoreElements() ){119 words_ck[count] = (String)enum .nextElement();118 while( enumer.hasMoreElements() ){ 119 words_ck[count] = (String)enumer.nextElement(); 120 120 freqs_ck[count] = -((Integer)corpus_hash.get(words_ck[count])).intValue(); 121 121 count++; … … 164 164 private int pruneKeywords(Hashtable corpus_hash, int minLength, int min, int max){ 165 165 Set ck_set = corpus_hash.keySet(); 166 Enumeration enum = corpus_hash.keys();166 Enumeration enumer = corpus_hash.keys(); 167 167 168 168 int count = 0; 169 169 int pcount = 0; 170 170 171 while( enum .hasMoreElements() ) {172 173 String word = (String)enum .nextElement();171 while( enumer.hasMoreElements() ) { 172 173 String word = (String)enumer.nextElement(); 174 174 int freq = ((Integer)corpus_hash.get(word)).intValue(); 175 175 -
trunk/gsdl3/packages/vishnu/src/vishnu/server/CKServer.java
r8344 r8475 92 92 count_ck_all += ht.size(); 93 93 94 Enumeration enum = ht.keys();95 while( enum .hasMoreElements() ){96 Integer term_index = (Integer)enum .nextElement();94 Enumeration enumer = ht.keys(); 95 while( enumer.hasMoreElements() ){ 96 Integer term_index = (Integer)enumer.nextElement(); 97 97 98 98 Integer set_freq; … … 108 108 /**** compute interesting weight for each keyword ****/ 109 109 110 Enumeration enum = keyHash.keys();110 Enumeration enumer = keyHash.keys(); 111 111 112 112 float[] weight_ck = new float[keyHash.size()]; … … 114 114 int count = 0; 115 115 116 while( enum .hasMoreElements() ){117 Integer index_ck = (Integer)enum .nextElement();116 while( enumer.hasMoreElements() ){ 117 Integer index_ck = (Integer)enumer.nextElement(); 118 118 Integer set_freq = (Integer)keyHash.get(index_ck); 119 119 -
trunk/gsdl3/packages/vishnu/src/vishnu/server/CKTester.java
r8344 r8475 73 73 count_ck_all += ht.size(); 74 74 75 Enumeration enum = ht.keys();76 while( enum .hasMoreElements() ){77 Integer term_index = (Integer)enum .nextElement();75 Enumeration enumer = ht.keys(); 76 while( enumer.hasMoreElements() ){ 77 Integer term_index = (Integer)enumer.nextElement(); 78 78 79 79 Integer set_freq; … … 92 92 /**** compute interesting weight for each keyword ****/ 93 93 94 Enumeration enum = keyHash.keys();94 Enumeration enumer = keyHash.keys(); 95 95 96 96 float[] weight_ck = new float[keyHash.size()]; … … 98 98 int count = 0; 99 99 100 while( enum .hasMoreElements() ){101 Integer index_ck = (Integer)enum .nextElement();100 while( enumer.hasMoreElements() ){ 101 Integer index_ck = (Integer)enumer.nextElement(); 102 102 Integer set_freq = (Integer)keyHash.get(index_ck); 103 103 -
trunk/gsdl3/packages/vishnu/src/vishnu/testvis/sammon/ClusterPanel.java
r8189 r8475 316 316 Font normal = new Font("Courier",Font.PLAIN,16); 317 317 Font bold = new Font("Courier",Font.BOLD,16); 318 for (Enumeration enum = clusters.elements() ; enum.hasMoreElements();)318 for (Enumeration enumer = clusters.elements() ; enumer.hasMoreElements();) 319 319 { 320 320 321 SammCluster cluster = (SammCluster) enum .nextElement();321 SammCluster cluster = (SammCluster) enumer.nextElement(); 322 322 int x = (int) (cluster.getX()*(offScreenSize.width-2*RADIUS)) + RADIUS; 323 323 int y = (int) (cluster.getY()*(offScreenSize.height-2*RADIUS)) + RADIUS; … … 407 407 Font normal = new Font("Courier",Font.PLAIN,16); 408 408 Font bold = new Font("Courier",Font.BOLD,16); 409 for (Enumeration enum = clusters.elements() ; enum.hasMoreElements();)409 for (Enumeration enumer = clusters.elements() ; enumer.hasMoreElements();) 410 410 { 411 411 412 SammCluster cluster = (SammCluster) enum .nextElement();412 SammCluster cluster = (SammCluster) enumer.nextElement(); 413 413 int x = (int) (cluster.getX()*(offScreenSize.width-2*RADIUS)) + RADIUS; 414 414 int y = (int) (cluster.getY()*(offScreenSize.height-2*RADIUS)) + RADIUS;
Note:
See TracChangeset
for help on using the changeset viewer.