-- | The module provides feature selection functions which extract-- features present in the dataset, i.e. features which directly occure-- the dataset.---- You can mix functions defined here with the selection functions-- from the "Data.CRF.Chain1.Constrained.Feature.Hidden" module.moduleData.CRF.Chain1.Constrained.Feature.Present(presentFeats,presentOFeats,presentTFeats,presentSFeats)whereimportqualifiedData.VectorasVimportData.CRF.Chain1.Constrained.Dataset.InternalimportData.CRF.Chain1.Constrained.Feature-- | 'OFeature's which occur in the dataset.presentOFeats::[(Xs,Ys)]->[Feature]presentOFeatsds=concatMapsentOFeatsdswheresentOFeats(xs,ys)=concatMapoFeatsOn(zip(V.toListxs)(V.toListys))oFeatsOn(x,choice)=[OFeatureoy|o<-unXx,y<-lbschoice]-- | 'TFeature's which occur in the dataset.presentTFeats::[(a,Ys)]->[Feature]presentTFeatsds=concatMap(sentTFeats.snd)dswheresentTFeatsys=concatMap(tFeatsOnys)[1..V.lengthys-1]tFeatsOnysk=[TFeaturexy|x<-lbs(ysV.!k),y<-lbs(ysV.!(k-1))]-- | 'SFeature's which occur in the dataset.presentSFeats::[(a,Ys)]->[Feature]presentSFeatsds=letsentSFeatss=[SFeaturex|x<-lbs(sV.!0)]inconcatMap(sentSFeats.snd)ds-- | 'Feature's of all kinds which occur in the dataset.presentFeats::[(Xs,Ys)]->[Feature]presentFeatsds=presentOFeatsds++presentTFeatsds++presentSFeatsdslbs::Y->[Lb]lbs=mapfst.unY