antfarm-0.1.0.0: Referring expressions for definitions

Portabilityportable
Stabilityexperimental
Maintainereric.kow@gmail.com
Safe HaskellSafe-Infered

NLP.Antfarm.Demo

Description

Helper functions for the antfarm demonstrator. You probably don't want to import this module unless you're doing something amusing like making a web app out of the antfarm demonstrator. But it could be useful to look at the source if you're making something using antfarm

Synopsis

Documentation

data DemoElem Source

Constructors

DemoElem 

Fields

dClass :: Text
 
dConstr :: Constr
 

Instances

data Constr Source

Instances

fromDemoForest :: [Tree DemoElem] -> [DiscourseUnit]Source

Regroup constraints and examples so that like are with like

 a1 b3 a4
   ==> [a1 a4] [b3]
 a1 b3 a4 (x <= 3) b6
   ==> [a1 a4]([x <= 3]) [b3 b6]
 a1 b3 a4 (x <= 3) b6 (y >= 8) a <= 1 (x >= 8)
   ==> [a1 a4]([x <= 3 >= 8]) [b3 b6]([y>=8])

class Pretty a whereSource

Methods

pretty :: a -> TextSource

buckets :: Ord b => (a -> b) -> [a] -> [(b, [a])]Source

onSubTrees :: (Tree a -> b) -> Tree a -> Tree bSource