﻿<Workspace x:Name="wksp_root"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  xmlns="clr-namespace:agree;assembly=agree-sys"
  xmlns:semi="clr-namespace:agree.semi;assembly=agree-sys"
  xmlns:tsdb="clr-namespace:agree.itsdb;assembly=tsdb-core">

    <Workspace.DefaultDirectories>
        <x:String>grammars\erg</x:String>
    </Workspace.DefaultDirectories>

    <MaxEntModel x:Name="the_maxent_model" Loader="{MaxEntModelLoader redwoods.mem}" />

    <PosTrigramModel x:Name="English_pos_trigram_hmm" Filename="agree/english-pos.hmm" />

    <XamlLoadInstance x:Name="ERG_xli" Filename="agree/erg.xml" />

    <PathRef x:Name="ERG" Item="{x:Reference ERG_xli}" Path="Result.NameScope[ERG]" />

    <PredicateIndex x:Name="ERG_pred_idx">
        <PredicateIndexLoader Lexicon="{PathRef {x:Reference ERG}, Lexicon}">
            <PredicateIndexLoader.DuplicateLexIds>
                <DuplicateLexIds EntryMgr="{PathRef {x:Reference ERG}, EntryMgr}">
                    <ReadFileLines Filename="lkb/nogen-lex.set" />
                </DuplicateLexIds>
            </PredicateIndexLoader.DuplicateLexIds>
        </PredicateIndexLoader>
    </PredicateIndex>

    <x:Array x:Name="_root_strict" Type="StartSymbol">
        <PathRef Item="{x:Reference ERG}" Path="EntryMgr.ParserStartSymbols[0]" />
    </x:Array>

    <!--<tsdb:TsdbDatabase x:Name="hike_tsdb" LoadDirectory="tsdb\gold\hike" Uncompress="True" />-->

    <StringCorpus x:Name="hike_all" Items="{TextFileLoader grammars/erg-agree/hike/hike-results-use.txt}" />

    <StringCorpus x:Name="hike_textfile_sentences">
        <Item xml:lang="en" Text="Kim will have had to have been running." ExpectedDerivationCount="4" />
        <Item xml:lang="en" Text="Old cows eat soft grass." ExpectedDerivationCount="1" />
        <Item xml:lang="en" Text="What happened?" ExpectedDerivationCount="2" />
        <Item xml:lang="en" Text="I’m going to the market." ExpectedDerivationCount="2" />
        <Item xml:lang="en" Text="You are not permitted to look." ExpectedDerivationCount="9" />
        <Item xml:lang="en" Text="He bought it and he visited his friend." ExpectedDerivationCount="1" />
        <Item xml:lang="en" Text="Something must have happened." ExpectedDerivationCount="2" />
        <Item xml:lang="en" Text="She opened the door and let me in." ExpectedDerivationCount="2" />
        <TextFileLoader Filename="grammars\erg-agree\hike\hike-results-use.txt" SkipItems="0" TakeItems="45" />
    </StringCorpus>

    <!--<LoadedDerivations x:Name="loaded_derivs" Items="{TextDerivationLoader experiments\\derivs.xml, {x:Reference ERG}}" />-->

    <!--<ItemDerivationSet Grammar="{PathRef {x:Reference ERG}}">
        <ItemDerivationSet.SourceItem>
            <Item Text="Be considerate of game, farm animals and other hikers." />
        </ItemDerivationSet.SourceItem>
        <Derivation>
            (root_informal (1409 hd_imp_c 8.91253 0 9 (1408 hd-cmp_u_c 8.70245 0 9 (126 be_c_be 1.33022 0 1 ("be" 124 "token [ +CARG \\"Be\\" +CLASS alphabetic [ +CASE capitalized+lower +INITIAL + ] +FORM \\"be\\" +FROM \\"0\\" +ID *diff-list* [ LAST #1=*top* LIST *cons* [ FIRST \\"1\\" REST #1 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"VB\\" ] +PRBS *null* +TAGS *null* ] +TO \\"2\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]")) (1407 hd-cmp_u_c 7.11593 1 9 (136 considerate_a1 0 1 2 ("considerate" 113 "token [ +CARG #1=\\"considerate\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM #1 +FROM \\"3\\" +ID *diff-list* [ LAST #2=*top* LIST *cons* [ FIRST \\"2\\" REST #2 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"0.61750459999999996\\" +TAG \\"JJ\\" ] +PRBS *null* +TAGS *null* ] +TO \\"14\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]")) (1406 hd-cmp_u_c 5.89239 2 9 (177 of_prtcl -0.122253 2 3 ("of" 100 "token [ +CARG #1=\\"of\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM #1 +FROM \\"15\\" +ID *diff-list* [ LAST #2=*top* LIST *cons* [ FIRST \\"3\\" REST #2 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"IN\\" ] +PRBS *null* +TAGS *null* ] +TO \\"17\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]")) (1405 np-np_crd-t_c 5.50733 3 9 (1395 hdn_bnp_c 3.28147 3 4 (1394 w_comma_plr 2.38205 3 4 (1393 n_ms_ilr 0.894922 3 4 (201 game_n2 0 3 4 ("game," 110 "token [ +CARG \\"game\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM \\"game,\\" +FROM \\"18\\" +ID *diff-list* [ LAST #1=*list* LIST *cons* [ FIRST \\"4\\" REST *cons* [ FIRST \\"5\\" REST #1 ] ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"NN\\" ] +PRBS *null* +TAGS *null* ] +TO \\"23\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]"))))) (1404 np-np_crd-im_c 2.22461 4 9 (1398 hdn_bnp_c 0.582774 4 6 (1397 n-hdn_cpd_c -0.0267751 4 6 (209 farm_n1 0.182199 4 5 ("farm" 102 "token [ +CARG #1=\\"farm\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM #1 +FROM \\"24\\" +ID *diff-list* [ LAST #2=*top* LIST *cons* [ FIRST \\"6\\" REST #2 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"NN\\" ] +PRBS *null* +TAGS *null* ] +TO \\"28\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]")) (1396 n_pl_olr 0.0433869 5 6 (213 animal_n1 -0.263846 5 6 ("animals" 104 "token [ +CARG #1=\\"animals\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM #1 +FROM \\"29\\" +ID *diff-list* [ LAST #2=*top* LIST *cons* [ FIRST \\"7\\" REST #2 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"NNS\\" ] +PRBS *null* +TAGS *null* ] +TO \\"36\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]"))))) (1403 mrk-nh_nom_c 1.71282 6 9 (221 and_conj -1.94096 6 7 ("and" 106 "token [ +CARG #1=\\"and\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM #1 +FROM \\"37\\" +ID *diff-list* [ LAST #2=*top* LIST *cons* [ FIRST \\"8\\" REST #2 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"CC\\" ] +PRBS *null* +TAGS *null* ] +TO \\"40\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]")) (1402 hdn_bnp_c 2.77122 7 9 (1401 aj-hdn_norm_c 2.10751 7 9 (233 other_a1 1.50497 7 8 ("other" 108 "token [ +CARG #1=\\"other\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM #1 +FROM \\"41\\" +ID *diff-list* [ LAST #2=*top* LIST *cons* [ FIRST \\"9\\" REST #2 ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"JJ\\" ] +PRBS *null* +TAGS *null* ] +TO \\"46\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]")) (1400 w_period_plr 0.149784 8 9 (1399 n_pl_olr 0.689137 8 9 (242 hiker_n1 0 8 9 ("hikers." 112 "token [ +CARG \\"hikers\\" +CLASS alphabetic [ +CASE non_capitalized+lower +INITIAL - ] +FORM \\"hikers.\\" +FROM \\"47\\" +ID *diff-list* [ LAST #1=*list* LIST *cons* [ FIRST \\"10\\" REST *cons* [ FIRST \\"11\\" REST #1 ] ] ] +PRED predsort +TICK bool +TNT null_tnt [ +MAIN tnt_main [ +PRB \\"1\\" +TAG \\"NNS\\" ] +PRBS *null* +TAGS *null* ] +TO \\"54\\" +TRAIT token_trait [ +HD token_head +IT italics +LB bracket_null +RB bracket_null +UW - ] ]"))))))))))))))
        </Derivation>
    </ItemDerivationSet>-->

    <!--<XamlLoadInstance x:Name="bitext_sentences" Filename="grammars\thai\tldb-all.xml" />-->

    <!--<StringItem>You may rest, camp and spend the night in Byfjellene.</StringItem>-->
    <!--<StringItem>I like Spookee.</StringItem>-->
    <!--<StringItem>Be considerate of game, farm animals and other hikers.</StringItem>-->
    <!--<StringItem>I’m going to the market.</StringItem>-->
    <!--<StringItem>He drank the milk, or perhaps the juice.</StringItem>-->
    <!--<StringItem>It is "Allied Chemicals."</StringItem>-->
    <!--<StringItem>Are you going or not?</StringItem>-->

    <StringCorpus x:Name="xaml_sentences">
        <StringItem xml:space="preserve">    Here he    built a large hut    which was given to the scouts in 1923.</StringItem>
        <StringItem>Follow the road past NUTEC and continue up Kvarvenveien, past the recreation area.</StringItem>
        <StringItem>'Sun-filled', well-kept Mountain View.</StringItem>
        <StringItem>I eat cats, dogs and mice.</StringItem>
        <StringItem>I eat big and small cats and dogs.</StringItem>
        <StringItem>Eat when drinking.</StringItem>
        <StringItem>It was 1923.</StringItem>
        <StringItem>Do not throw away lit cigarettes.</StringItem>
        <StringItem>I must and will eat fish.</StringItem>
        <StringItem>I inspected and ate my dinner</StringItem>
        <StringItem>We hold these truths to be self evident.</StringItem>
        <StringItem>Don't get plastic surgery this week.</StringItem>
        <StringItem>I want you to notice me.</StringItem>
        <StringItem>This dog chased the cat.</StringItem>
        <StringItem>The dog whose toy the cat bit barked.</StringItem>
        <StringItem>He is one person who can use this type of medium.</StringItem>
        <StringItem>He is one person who is able to use this type of medium perfectly.</StringItem>
        <StringItem>Cats sleep.</StringItem>
        <StringItem>The cat is sleeping.</StringItem>
        <StringItem>Be careful about using campfires in the forest and open pastures.</StringItem>
        <StringItem>Many a cat sleeps.</StringItem>
        <StringItem>Don't touch Kim's cats.</StringItem>
        <StringItem>Kim left home, and Sandy too.</StringItem>
        <StringItem>Kim drank the milk, or perhaps the juice.</StringItem>
        <StringItem>They eventually reached the islands, and founded colonies on the islands in the northernmost part of the Aegean Sea.</StringItem>
        <StringItem>Obsidian is a hard, vitreous volcanic rock, which could be fashioned into tools for cutting and stabbing.</StringItem>
        <StringItem>The high quality of the seam on Milos ensured that the area remained popular with early travelers.</StringItem>
        <StringItem>The distinctive, sculpted marble figures of the era are now being reproduced in vast quantities as souvenirs.</StringItem>
        <StringItem>Their curiosity pushed them to build vessels that were strong enough to ford the open seas and reach these islands, marking the start of the long legacy of Mediterranean seafaring.</StringItem>
        <StringItem>You may rest, camp and spend the night in Byfjellene.</StringItem>
        <StringItem>Cyclists should be considerate of pedestrians.</StringItem>
        <StringItem>Be considerate of wild and domestic animals and other hikers.</StringItem>
        <StringItem>In the city mountains you can rest, set up camp and spend the night.</StringItem>
        <StringItem>Use open campfires with caution.</StringItem>
        <StringItem>Towards Solheimslien the path on the eastern ridge is followed.</StringItem>
        <StringItem>I have nothing to give.</StringItem>
        <StringItem>Suree has been composing a poem.</StringItem>
        <StringItem>I'm eating durian.</StringItem>
    </StringCorpus>

    <!--Target="{x:Reference wksp_root}"-->
    <Workspace x:Name="Test_Functors">
        <Sequence x:Name="morpho_test">
            <x:Reference Name="hike_textfile_sentences" />
            <WaitGrammar Grammar="{PathRef {x:Reference ERG}}" />
            <!--<UseTranslation />-->
            <Factory x:TypeArguments="ReppExecutor">
                <Setter Property="{x:Static P.ReppRoot}" Value="{PathRef {x:Reference ERG_xli}, Result.NameScope[ERG_repp]}" />
            </Factory>
            <Factory x:TypeArguments="PosTagger">
                <Setter Property="{x:Static P.PosTrigramModel}" Value="{x:Reference English_pos_trigram_hmm}" />
            </Factory>
            <Factory x:TypeArguments="MappingTokenBuilder">
                <Setter Property="{x:Static P.EntryMgr}" Value="{PathRef {x:Reference ERG}, EntryMgr}" />
            </Factory>
            <Factory x:TypeArguments="TokenMappingExecutor">
                <Setter Property="{x:Static P.EntryMgr}" Value="{PathRef {x:Reference ERG}, EntryMgr}" />
                <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
            </Factory>
            <Factory x:TypeArguments="ReverseMorphology">
                <Setter Property="{x:Static P.Lexicon}" Value="{PathRef {x:Reference ERG}, Lexicon}" />
                <Setter Property="{x:Static P.TokenGeometry}" Value="{PathRef {x:Reference ERG}, TokenGeometry}" />
            </Factory>
        </Sequence>
    </Workspace>

    <Workspace x:Name="Shared_Pipeline">

        <Sequence x:Name="mapping_tokens">
            <Factory x:TypeArguments="ReppExecutor">
                <Setter Property="{x:Static P.ReppRoot}" Value="{PathRef {x:Reference ERG_xli}, Result.NameScope[ERG_repp]}" />
            </Factory>
            <Factory x:TypeArguments="PosTagger">
                <Setter Property="{x:Static P.PosTrigramModel}" Value="{x:Reference English_pos_trigram_hmm}" />
            </Factory>
            <Factory x:TypeArguments="MappingTokenBuilder">
                <Setter Property="{x:Static P.EntryMgr}" Value="{PathRef {x:Reference ERG}, EntryMgr}" />
            </Factory>
        </Sequence>

        <Sequence x:Name="item_parse_to_chart">
            <x:Reference Name="mapping_tokens" />
            <Factory x:TypeArguments="TokenMappingExecutor">
                <Setter Property="{x:Static P.EntryMgr}" Value="{PathRef {x:Reference ERG}, EntryMgr}" />
                <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
            </Factory>
            <Factory x:TypeArguments="ReverseMorphology">
                <Setter Property="{x:Static P.Lexicon}" Value="{PathRef {x:Reference ERG}, Lexicon}" />
                <Setter Property="{x:Static P.TokenGeometry}" Value="{PathRef {x:Reference ERG}, TokenGeometry}" />
            </Factory>
            <!--<MonadRecorderFactory />-->
            <Factory x:TypeArguments="ChartDependenciesLoader">
                <Setter Property="{x:Static P.ChartDependencyPaths}" Value="{PathRef {x:Reference ERG}, ChartDependencyPaths}" />
            </Factory>
            <Factory x:TypeArguments="LexicalFilterLatticeBuilder" />
            <Factory x:TypeArguments="LexicalFilterExecutor">
                <Setter Property="{x:Static P.EntryMgr}" Value="{PathRef {x:Reference ERG}, EntryMgr}" />
                <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
            </Factory>
            <Factory x:TypeArguments="ParseControl">
                <Setter Property="{x:Static P.Grammar}" Value="{x:Reference ERG}" />
                <Setter Property="{x:Static P.ChartConfig}" Value="{PathRef {x:Reference ERG}, AgreeConfig.Parser.Chart}" />
                <Setter Property="{x:Static P.ChartStartSymbols}" Value="{PathRef {x:Reference ERG}, EntryMgr.ParserStartSymbols}" />
                <!--<Setter Property="{x:Static P.ExcludeRules}">
                    <ExcludeRules EntryMgr="{PathRef {x:Reference ERG}, EntryMgr}">
                    <LookupEntry EntryMgr="{PathRef {x:Reference ERG}}" EntryName="excluded-rule-name-goes-here" />
                    </ExcludeRules>
                </Setter>-->
            </Factory>
        </Sequence>

        <!--<Sequence x:Name="batch_compare">
        <x:Reference Name="loaded_derivs" />
        <Factory x:TypeArguments="GatherDerivationSets" />
    </Sequence>-->
        <Workspace x:Name="PARSE" ItemHostWrap="False" >

            <Sequence x:Name="batch_parse_to_chart">
                <x:Reference Name="hike_textfile_sentences" />
                <!--<x:Reference Name="xaml_sentences" />-->
                <!--<x:Reference Name="bitext_sentences" />-->
                <x:Reference Name="item_parse_to_chart" />
            </Sequence>

            <Sequence x:Name="item_parse_exh_unpack_scored">
                <x:Reference Name="item_parse_to_chart" />
                <Factory x:TypeArguments="ExhaustiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                </Factory>
                <Factory x:TypeArguments="BatchScorer">
                    <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                    <!--<Setter Property="N_Best" Value="1" />-->
                </Factory>
            </Sequence>
            <Sequence x:Name="batch_parse_exh_unpack_scored">
                <x:Reference Name="hike_textfile_sentences" />
                <x:Reference Name="item_parse_to_chart" />
                <Factory x:TypeArguments="ExhaustiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                </Factory>
                <Factory x:TypeArguments="GatherDerivationSets" />
            </Sequence>

            <Sequence x:Name="item_parse_sel_unpack_scored" Apply="Show respect for game, domestic animals and other hikers.">
                <x:Reference Name="item_parse_to_chart" />
                <Factory x:TypeArguments="SelectiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                    <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                    <!--<Setter Property="N_Best" Value="500" />-->
                    <Setter Property="GrandparentingLevel" Value="3" />
                </Factory>
                <SetProperty Property="{x:Static PP.ExpandUiResults}" Value="True" />
            </Sequence>
            <Sequence x:Name="batch_parse_sel_unpack_scored">
                <x:Reference Name="hike_textfile_sentences" />
                <x:Reference Name="item_parse_sel_unpack_scored" />
                <Factory x:TypeArguments="GatherDerivationSets" />
            </Sequence>

            <!--<Sequence Apply="Be careful about using campfires in the forest and open pastures.">-->
            <!--<Sequence Apply="Help us to keep signs and maps in good repair.">-->
            <Sequence Apply="Kim runs very quickly.">
                <x:Reference Name="item_parse_exh_unpack_scored" />
            </Sequence>

        </Workspace>

        <Workspace x:Name="GENERATE" ItemHostWrap="False" >
            <Sequence x:Name="gen_non_vpm">
                <x:Reference Name="item_parse_to_chart" />
                <Factory x:TypeArguments="ExhaustiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                </Factory>
                <Factory x:TypeArguments="BatchScorer">
                    <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                    <Setter Property="N_Best" Value="1" />
                </Factory>
                <Factory x:TypeArguments="semi:ApplyVpm" />
            </Sequence>

            <Sequence x:Name="gen_vpm">
                <x:Reference Name="item_parse_to_chart" />
                <Factory x:TypeArguments="ExhaustiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                </Factory>
                <Factory x:TypeArguments="BatchScorer">
                    <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                    <Setter Property="N_Best" Value="1" />
                </Factory>
                <Factory x:TypeArguments="semi:DerivationToMrs">
                    <Setter Property="{x:Static P.Vpm}" Value="{PathRef {x:Reference ERG}, Vpm}" />
                </Factory>
                <!--<Factory x:TypeArguments="DmrsExtractor" />-->
                <Factory x:TypeArguments="semi:VpmReverse">
                    <Setter Property="{x:Static P.Grammar}" Value="{x:Reference ERG}" />
                    <Setter Property="{x:Static P.Vpm}" Value="{PathRef {x:Reference ERG}, Vpm}" />
                </Factory>
                <Factory x:TypeArguments="GenerationInputMaker" />
            </Sequence>

            <Sequence x:Name="vpm_to_gen">

                <Factory x:TypeArguments="DetermineRelevantRules">
                    <Setter Property="{x:Static P.RuleSet}" Value="{PathRef {x:Reference ERG}, EntryMgr.GeneratorRules}" />
                    <!--<Publisher Property="{x:Static P.RelevantRules}" />-->
                    <!-- ('Publisher' functionality is not actually implemented yet) -->
                </Factory>

                <!--<GetProperty Property="Arg0" />-->

                <ForkJoin>
                    <Sequence>
                        <Factory x:TypeArguments="LookupPredLexicalEntries">
                            <Setter Property="{x:Static P.PredicateIndex}" Value="{x:Reference ERG_pred_idx}" />
                        </Factory>

                        <Factory x:TypeArguments="AddGenerationGenericLexicalEntries" />
                    </Sequence>

                    <Factory x:TypeArguments="ApplyTriggerRules">
                        <Setter Property="{x:Static P.TriggerRuleMgr}" Value="{PathRef {x:Reference ERG}, TriggerRuleMgr}" />
                    </Factory>
                </ForkJoin>

                <!--<MonadRecorderFactory />-->

                <Factory x:TypeArguments="GenControl">
                    <Setter Property="{x:Static P.Grammar}" Value="{x:Reference ERG}" />
                    <Setter Property="{x:Static P.ChartConfig}" Value="{PathRef {x:Reference ERG}, AgreeConfig.Generator.Chart}" />
                    <Setter Property="{x:Static P.ChartStartSymbols}" Value="{PathRef {x:Reference ERG}, EntryMgr.GeneratorStartSymbols}" />
                    <Setter Property="{x:Static P.ExcludeRules}">
                        <x:Array Type="{x:Type Rule}">
                            <!--<LookupEntry EntryMgr="{PathRef {x:Reference ERG}}" EntryName="w_generic_clause_plr" />-->
                        </x:Array>
                    </Setter>
                </Factory>
            </Sequence>

            <Sequence x:Name="gen_main">
                <!--<x:Reference Name="gen_non_vpm" />-->
                <x:Reference Name="gen_vpm" />
                <x:Reference Name="vpm_to_gen" />
                <First />
            </Sequence>

            <Sequence x:Name="batch_gen">
                <!--<x:Reference Name="hike_textfile_sentences" />-->
                <x:Reference Name="xaml_sentences" />
                <x:Reference Name="gen_main" />
            </Sequence>

            <Sequence x:Name="gen_exh_unpack_scored">
                <x:Reference Name="gen_main" />
                <Factory x:TypeArguments="ExhaustiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                </Factory>
                <Factory x:TypeArguments="BatchScorer">
                    <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                    <!--<Setter Property="N_Best" Value="1" />-->
                    <Setter Property="{x:Static PP.ExpandUiResults}" Value="True" />
                </Factory>
            </Sequence>

            <Sequence x:Name="gen_sel_unpack_scored">
                <x:Reference Name="gen_main" />
                <Factory x:TypeArguments="SelectiveUnpacking">
                    <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                    <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                    <Setter Property="N_Best" Value="1000000" />
                    <Setter Property="GrandparentingLevel" Value="3" />
                </Factory>
                <Factory x:TypeArguments="FinalSemanticsChecker">
                    <Setter Property="{x:Static P.MrsManager}" Value="{PathRef {x:Reference ERG}, MrsManager}" />
                    <Setter Property="{x:Static P.Vpm}" Value="{PathRef {x:Reference ERG}, Vpm}" />
                </Factory>
                <First />
            </Sequence>

            <Sequence x:Name="batch_gen_sel_unpack_scored">
                <x:Reference Name="hike_textfile_sentences" />
                <!--<x:Reference Name="xaml_sentences" />-->
                <x:Reference Name="gen_sel_unpack_scored" />
            </Sequence>

            <Sequence x:Name="gen_vpm_from_deriv">
                <Factory x:TypeArguments="semi:DerivationToMrs">
                    <Setter Property="{x:Static P.Vpm}" Value="{PathRef {x:Reference ERG}, Vpm}" />
                </Factory>
                <!--<Factory x:TypeArguments="DmrsExtractor" />-->
                <Factory x:TypeArguments="semi:VpmReverse">
                    <Setter Property="{x:Static P.Grammar}" Value="{x:Reference ERG}" />
                    <Setter Property="{x:Static P.Vpm}" Value="{PathRef {x:Reference ERG}, Vpm}" />
                </Factory>
                <Factory x:TypeArguments="GenerationInputMaker" />
            </Sequence>

            <Sequence x:Name="gen_from_deriv">
                <x:Reference Name="gen_vpm_from_deriv" />
                <!--<x:Reference Name="xaml_sentences" />-->
                <x:Reference Name="vpm_to_gen" />
                <Sequence>
                    <Factory x:TypeArguments="SelectiveUnpacking">
                        <Setter Property="{x:Static P.TfsUnifier}" Value="{PathRef {x:Reference ERG}, TfsUnifier}" />
                        <Setter Property="{x:Static P.MaxEntModel}" Value="{x:Reference the_maxent_model}" />
                        <Setter Property="N_Best" Value="1000" />
                        <Setter Property="GrandparentingLevel" Value="3" />
                    </Factory>
                    <Factory x:TypeArguments="FinalSemanticsChecker">
                        <Setter Property="{x:Static P.MrsManager}" Value="{PathRef {x:Reference ERG}, MrsManager}" />
                        <Setter Property="{x:Static P.Vpm}" Value="{PathRef {x:Reference ERG}, Vpm}" />
                    </Factory>
                </Sequence>
            </Sequence>

            <!--<Sequence Apply="Kim runs very quickly.">
                <x:Reference Name="gen_exh_unpack_scored" />
            </Sequence>-->

        </Workspace>
        <!-- GENERATE -->

    </Workspace>
    <!-- COMMON -->

</Workspace>
