public Counter < F > getFeatureCounter ( ) { Counter < F > featureCounts = new ClassicCounter < F > ( ) ; for ( int i = 0 ; i < this . size ( ) ; i ++ ) { BasicDatum < L , F > datum = ( BasicDatum < L , F > ) getDatum ( i ) ; Set < F > featureSet = new HashSet < F > ( datum . asFeatures ( ) ) ; for ( F key : featureSet ) { featureCounts . incrementCount ( key , 1.0 ) ; } } return featureCounts ; }
Get Number of datums a given feature appears in .