Skip to content
Snippets Groups Projects
Commit dee560a0 authored by ilor's avatar ilor
Browse files

Merge branch 'master' of nlp.pwr.wroc.pl:wccl

parents 0e1ea974 0f640d95
Branches
No related merge requests found
match_rules(
// „wyżyna X”, gdzie X jest oznaczone anotacją reladj_gaz_based
// poza tym wymagane jest uzgodnienie
apply(
match(
regex( base[0], 'wyżyna' ),
is( 'reladj_gaz_based' )
),
cond(
ann(:1, 'capitalized_noun' ),
agr(first(:1), first(:2), {nmb,gnd,cas})
//equal( nmb[first(:1)], nmb[first(:2)] ),
//equal( cas[first(:1)], cas[first(:2)] ),
//equal( gnd[first(:1)], gnd[first(:2)] )
),
actions(
mark(M, 'HIGHLAND_NAM')
)
);
// „wyżyna X”, gdzie X może być subst i może być nom
// znakuje drugi element jako HIGHLAND_NAM,
// pierwszy element nie może być oznakowany jako capitalized_noun
apply(
match(
regex( base[0], 'wyżyna'),
and( inter(class[0], {subst}), inter(cas[0], {nom}) )
),
cond(
not( ann(:1, 'capitalized_noun' ) )
),
actions(
mark(:2, 'HIGHLAND_NAM')
)
);
// „MIASTO Y”, gdzie MIASTO to anotacja city_trigger (jedno lub wielotokenowa),
// a Y to first_capital_word, poza tym mamy post-condition, że Y nie zawiera się
// w anotacji city_nam_gaz
apply(
match(
is( 'city_trigger' ),
is( 'first_capital_word' )
),
cond(
not( annsub(:2, 'city_nam_gaz') )
),
actions(
mark(:2, 'CITY_NAM')
)
)
)
......@@ -282,7 +282,6 @@ parse_match_rule
{
Lexicons empty_lex;
ParsingScope scope(tagset, empty_lex);
scope.variables().get_put<Match>("_M");
}
: ret_match = match_rule_operator[scope]
;
......@@ -2325,6 +2324,7 @@ match_rule_operator
returns [boost::shared_ptr<MatchRule> ret_op]
{
boost::shared_ptr<ApplyOperator> apply;
scope.variables().get_put<Match>("_M");
}
: apply = match_apply_operator [scope] {
ret_op = boost::make_shared<MatchRule>(scope.variables(), apply);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment