Action
|
Result
|
Comments
|
Read token
|
- ^In<pr>/En<pr>$
|
|
Read token
|
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
|
|
Read token
|
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
|
|
Split
|
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
|
Rule 1 (NP -> n ) could apply, but it's possible that reading more of the input would make it so rule 2 (NP -> n PP ) could apply, so we do both.
|
Apply rule 1 (NP -> n ) in the first branch
|
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
|
Since the rule says %n , the required NP tags (gender and number) are filled in with the values of the noun tags.
|
Apply rule 4 (DP -> det NP ) in the first branch
|
- ^In<pr>/En<pr>$
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
|
Note that the determiner still has GD as it's gender. Child tags are not modified until the output step.
|
Apply rule 3 (PP -> pr DP ) in the first branch
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^in<pr>/en<pr>$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^in<pr>/en<pr>$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^in<pr>/en<pr>$
- ^the<det><def><sp>/el<det><def><GD><ND>$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^in<pr>/en<pr>$
- ^the<det><def><sp>/el<det><def><GD><ND>$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^in<pr>/en<pr>$
- ^the<det><def><sp>/el<det><def><GD><ND>$
- ^ground<n><sg>/tierra<n><f><sg>$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^in<pr>/en<pr>$
- ^the<det><def><sp>/el<det><def><GD><ND>$
- ^ground<n><sg>/tierra<n><f><sg>$
|
|
Apply rule 1 (NP -> n ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^in<pr>/en<pr>$
- ^the<det><def><sp>/el<det><def><GD><ND>$
- ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^in<pr>/en<pr>$
- ^the<det><def><sp>/el<det><def><GD><ND>$
- ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$
|
This time the next word is an adverb, rather than a preposition, so no splitting occurs and the rule is applied in each branch.
|
Apply rule 4 (DP -> det NP ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^in<pr>/en<pr>$
- ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^in<pr>/en<pr>$
- ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$
|
|
Apply rule 3 (PP -> pr DP ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^hole<n><sg>/agujero<n><m><sg>$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
|
|
Apply rule 2 (NP -> n PP ) in the second branch
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
Weight: 10
- ^In<pr>/En<pr>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$
|
Note that rule 2 has a weight attached to it, so now the second branch is weighted.
|
Apply rule 4 (DP -> det NP ) in the second branch
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
Weight: 10
- ^In<pr>/En<pr>$
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$
|
|
Apply rule 3 (PP -> pr DP ) in the second branch
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
|
|
Read token
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^Hobbit<n><sg>/Hobbit<n><m><sg>$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^Hobbit<n><sg>/Hobbit<n><m><sg>$
|
|
Apply rule 1 (NP -> n ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^a<det><ind><sg>/uno<det><ind><GD><sg>$
- ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$
|
|
Apply rule 4 (DP -> det NP ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
- ^live<vblex><past>/vivir<vblex><past>$
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$
|
|
Apply rule 5 (VP -> vblex DP ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^there<adv>/allí<adv>$
- ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^there<adv>/allí<adv>$
- ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$
|
VP wants tense, person, and number tags. The verb supplies tense, but it doesn't have person or number tags, so the defaults are used instead.
|
Apply rule 6 (VP -> adv VP ) in both branches
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply rule 7 (VP -> PP VP ) in the first branch
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$
- ^unknown<VP><past><PD><ND>{^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$ ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply rule 7 (VP -> PP VP ) in the first branch
|
- ^unknown<VP><past><PD><ND>{^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$ ^unknown<VP><past><PD><ND>{^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$ ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$}$}$
Weight: 10
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply rule 7 (VP -> PP VP ) in the second branch
|
- ^unknown<VP><past><PD><ND>{^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$}$}$}$ ^unknown<VP><past><PD><ND>{^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$ ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$}$}$
Weight: 10
- ^unknown<VP><past><PD><ND>{^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$ ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$}$
|
|
Prune branches
|
Weight: 10
- ^unknown<VP><past><PD><ND>{^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$ ^unknown<VP><past><PD><ND>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$}$
|
No rules begin with VP, so it's time to output. Both rules have the same number of trees (1), but the second one has higher weight (10), so the first one gets discarded and we output the second one.
|
Apply output side of rule 7 (VP -> PP VP )
|
- ^unknown<PP>{^In<pr>/En<pr>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
At output, the unspecified tags PD and ND are replaced with the defaults p3 and sg.
|
Apply output side of rule 3 (PP -> pr DP )
|
- ^En<pr>$
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Output first word
|
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
The preposition wasn't built by a rule, so we just write it to the output stream.
|
Apply output side of rule 4 (DP -> det NP )
|
- ^uno<det><ind><m><sg>$
- ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
Here the gender and the number of NP are copied to the determiner.
|
Output first word
|
- ^unknown<NP><m><sg>{^hole<n><sg>/agujero<n><m><sg>$ ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply output side of rule 2 (NP -> n PP )
|
- ^agujero<n><m><sg>$
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Output first word
|
- ^unknown<PP>{^in<pr>/en<pr>$ ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply output side of rule 3 (PP -> pr DP )
|
- ^en<pr>$
- ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Output first word
|
- ^unknown<DP><f><sg>{^the<det><def><sp>/el<det><def><GD><ND>$ ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply output side of rule 4 (DP -> det NP )
|
- ^el<det><def><f><sg>$
- ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
Once again we copy the gender and number of the NP to the determiner.
|
Output first word
|
- ^unknown<NP><f><sg>{^ground<n><sg>/tierra<n><f><sg>$}$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply output side of rule 1 (NP -> n )
|
- ^tierra<n><f><sg>$
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Output first word
|
- ^unknown<VP><past><p3><sg>{^there<adv>/allí<adv>$ ^unknown<VP><past><PD><ND>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$}$
|
|
Apply output side of rule 6 (VP -> adv VP )
|
- ^unknown<VP><past><p3><sg>{^live<vblex><past>/vivir<vblex><past>$ ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$}$
|
Since the source language lemma of the adverb is "there", we take the first clause of the if statement and only output the VP, which takes all its tags from the parent chunk.
|
Apply output side of rule 5 (VP -> vblex DP )
|
- ^vivir<vblex><past><p3><sg>$
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$
|
As with the previous line, the verb gets all its tags from the parent chunk, but in this rule we've explicitly listed them.
|
Output first word
|
- ^unknown<DP><m><sg>{^a<det><ind><sg>/uno<det><ind><GD><sg>$ ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$}$
|
|
Apply output side of rule 4 (DP -> det NP )
|
- ^uno<det><ind><m><sg>$
- ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$
|
|
Output first word
|
- ^unknown<NP><m><sg>{^Hobbit<n><sg>/Hobbit<n><m><sg>$}$
|
|
Apply output side of rule 1 (NP -> n )
|
- ^Hobbit<n><m><sg>$
|
|
Output first word
|
|
|
Read token
|
- ^.<sent>/.<sent>$
|
|
Output first word
|
|
No rules apply to punctuation in this example, so we just immediately output it when we see it.
|
Read token
|
- ^.<sent>/.<sent>$
|
|
Output first word
|
|
|