-- | The module provides feature selection functions which extract-- hidden features, i.e. all features which can be constructed -- (by means of cartesian product) on the basis of the set of-- observations and the set of labels.-- For example, the list of hidden observation features can-- be defined as 'OFeature' '<$>' os '<*>' xs, where os is a-- list of all observations and xs is a list of all labels.---- You can mix functions defined here with the selection functions-- from the "Data.CRF.Chain1.Feature.Present" module.moduleData.CRF.Chain1.Feature.Hidden(hiddenFeats,hiddenOFeats,hiddenTFeats,hiddenSFeats)whereimportqualifiedData.SetasSimportqualifiedData.VectorasVimportData.CRF.Chain1.Dataset.InternalimportData.CRF.Chain1.Feature-- | Hidden 'OFeature's which can be constructed based on the dataset.hiddenOFeats::[(Xs,Ys)]->[Feature]hiddenOFeatsds=[OFeatureox|o<-collectObsds,x<-collectLbsds]-- | Hidden 'TFeature's which can be constructed based on the dataset.hiddenTFeats::[(Xs,Ys)]->[Feature]hiddenTFeatsds=letxs=collectLbsdsin[TFeaturexy|x<-xs,y<-xs]-- | Hidden 'SFeature's which can be constructed based on the dataset.hiddenSFeats::[(Xs,Ys)]->[Feature]hiddenSFeats=mapSFeature.collectLbs-- | Hidden 'Feature's of all types which can be constructed-- based on the dataset.hiddenFeats::[(Xs,Ys)]->[Feature]hiddenFeatsds=hiddenOFeatsds++hiddenTFeatsds++hiddenSFeatsdscollectObs::[(Xs,Ys)]->[Ob]collectObs=nub.concatMap(sentObs.fst)collectLbs::[(Xs,Ys)]->[Lb]collectLbs=nub.concatMap(sentLbs.snd)sentObs::Xs->[Ob]sentObs=concatMapunX.V.toListsentLbs::Ys->[Lb]sentLbs=concatMaplbsAll.V.toListlbsAll::Y->[Lb]lbsAll=mapfst.unYnub::Orda=>[a]->[a]nub=S.toList.S.fromList