[&6      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklm n o p q r s t u v w x y z { | } ~                                  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~$ Safe-Infered +Adds a metric at the beginning of the list B (note we reverse the order whene we want to print the metrics)          Safe-Infered Safe-Infered An alternative " instance (the idea being that we  should reserve  for outputting actual Haskell) Minimal implementation is  or   Identical to  CSeparated by space unless one of them is empty (in which case just  the non-empty one) I think I want ($+$) here but I'm not sure I understand the * documentation from the pretty package. t1  t2, separates the two by a newline, unless one 0 of them is empty. The vertical equivalent to '( +)'  + prettyCount toBlah "" (x,1) == "blah" + prettyCount toBlah "foos" (x,1) == "blah" . prettyCount toBlah "" (x,4) == "blah 4" 3 prettyCount toBlah "foos" (x,4) == "blah 4 foos"     Safe-Infered$GenI format; should round-trip with ! by rights "Minimal definition, either one of  or  None8 is something you want to perform detect polarities on. RestrictedPolarityKey c att( is a polarity key in which we only pay - attention to nodes that have the category c. This makes it possible 9 to have polarities for a just a small subset of nodes $ attribute  !"#$%&'(  !"#$%&'( #&%$" !'(  !"#&%$'( Safe-Infered+putStr on stderr 0<Drop all characters up to and including the one in question 10Make the first character of a string upper case 20Make the first character of a string lower case 5.break a list of items into sublists of length < the clump ? size, taking into consideration that each item in the clump 2 will have a single gap of padding interspersed 5any item whose length is greater than the clump size ! is put into a clump by itself given a length function  clumpBy (length.show) 8 [hello, this, is, a, list] 6FAn alphanumeric sort is one where you treat the numbers in the string F as actual numbers. An alphanumeric sort would put x2 before x100,  because 2 <6 10, wheraeas a naive sort would put it the other way # around because the characters 1 <$ 2. To sort alphanumerically, just  'sortBy (comparing toAlphaNum)' =A strict version of  >0True if the intersection of two lists is empty. ?Serves the same function as . It groups together J items by some property they have in common. The difference is that the ; property is used as a key to a Map that you can lookup. E9Return the list, modifying only the first matching item. FStrict version of mapTree! (for non-strict, just use fmap) GLike =, except on Trees. Filter might not be a good name, though, 2 because we return a list of nodes, not a tree. HThe leaf nodes of a Tree I#Return pairs of (parent, terminal) JJ  fn filt t returns a version of t in which the first  node which filt matches is transformed using fn. KLike J+ except that it performs the operations on ! all nodes that match and doesn't care if any nodes match  or not LLike J but on a list of tree nodes M@Replace a node in the tree in-place with another node; keep the C children the same. If the node is not found in the tree, or if C there are multiple instances of the node, this is treated as an  error. N>errors specifically in GenI, which is very likely NOT the user' s fault. P+The module name for an arbitrary data type QAdd two intervals RR x builds a trivial interval from x to x T6displays a bit vector, using a minimum number of bits /)*+,-./0123456789:;<=>?@ABCDEFGHIJreplacement function filtering function KLreplacement function filtering function nodes M which node? NOPQRST,)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST,+,-.0/126345789:;<=B>?@ACDEFGHIJKLM*QRS)TNOP/)*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRST Safe-Infered U7Note: you can define the final state either by setting X  to Just f where f( is some function or by putting them in  Y X\ will use this if defined Ycan be ignored if X is defined Z=there can be more than one transition between any two states . and a transition could be the empty symbol [ if you don'*t care about grouping states into columns 0 you can just dump everything in one big list \\. returns all the final states of an automaton ]]  aut st1 ab returns the states that st1 transitions  to via a. _9Returns all possible paths through an automaton from the  start state to any dead-end. .Each path is represented as a list of labels. 5We assume that the automaton does not have any loops  in it. `?The set of all bundled paths. A bundled path is a sequence of A states through the automaton from the start state to any dead < end. Any two neighbouring states can have more than one A possible transition between them, so the bundles can multiply - out to a lot of different possible paths. (The output is a list of lists of lists: ; Each item in the outer list is a bundled path through the ? automaton, i.e. without distinguishing between the possible 0 transitions from any two neighbouring states 7 Each item in the middle list is represents the set of 5 transitions between two given neighbouring states 5 Each item in the inner list represents a transition  between two given states UVWXYZ[\]^ from state  transition  to state _`abUVWXYZ[\]^_`abUVWXYZ[\^]_`abUVWXYZ[\]^_`ab Safe-Inferedcdefghijkl    cdefghijkl efghijklcd cdefghijkl    " Safe-Infered cdeghijkl eghijklcd None o:An Idable is something that can be mapped to a unique id. < You might consider using this to implement Ord, but I won't. ? Note that the only use I have for this so far (20 dec 2005)  is in alpha-conversion. qA q2 is something which can return its variables as a E map from the variable to the number of times that variable occurs  in it. BImportant invariant: if the variable does not occur, then it does B not appear in the map (ie. all counts must be >= 1 or the item  does not occur at all) ?By variables, what I most had in mind was the GVar values in a L GeniVal. This notion is probably not very useful outside the context of < alpha-conversion task, but it seems general enough that I' ll keep it L around for a good bit, until either some use for it creeps up, or I find 9 a more general notion that I can transform this into. z&constant : no label, just constraints 1 variable : label, with or without constraints ( anonymous : no label, no constraints ~~ x :! [] creates a single constant. ~ x :! xs N creates an atomic disjunction. It makes no difference which of the values  you supply for x and xs* as they will be sorted and nubed anyway. & performs unification on two lists of z. If $ unification succeeds, it returns  Just (r,s) where r is ! the result of unification and v'erb!s! is a list of substitutions that  this unification results in. l1  l2 returns the result of l1  l2 if > doing a simultaneous traversal of both lists, each item in  l1$ subsumes the corresponding item in l2 =Note that the first Subst is assumed to come chronologically % before the second one; so merging  { X -> Y } and  { Y -> 3 }  should give us { X -> 3; Y -> 3 }; See  for a warning! !Add to variable replacement to a y that logical comes before 6 the other stuff in it. So for example, if we have Y -> foo  and we want to insert X -> Y, we notice that, in fact, Y has  already been replaced by foo , so we add X -> foo instead >Note that it is undefined if you try to append something like  Y -> foo to Y -> bar+, because that would mean that unification  is broken See source code for details Note that we assume that it's acceptable to generate new " variable names by appending an x to them; this assumption @ is only safe if the variables have gone through the function  * or have been pre-processed and rewritten @ with some kind of common suffix to avoid an accidental match  x y returns the same result as  unifyOne x y if x  subsumes y or u otherwise FHere it is safe to say (X -> Y; Y -> Z) because this would be crushed / down into a final value of (X -> Z; Y -> Z) ;Anonymise any variable that occurs only once in the object  does the following: @ (if suffix is non-null) appends a suffix to all variable names ! to ensure global uniqueness $ anonymises any singleton variables 6mnopqrstuvwxyz{|}~non-empty list  -mnopqrstuvwxyz{|}~-z{|}~ytxwvusqropmn,mnopqrstxwvuyz{|}~ #None!mnopqrtuvwxyz|}~#z|}|}~txwvuymnqrop  Safe-Infered,Sort an Flist according with its attributes 3 performs feature structure unification, under the & these assumptions about the input:  Features are ordered 9 The Flists do not share variables (renaming has already  been done. ?The features are allowed to have different sets of attributes,  beacuse we use  to realign them. @ is a pre-procesing step used to ensure that feature structures M have the same set of keys. If a key is missing in one, we copy it to the " other with an anonymous value. ;The two feature structures must be sorted for this to work  ! !  Safe-Infered default sorting for a semantics x  y( returns all the possible ways to unify  x with some SUBSET of y so that x subsumes y.  If x does NOT subsume y, we return the empty list. p1  p2 ... FIXME &"#$%&'()*+,-./!"#$%&'()*+,-./  Safe-Inferedfor gui expected results (for testing) 0101  Safe-Infered Flags are GenI'9s internal representation of command line arguments. We Euse phantom existential types (?) for representing GenI flags. This &makes it simpler to do things such as ``get the value of the MacrosFlg'' @whilst preserving type safety (we always know that MacrosFlg is Gassociated with String). The alternative would be writing getters and Bsetters for each flag, and that gets really boring after a while.  lexical selection already done  #built into geni, no parsing needed geni's text format +This only has an effect if the flag is set Z     23X     X     /     23 Safe-Infered*1Path equations can either hit a feature or a node's lexeme attribute -"Left hand side of a path equation 11Parse a path equation using the GenI conventions ( This always succeeds, but can return  Just warning " if anything anomalous comes up  FIXME : make more efficient  !"#$%&'()*+,-./01234456789 !"#$%&'()*+,-./01234-0/.*,+')(&12"%$#! 34! "%$#&')(*,+-0/.1234456789 Safe-Infered58An annotated GeniVal. This is for a rather old, obscure > variant on the polarity filtering optimisation. To account = for zero literal semantics, we annotate each value in the  semantics with a positive/ negative marker. These markers ; are then counted up to determine with we need to insert < more literals into the semantics or not. See the manual * on polarity filtering for more details A See also B 3 This version comes with some sensible defaults. B Variant of A but with more control D:Note that by convention we ignore the polarity associated  with the predicate itself 56789:;<=>?@Aword  family name parameters list (deprecated) "interface (use instead of params) filters  equations  semantics Bword  family name parameters list (deprecated) "interface (use instead of params) filters  equations  semantics semantic polarities CD:;<=>?@56789:;<=>?@ABCD@6789:;<=>?AB5CD56 789:;<=>?@ABCD:;<=>?@$ Safe-Infered5689:;<=>?@ABCD@689:;<=>?AB89:;<=>?5CDNone KA single node of a TAG tree. Ntop feature structure Obottom feature structure PFalse for na nodes Q[] for na nodes T+for TAG, this would be the elementary tree ' that this node originally came from hGiven a lexical item s' and a Tree GNode t, returns the tree t' 4 where l has been assigned to the anchor node in t' iGiven a lexical item l and a tree node n (actually a subtree D with no children), return the same node with the lexical item as I its unique child. The idea is that it converts terminal lexeme nodes I into preterminal nodes where the actual terminal is the given lexical  item kReturn the value of the cat attribute, if available l9Attributes recognised as lexemes, in order of preference AA single node of a TAG tree. BMThe default show for GNode tries to be very compact; it only shows the value B for cat attribute and any flags which are marked on that node. KThis is one the places where the pretty representation of a GenI object is & different from its GenI-format one <EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnoACDEFGHIBJKLMNOPQ+EFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno+bdcXYZ[\]^_`aUWVefgihlnKLMNOPQRSTjEFJIHGkmo$EFJIHGK LMNOPQRSTUWVX YZ[\]^_`abcdefghijklmnoACDEFGHIBJKLMNOPQ Safe-Infered pp is a generalisation of z.  can be empty An anchored grammar. P The grammar associates a set of semantic predicates to a list of trees each. addTags  tags key elem adds elem( to the the list of elements associated  to the key AGiven a tree(GNode) returns a list of substitution or adjunction H nodes, as well as remaining nodes with a null adjunction constraint. @Plug the first tree into the second tree at the specified node. 9 Anything below the second node is silently discarded. @ We assume the trees are pluggable; it is treated as a bug if  they are not! Given two trees auxt and t, splice the tree auxt into  t via the TAG adjunction rule. FAssigns a unique id to each element of this list, that is, an integer ' between 1 and the size of the list. CSorts trees into a Map.Map organised by the first literal of their E semantics. This is useful in at least three places: the polarity M optimisation, the gui display code, and code for measuring the efficiency H of GenI. Note: trees with a null semantics are filed under an empty  predicate, if any. >Normally, extracting the sentences from a TAG tree would just D consist of reading its leaves. But if you want the generator to C return inflected forms instead of just lemmas, you also need to H return the relevant features for each leaf. In TAG, or at least our H use of it, the features come from the *pre-terminal* nodes, that is, @ not the leaves themselves but their parents. Another bit of E trickiness: because of atomic disjunction, leaves might have more  than one value, so we can'+t just return a String lemma but a list of % String, one for each possibility. 3Try in order: lexeme, lexeme attributes, node name 9pqrstuvwxyz{|}~foot node of the aux tree  aux tree place to adjoin in target tree  target tree RSTUVWXYZ[\].rpqrstuvwxyz{|}~.z{|}~pqrstyuxwvr"pqrstuxwvyz {|}~RSTUVWXYZ[\] Safe-Infered1Just the String representations of the semantics  in the test suite .This is only used by the script genimakesuite <This makes it possible to read anchored trees, which may be " useful for debugging purposes. EFIXME: note that this is very rudimentary; we do not set id numbers,  parse polarities. You'll have to call @ some of our helper functions if you want that functionality. ^_`abcdefghijklmnopqrstuvwxyz{|}~^_` Safe-InferedA sentence composed of  instead of plain old words (A lemma plus its morphological features     Safe-InferedDConverts information from a morphological information file into GenI's  internal format. GFilters away from an input semantics any literals whose realisation is K strictly morphological. The first argument tells us helps identify the N morphological literals -- it associates literals with morphological stuff;  if it returns , then it is non-morphological  morphfn sem cands$ does the bulk of the morphological  input processing. We use morphfn to determine which literals in  semF contain morphological information and what information they contain. J Then we attach this morphological information to the relevant trees in  cand:. A tree is considered relevant w.r.t to a morphological L literal if its semantics contains at least one literal whose first index @ is the same as the first index of the morphological literal. HExtracts the lemmas from a list of uninflected sentences. This is used 9 when the morphological generator is unavailable, doesn' t work, etc. HConverts a list of uninflected sentences into inflected ones by calling  Safe-Infered)Warnings from the morphological realiser 5Literals which did not receive any lexical selection A single custom warning BA warning that should be repeated for each lexical entry affected  This exists because we want the  instance, providing a C GenI-specific notion of appending which merges instances of the  same error -Sort, treating non-comporable items as equal .A warning may be displayed over several lines % Safe-Infered Safe-InferedThe 2 monad supports warnings during lexical selection  and also failure via Maybe ,The result of the lexical selection process @the main result: a set of elementary trees (ie. anchored trees) Aif available, lexical entries that were used to produce anchored 4 trees (useful for identifying anchoring failure)  HINT: use &' to initialise to empty See (' if you want to use GenI with a custom  lexical selection function. 9Performs standard GenI lexical selection as described in   >http://projects.haskell.org/GenI/manual/lexical-selection.html  This is just  lifted into IO  Helper for  6 (Standard GenI lexical selection is actually pure)  This is just  and  missingLexEntries ts lexs' returns any of the lexical candidates  lexs0 that were apparently not anchored succesfully. ?TODO: it does this by (wrongly) checking for each lexical item * to see if any of the anchored trees in ts have identical D semantics to that lexical item. The better way to do this would E be to throw a subsumption check on top of items reported missing,  because it'2s possible for the trees to add semantics through  unification. GSelect and returns the set of entries from the lexicon whose semantics ! subsumes the input semantics.  sem l$ attempts to unify the semantics of l with sem I If this succeeds, we use return the result(s); if it fails, we reject  l# as a lexical selection candidate. ( is a factorisation technique that uses B atomic disjunction to merge all synonyms into a single lexical @ entry. Two lexical entries are considered synonyms if their = semantics match and they point to the same tree families. <FIXME: 2006-10-11 - note that this is no longer being used, > because it breaks the case where two lexical entries differ 2 only by their use of path equations. Perhaps it' s worthwhile = just to add a check that the path equations match exactly. Note an anchoring error !defaultAnchoring schemata lex sem' implements the later half of lexical @ selection (tree anchoring and enrichement). It assumes that lex consists P just of the lexical items that have been selected, and tries to combine them  with the tree schemata. OThis function may be useful if you are implementing your own lexical selection 6 functions, and you want GenI to take over after you've given it a  [LexEntry] DGiven a lexical item, looks up the tree families for that item, and ! anchor the item to the trees. HCombine a single tree with its lexical item to form a bonafide TagElem. G This process can fail, however, because of filtering or enrichement See  4http://projects.haskell.org/manual/lexical-selection  on enrichement  Helper for " (enrich by single path equation)  Helper for  enrichFeat av fs attempts to unify av with fs Note here that fs is an Flist [GeniVal] rather than the usual   Flist GeniVal0 you may expect. This is because it comes from  d) which allows non-atomic disjunctions of GeniVal E which have to be flatten down to at most atomic disjunctions once " lexical selection is complete. missingCoanchors l t. returns the list of coanchor node names from l  that were not found in t Split a lex entry'6s path equations into interface enrichement equations  or (co-)anchor modifiers seekCoanchor lhs t returns  Just node if t contains exactly one " node that can be identified by lhs, Nothing if it contains none. DIt crashes if there is more than one such node, because this should % have been caught earlier by GenI. matchNodeName lhs n is True if the lhs refers to the node n matchNodeNameHelper/ recognises anchor  by convention; otherwise,  it does a name match (The lemanchor mechanism is described in   4http://projects.haskell.org/manual/lexical-selection @The name of the lemanchor attribute (by convention; see source)  setOrigin n t marks the nodes in t as having come from  a tree named n any warnings, plus the results  Safe-Infered>Holds the specification for how Geni should be run, its input B files, etc. This is the stuff that would normally be found in  the configuration file. 6Can still be overridden with a morph command mind you Lexical selection function ( (if you set this you may want to add   to the config) %The default parameters configuration ?Uses the GetOpt library to process the command line arguments. 9 Note that we divide them into basic and advanced usage. HPrint out a GenI-style usage message with options divided into sections ,TODO: This is a horrible and abusive use of  ;Update the internal instructions list, test suite and case 6 according to the contents of an instructions file. Basic approach D we always have instructions: if no instructions file, is specified < we infer virtual instructions from the test suite flag H * the testsuite and testcase flags are focusing tools, they pick out $ a subset from the instructions ,flag ;string reader for flag (probably |id| if already a String)  description flag default value string reader (as in reqArg)  description options  prog name                *     &      Safe-Infered!?Given a description of what the root feature should unify with D return a -1 polarity for all relevant polarity keys. This allows < us to compensate for the root node of any derived tree. (*Convert any unconstrained polarities in a  to constrained ; ones, assuming a global list of known constrained keys. *BEnsures that all states and transitions in the polarity automaton < are unique. This is a slight optimisation so that we don' t have to B repeatedly check the automaton for state uniqueness during its C construction, but it is essential that this check be done after  construction -;Note that this will crash if any of the entries are errors .;Note that this will crash if any of the entries are errors  !"#polarity to assign attribute to look for  feature structure to filter on ( only) $feature structure to get value from $%&'()*+,-.on error message  !"#$%&'()*+,-. !"#$%&'()*+,-. !"#$%&'()*+,-. Safe-Infered13position in the input semantics, extra semantics,  polarity interval 3Aintermediate auts, seed aut, final aut, potentially modified sem 9EConstructs a polarity automaton. For debugging purposes, it returns I all the intermediate automata produced by the construction algorithm. ;KReturns a modified input semantics and lexical selection in which pronouns  are properly accounted for. A5Given a list of paths (i.e. a list of list of trees) M return a list of trees such that each tree is annotated with the paths it  belongs to. B8Render the list of polarity automaton paths as a string /0123456789polarities to detect (eg. cat)  root features to compensate for explicit extra polarities input semantics lexical selection :;<=>?@ABC' !"#$%&'(UZ[\_/0123456789:;<=>?@ABC/0123456789:;?>@A=<BC_\UZ[/0123456789:;<=>?@ABC Safe-InferedGHDispatching consists of assigning a chart item to the right part of the G chart (agenda, trash, results list, etc). This is implemented as a K series of filters which can either fail or succeed. If a filter fails, B it may modify the item before passing it on to future filters. LIA SentenceAut represents a set of sentences in the form of an automaton. J The labels of the automaton are the words of the sentence. But note! J word  in the sentence is in fact a tuple (lemma, inflectional feature H structures). Normally, the states are defined as integers, with the F only requirement being that each one, naturally enough, is unique. MCTo simplify interaction with the backend, we provide a single data C structure which represents all the inputs a backend could take. Pfor the debugger Q tag tree UAinitialise the machine from the semantics and lexical selection Vrun a realisation step W,run all realisations steps until completion X%determine if realisation is finished Y.unpack chart results into a list of sentences `Equivalent to 5 unless the input contains an empty or uninstatiated  semantics aNPerforms surface realisation from an input semantics and a lexical selection. Statistics tracked  L pol_used_bundles - number of bundled paths through the polarity automaton.  see ` > pol_used_paths - number of paths through the final automaton X pol_seed_paths - number of paths through the seed automaton (i.e. with no polarities). X This is normally just 1, unless you have multi-literal semantics O pol_total_states - combined number of states in the all the polarity automata J pol_total_tras - combined number of transitions in all polarity automata R pol_max_states - number of states in the polarity automaton with the most states [ pol_total_tras - number of transitions in the polarity automata with the most transitions = sem_literals - number of literals in the input semantics < lex_trees - total number of lexically selected trees b;assign a bit vector value to each literal in the semantics > the resulting map can then be used to construct a bit vector ! representation of the semantics eDefault implementation for the W function in S fSequence two dispatch filters. gBIf the item meets some condition, use the first filter, otherwise  use the second one. oAThe names of lexically selected chart items used in a derivation /DEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno-yDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmno-ySTUVWXYZ[^]\oDFEhlnmfHbcdGgeIJKMNOPQ`jRLaik_DFEGHIJKLMNOPQRSTUVWXYZ[^]\_`abcdefghijklmno Safe-Inferedp7Things whose only use is within the graphical debugger rnodes to highlight 1 if there are things wrong with this item, what? }actually a set !Creates an initial SimpleStatus. ,pqrstuvwxyz{|}~*pqrstuvwxyz{|}~1vwxyz{|}~pqrstupqrstuv wxyz{|}~ Safe-Infered.these traces must not appear AT THE SAME TIME the trace must NOT appear the trace must appear  Safe-Infered original  uninflected result results after morphology $warnings local  to this particular  item, cf.  "derivation tree behind the result normally a chart item id the lexical selection behind  this result (info only) see ) #which OT constraints were violated = is the outcome of running GenI on a single input semantics. 0 Each distinct result is returned as a single  (NB: a single A result may expand into multiple strings through morphological  post-processing), one per chart item usually from lexical selection "things like number of chart items  to help study efficiency DThe file loading functions all work the same way: we load the file, & and try to parse it. If this doesn' t work, we just fail in IO, and G GenI dies. If we succeed, we update the program state passed in as  an IORef. FThe program state consists of its configuration options and abstract, 0 cleaned up representations of all the data it's had to load into memory H (tree schemata files, lexicon files, etc). The intention is for the I state to stay static until the next time something triggers some file  loading. the current configuration tree schemata lexical entries "function to extract morphological ) information from the semantics (you may  instead be looking for  ) OT constraints (optional) simplified traces (optional) >The program state when you start GenI for the very first time IWe have one master function that loads all the files GenI is expected to K use. This just calls the sub-loaders below, some of which are exported L for use by the graphical interface. The master function also makes sure H to complain intelligently if some of the required files are missing. 0Load something from a string rather than a file :The macros are stored as a hashing function in the monad. 5Entry point! (the most useful function to know here) C Initialises the realiser (lexical selection, among other things), : Runs the builder (the surface realisation engine proper)  Unpacks the builder results 2 Finalises the results (morphological generation) KIn addition to the results, this returns a generator state. The latter is ? is mostly useful for debugging via the graphical interface. I Note that we assumes that you have already loaded in your grammar and  parsed your input semantics. This is a helper to runGenI. It'$s mainly useful if you are building % interactive GenI debugging tools. Given a builder state,  Unpacks the builder results 2 Finalises the results (morphological generation) > performs lexical selection and strips the input semantics of  any morpohological literals KShow the sentences produced by the generator, in a relatively compact form 6No morphology! Pretend the lemma string is a sentence 2 is most likely useful for grammars produced by a ; metagrammar system. Given a tree name, we retrieve the `trace' G information from the grammar for all trees that have this name. We I assume the tree name was constructed by GenI; see the source code for  details. Nsource (optional)  description string to load      =A=A-       Safe-InferedFUsed in processing instructions files. Each instruction consists of a ; suite file and a list of test case names from that file See  9http://projects.haskell.org/GenI/manual/command-line.html for F how testsuite, testcase, and instructions are expected to interact .(Exported for use by regression testing code)  Safe-Infered Safe-Infered*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                                                                                               ! "#$%&'()*+,-./0123456789::;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~      !"#$%&'()*+,-.//0123456789:;<=>?@ABCDEEFGGHIJKLLMNOPQRSTUVWXYZ[\]^_`abcdefghhijklmmnopqrstuvwxyz{|}~N      ****                                     ! " #$%&'()*+, -./0123456789:;<=>?@AB CDEFGHIJKLMNOPNOQNORNOSNOTNOUNOVNOWNOXNOYNOZNO[N\]N\^N_`N_`N_aN_bN_cN_dN_eN_fN_gN_hN_iN_jN_kN_lN_mN_nN_oN_pN_qN_rN_sN_tN_uN_vN_wN_xN_yN_zN{|N{}N{~N{N{N{N{N{N{N{N{N{N{N{N{N{N{NNNNN<NNNNNNNNNNNNNNNNNNN!N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_N_TN_N_N_**&*************** GenI-0.22NLP.GenI.ConfigurationNLP.GenI.StatisticsNLP.GenI.PrettyNLP.GenI.GeniShowNLP.GenI.Polarity.TypesNLP.GenI.GeneralNLP.GenI.AutomatonData.FullList.InternalNLP.GenI.GeniVal.InternalNLP.GenI.FeatureStructureNLP.GenI.SemanticsNLP.GenI.TestSuite NLP.GenI.FlagNLP.GenI.LexicalSelection.TypesNLP.GenI.Lexicon.InternalNLP.GenI.TreeSchema NLP.GenI.TagNLP.GenI.ParserNLP.GenI.Morphology.TypesNLP.GenI.MorphologyNLP.GenI.Warning.InternalNLP.GenI.LexicalSelectionNLP.GenI.Polarity.InternalNLP.GenI.PolarityNLP.GenI.BuilderNLP.GenI.Simple.SimpleBuilderNLP.GenI.OptimalityTheoryNLP.GenINLP.GenI.Console NLP.GenI.MainBoolExp Paths_GenIParser Data.FullListNLP.GenI.GeniValNLP.GenI.LexiconNLP.GenI.Warning Data.Monoidmempty ConfigurationOptimalityTheorybaseData.Typeable.InternalTypeableMetric IntMetricStatisticsState Statistics updateMetrics queryMetrics emptyStatsinitialStatisticsStateFor addMetricshowFinalStats incrIntMetricqueryIntMetricPrettypretty prettyStrbetweenparenssquares<><+>above prettyCountGeniShowgeniShow geniShowText geniShowTree geniKeyword PolarityAttrRestrictedPolarityAttr_rpkCatrpkAttSimplePolarityAttrspkAttSemPols PolarityKeyPolarityKeyVarPolarityKeyStr PolarityKeyAvreadPolarityAttrsshowPolarityAttrs BitVectorIntervalePutStr ePutStrLneFlushisGeniIdentLettertrimdropTillIncluding toUpperHead toLowerHead quoteString quoteTextclumpBy toAlphaNumfirst3second3third3fst3snd3thd3map'isEmptyIntersect groupByFMinsertToListMap histogrambuckets combinations mapMaybeMrepListmapTree' filterTree treeLeaves preTerminalsrepNode repAllNode listRepNode repNodeByNodegeniBugprettyException mkLogname!+!ival showInterval showBitVectorNFAstartSt isFinalSt finalStList transitionsstatesfinalSt lookupTransaddTransautomatonPathsautomatonPathSets numStatesnumTransitionsListable!:FullListfromFLindeedFLheadtail++sortNubDescendGeniValdescendGeniValIdableidOf Collectablecollect CollectedVarUnificationResultFailure SuccessRep2 SuccessRep SuccessSansSubstGeniValgLabel gConstraintsmkGConst mkGConstNonemkGVar mkGVarNonemkGAnonisConst singletonValisVarisAnon prettySubstunify allSubsume unifyHelper appendSubstprependToSubstunifyOneintersectConstraints subsumeOnereplace replaceOne replaceList replaceMapG replaceOneGanonymiseSingletonsfinaliseVarsById finaliseVarscrushOne crushList FeatStructAvPairavAttavValFlistemptyFeatStruct mkFeatStructfromFeatStruct sortFlist unifyFeat alignFeat alignFeatH crushAvPair crushFlist HasConstants constantsSemInput LitConstrSemLiterallHandle lPredicatelArgs emptyLiteralremoveConstraintssortSemcompareOnLiteralsortByAmbiguity literalCount boringLiteralisInternalHandle subsumeSem subsumeSemHsubsumeLiteralunifySem unifySemH unifyLiteralTestCasetcName tcSemStringtcSem tcExpectedWeirdFlgGrammarTypeFlg BuilderFlg ViewCmdFlg VersionFlgVerboseModeFlg TimeoutFlg TestSuiteFlgTestInstructionsFlg TestCaseFlg StatsFileFlgNoLoadTestSuiteFlgRootFeatureFlgRankingConstraintsFlg PartialFlg OutputFileFlgOptimisationsFlg MorphInfoFlg MorphCmdFlg MetricsFlg MaxResultsFlg MaxStepsFlg TracesFlg MacrosFlg LexiconFlgInstructionsFileFlgHelpFlg FromStdinFlg EarlyDeathFlgDumpDerivationFlgDetectPolaritiesFlg DisableGuiFlg BatchDirFlgFlag GrammarType PreAnchored PreCompiledGeniHand BuilderTypeSimpleOnePhaseBuilder SimpleBuilder Instruction Optimisation NoConstraints PolarisedAdjOptsPolOptsisFlaghasFlag deleteFlag modifyFlagsetFlaggetFlag getAllFlagsLexCombineError2 StringError EnrichErrorLexCombineError SchemaErrorFamilyNotFoundError BoringError PathEqPair TopBottomBottomTop NodePathEqLhsPeqLexPeqFeat PathEqLhs PeqUnknownPeqJust PeqInterface parsePathEq showPathEqLhsshowLexCombineErrorcompressLexCombineErrorsPolValueLexEntryiwordifamnameiparams iinterfaceifilters iequations isemanticsisempolsLexicon mkLexEntrymkFullLexEntry fromLexSemfromLexLiteralNodeNameGTypeOtherLexFootSubsGNodeGNgnnamegupgdownganchorglexemegtypegaconstrgoriginPtypeAuxiliarInitialTtreeTTparamspfamilypidname pinterfaceptype psemanticsptracetreeMacros SchemaNode SchemaTreerootrootUpdfoot setAnchor setLexemegnnameIs gCategorylexemeAttributes showLexemecrushTreeGNode crushGNodeTagItemtgIdNametgIdNum tgSemanticstgTreeDerivationStepInitStepAdjunctionStepSubstitutionStep TagDerivationTagElemTEidname ttreenametidnumttypettree tsemantics tpolarities tinterfacettracetsempolsTagSitetsNametsUptsDowntsOriginTags addToTags detectSites toTagSitedsChilddsParent dsParentSiteplugTree spliceTree setTidnumsmapBySem tagLeaves getLexemets_synIncompletets_tbUnificationFailurets_rootFeatureMismatchts_semIncompletegeniLanguageDef geniValue geniFeats geniSemanticsgeniSemanticInputtoSemInputString geniTestSuitegeniTestSuiteStringgeniDerivations geniWordsgeniWord geniLexicon geniMacros geniTagElems geniMorphInfotillEof parseFromFileLemmaPlusSentence LemmaPluslpLemmalpFeats MorphOutput moWarningsmoRealisations MorphRealiser MorphInputFn parsecToJSON readMorph stripMorphSem attachMorphsetMorphAnchor sansMorphinflectSentencesUsingCmdWordFamilyCount LexWarningMissingCoanchorsLexCombineOneSchemaFailedLexCombineAllSchemataFailed GeniWarning MorphWarningNoLexSelectionCustomLexWarning GeniWarningsfromGeniWarningsmkGeniWarningsposort sortWarnings appendWarning mergeWarningshowGeniWarning toWfCount LexCombineLexicalSelection lsAnchored lsLexEntries lsWarningsLexicalSelectordefaultLexicalSelectordefaultLexicalSelectionmissingLexEntriesdefaultLexicalChoice chooseCandI mergeSynonymslexTelldefaultAnchoring combineList combineOneenrichenrichBy maybeEnrichBy enrichFeatmissingCoanchors lexEquations seekCoanchor matchNodeNamematchNodeNameHelper setLemAnchors _lemanchor setOriginParams grammarType builderType customMorphcustomSelector geniFlags emptyParamshasOpthasFlagP deleteFlagP modifyFlagPsetFlagPgetFlagP getListFlagPoptionsForStandardGenI basicSectionsoptionsSections nubBySwitchesnoArgreqArgoptArgusage treatArgstreatArgsWithParams defineParamsoptionsForBasicStuffoptionsForInputFiles macrosOption lexiconOption helpOption verboseOptionoptionsForOptimisationparseFlagWithParsecoptionsForBuildermainBuilderTypesoptionsForTestingoptionsForMorphologyprocessInstructionsreadGlobalConfig setLoggersPolMapSemMapPolarityDetectionResultPD_UnconstrainedPD_Just PD_Nothing PD_UserErrordetectRootCompensation detectPolsHdetectPolaritytoZero substNodes substTops polarityKeysconvertUnconstrainedPolaritiesaddPolsnubAut__cat____idx__ pdResultspdToListPolAutPolStatePolStAutDebug PolResultprIntermediate prInitialprFinalprSembuildAutomaton makePolAut fixPronounsdetectIdxConstraintsdeclareIdxConstraintssuggestPolFeatures detectSansIdx detectPolsdetectPolPathsprettyPolPathsprettyPolPaths' FilterStatus NotFilteredFilteredDispatchFilter SemBitMap BuilderStateUninflectedDisjunction SentenceAutInput inSemInputinLexinCandsOutputBuilderinitstepstepAllfinishedunpackpartial GenStatusErrorActiveFinishedpreInitunlessEmptySemrundefineSemanticBitssemToBitVectorbitVectorToSemdefaultStepAll>--> condFilter incrCounter queryCounter initStatsdefaultMetricNamesnum_iterations chart_sizenum_comparisonslexicalSelection SimpleGuiItem siHighlight siDiagnostic siFullSemsiIdname SimpleItemsiId siSubstnodes siAdjnodes siSemantics siPolpathssiNodes siDerivedsiRoot_siFoot_ siPendingTb siDerivation siGuiStuff SimpleStatus theAgenda theHoldingPentheCharttheTrash theResults genconfig SimpleStateChart AuxAgendaAgendasimpleBuilder_2psimpleBuilder_1p simpleBuilder addToAgenda addToCharttestEmptySimpleGuiIteminitSimpleBuildertestIapplyAdjNode testCanAdjoin unpackResultOtResult GetTraces OtViolation OtRankingRankedOtConstraint OtConstraint NegativeConjC NegativeC PositiveC otWarnings rankResultsprettyViolations prettyRank ResultType PartialResultCompleteResult GeniLexSelnlTreenlTrace GeniSuccessgrLemmaSentencegrRealisations grResultType grWarnings grDerivationgrOrigingrLexSelection grRanking grViolations GeniError GeniResultGSuccessGError GeniResults grResultsgrGlobalWarnings grStatisticsBadInputExceptionLoadablelParselSet lSummarise ProgStateRef ProgStatepagrlemorphinfrankingtracesemptyProgStateloadEverythingloadFromString loadLexiconloadGeniMacros loadRanking loadTestSuite parseSemInput isSuccessrunGeniextractResultsinitGenishowRealisationslemmaSentenceString prettyResult getTraces consoleGeni loadNextSuitemain mainWithState forceGuiFlagNotOrAndCondcheck$fNFDataMetric$fNFDataStatistics$fJSONStatistics $fShowMetricversion getBinDir getLibDir getDataDir getLibexecDirgetDataFileNameGHC.ShowShow text-0.11.2.0 Data.Textappend$fPrettyInteger $fPrettyInt $fPretty[]$fGeniShowTree$fNFDataPolarityAttr$fNFDataPolarityKey$fShowPolarityAttr$fPrettyPolarityKeyGHC.Basemap Data.ListgroupByGHC.Listfilter $fJSONText $fOrdAlphaNum $fBinaryText$fBinaryFullList$fNFDataFullList$fListableFullList $fListable[]$fFunctorFullList$fBinaryGeniVal$fNFDataGeniVal$fDescendGeniValf$fDescendGeniValGeniVal$fCollectableGeniVal$fCollectable[]$fCollectableMaybe$fGeniShowGeniVal$fPrettyGeniVal$fNFDataAvPair$fBinaryAvPair$fGeniShowAvPair $fGeniShow[]$fPrettyAvPair$fCollectableAvPair$fDescendGeniVal(,)$fDescendGeniVal(,)0$fDescendGeniValAvPair $fGeniShowMap $fPrettyMap$fBinaryLiteral$fNFDataLiteral$fGeniShow(,,) $fPretty(,,)$fGeniShowLiteral$fPrettyLiteral$fDescendGeniValLiteral$fHasConstantsLiteral$fHasConstants[]$fHasConstantsGeniVal$fCollectableLiteral $fOrdLiteral$fPrettyTestCase$fGeniShowTestCase$fEqFlag$fShowBuilderType$fPrettyLexCombineError2$fPrettyLexCombineError $fPosetText$fPosetPathEqLhs$fPosetLexCombineError2$fPosetLexCombineError$fNFDataLexEntry$fBinaryLexEntry$fPrettyLexEntry$fGeniShowLexEntry$fCollectableLexEntry$fDescendGeniValLexEntry $fNFDataGNode $fPrettyGNode $fNFDataPtype $fNFDataGType $fBinaryTtree $fBinaryGType $fBinaryGNode $fBinaryPtype$fGeniShowGNode$fGeniShowTtree$fGeniShowPtype$fDescendGeniValGNode$fCollectableGNode$fCollectableTree$fDescendGeniValMap$fCollectableTtree$fDescendGeniValTtree$fNFDataDerivationStep$fNFDataTagElem$fGeniShowTagElem$fTagItemTagElem$fIdableTagElem$fCollectableTagElem$fDescendGeniValTagSite$fDescendGeniValTagElem $fOrdTagElem$fJSONDerivationStep$fGeniShowSemInputString$fGeniValLike[]$fGeniValLikeGeniVal parsec-3.1.2Text.Parsec.Pos SourcePosColumnLine SourceName sourceName sourceLine sourceColumn incSourceLineincSourceColumn setSourceName setSourceLinesetSourceColumnText.Parsec.Error ParseErrorerrorPosText.Parsec.PrimState stateInputstatePos stateUser unexpected<|>labellabelstokens lookAheadtoken tokenPrim tokenPrimExmanyskipManyparse parseTest getPositiongetInput setPositionsetInputgetParserStatesetParserStategetStatesetState updateStateText.Parsec.CharoneOfnoneOfspacesspacenewlinetabupperloweralphaNumletterdigithexDigitoctDigitcharanyCharsatisfystringText.Parsec.Combinatorchoiceoption optionMaybeoptional skipMany1many1sepBysepBy1 sepEndBy1sepEndByendBy1endBycountchainrchainlchainl1chainr1anyTokeneof notFollowedBymanyTillText.Parsec.String GenParser modifyStateputStateupdateParserState runParser runParserTrunPrunPT manyAccumtry parserPlus parserZero parserFailmergeErrorReply parserBind parserReturn parsecMapmkPT runParsecTsysUnExpectError unknownErrorParsecTParsecConsumedEmptyOkReplyunconsStream$fNFDataLemmaPlus$fNFDataMorphOutput$fJSONLemmaPlus$fJSONMorphOutput Data.MaybeNothingMonoid$fPosetLexWarning$fPosetGeniWarning$fMonoidGeniWarningsGHC.Errerror$fIsStringYamlLight $fReadLogFmt $fReadLogToSystem.Console.GetOptgetOpt'getOpt usageInfo RequireOrderPermute ReturnInOrderArgOrderOptionOptDescrNoArgReqArgOptArgArgDescr $fOrdPolState$fShowPolStateid $fNFDataInput#$fCollectableUninflectedDisjunction&$fDescendGeniValUninflectedDisjunction$fDescendGeniValSimpleItem$fNFDataOtConstraint$fNFDataRankedOtConstraint$fNFDataOtViolation$fPrettyOtConstraint$fPrettyRankedOtConstraint$fJSONOtViolation$fJSONRankedOtConstraint$fJSONOtConstraint$fOrdRankedOtConstraint2$fOrdRankedOtConstraint$fNFDataGeniLexSel$fNFDataResultType$fNFDataGeniError$fNFDataGeniSuccess$fNFDataGeniResult$fJSONGeniLexSel$fJSONResultType$fJSONGeniError$fJSONGeniSuccess$fJSONGeniResult$fLoadablePreAnchoredL$fPrettyGeniError$fLoadableTestSuiteL $fLoadable[]$fLoadableTracesL$fLoadableMorphFnL $fLoadable[]0 $fLoadable[]1$fExceptionBadInputException