gov.nist.nlpir.irf.feature
Class IdxFeatWordInString

java.lang.Object
  |
  +--gov.nist.nlpir.irf.feature.IndexingFeature
        |
        +--gov.nist.nlpir.irf.feature.IdxFeatWordInString
Direct Known Subclasses:
IdxFeatWordInText

public class IdxFeatWordInString
extends IndexingFeature

This particular IndexingFeature allows you to keep track of the positional information of a word within a String with the variable wordCount. It will then allow finer grain research and display.

Version:
$Revision: 1.1 $
Author:
This software was produced by NIST, an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification and maintenance.

Field Summary
private  int wordCount
          The rank of the word in the String.
 
Fields inherited from class gov.nist.nlpir.irf.feature.IndexingFeature
feature, proxyRefsCountedTrue, sourceDoc, sourceField
 
Constructor Summary
IdxFeatWordInString(ProxyDataElem feature, ProxyDocument sourceDoc, ProxyDataElem sourceField, int wordCount)
           
 
Method Summary
 int getWordCount()
          Gets the positional information.
 void setWordCount(int wordCount)
          Sets the postional information.
 java.lang.String toString()
          returns string representation of indexing feature showing feature and source.
 
Methods inherited from class gov.nist.nlpir.irf.feature.IndexingFeature
finalize, getFeature, getSourceDoc, getSourceField, setFeature, setProxyRefsCountedTrue, setSourceDoc, setSourceField
 
Methods inherited from class java.lang.Object
, clone, equals, getClass, hashCode, notify, notifyAll, registerNatives, wait, wait, wait
 

Field Detail

wordCount

private int wordCount
The rank of the word in the String.
Constructor Detail

IdxFeatWordInString

public IdxFeatWordInString(ProxyDataElem feature,
                           ProxyDocument sourceDoc,
                           ProxyDataElem sourceField,
                           int wordCount)
Parameters:
f - feature to be stored
s - source document to be stored
Method Detail

toString

public java.lang.String toString()
returns string representation of indexing feature showing feature and source.
Returns:
string representation of indexing feature
Overrides:
toString in class IndexingFeature

getWordCount

public final int getWordCount()
Gets the positional information.

setWordCount

public final void setWordCount(int wordCount)
Sets the postional information.