Last change
on this file since 16583 was 16583, checked in by davidb, 16 years ago |
Undoing change commited in r16582
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
1.3 KB
|
Line | |
---|
1 | package org.greenstone.mgpp;
|
---|
2 |
|
---|
3 | import java.util.Vector;
|
---|
4 |
|
---|
5 | /** TermInfo 'struct' class for a search result from mgpp
|
---|
6 | * used by MGPPQueryResult
|
---|
7 | *
|
---|
8 | *
|
---|
9 | *@see MGPPQueryResult
|
---|
10 | */
|
---|
11 | public class MGPPTermInfo {
|
---|
12 |
|
---|
13 | /** the term itself */
|
---|
14 | public String term_=null;
|
---|
15 | /** the tag - level or metadata - for which the query was done */
|
---|
16 | public String tag_=null;
|
---|
17 | /** what stem and casefold method was used
|
---|
18 | 0 = none
|
---|
19 | 1 = casefold only
|
---|
20 | 2 = stem only
|
---|
21 | 3 = casefold and stem */
|
---|
22 | public int stem_method_=0;
|
---|
23 | /** the number of documents containing this term (where document is defined by the tag data */
|
---|
24 | public long match_docs_=0;
|
---|
25 | /** overall term freq - word level*/
|
---|
26 | public long term_freq_=0;
|
---|
27 | /** list of stemmed and casefolded equivalent terms - if stem_method_ is non-zero
|
---|
28 | - Vector of Strings */
|
---|
29 | public Vector equiv_terms_=null;
|
---|
30 |
|
---|
31 | public MGPPTermInfo() {
|
---|
32 | equiv_terms_ = new Vector();
|
---|
33 | }
|
---|
34 |
|
---|
35 | /** output the class as a string */
|
---|
36 | public String toString() {
|
---|
37 | String result="";
|
---|
38 | result +="<"+tag_+">\""+term_+"\"stem("+stem_method_+")docs("+match_docs_;
|
---|
39 | result +=")freq("+term_freq_+")equiv terms(";
|
---|
40 | for (int i=0; i<equiv_terms_.size(); i++) {
|
---|
41 | result += (String)equiv_terms_.elementAt(i)+", ";
|
---|
42 | }
|
---|
43 | result += ")";
|
---|
44 | return result;
|
---|
45 | }
|
---|
46 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.