presentTFeats :: [DAG a Y] -> [Feature]
presentTFeats =
  concatMap sentTFeats
  where
    sentTFeats dag =
      [ C.TFeature x y
      | edgeID <- DAG.dagEdges dag
      , x <- lbs (DAG.edgeLabel edgeID dag)
      , prevEdgeID <- DAG.prevEdges edgeID dag
      , y <- lbs (DAG.edgeLabel prevEdgeID dag) ]


-- | 'SFeature's which occur in the given dataset.
presentTFeats :: [DAG a Y] -> [Feature]
presentTFeats =
  concatMap sentTFeats
  where
    sentTFeats dag =
      [ C.TFeature x y
      | edgeID <- DAG.dagEdges dag
      , x <- lbs (DAG.edgeLabel edgeID dag)
      , prevEdgeID <- DAG.prevEdges edgeID dag
      , y <- lbs (DAG.edgeLabel prevEdgeID dag) ]


-- | 'SFeature's which occur in the given dataset.
presentTFeats =
  concatMap sentTFeats
  where
    sentTFeats dag =
      [ C.TFeature x y
      | edgeID <- DAG.dagEdges dag
      , x <- lbs (DAG.edgeLabel edgeID dag)
      , prevEdgeID <- DAG.prevEdges edgeID dag
      , y <- lbs (DAG.edgeLabel prevEdgeID dag) ]


-- | 'SFeature's which occur in the given dataset.