Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
4
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
dee560a0
Commit
dee560a0
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of nlp.pwr.wroc.pl:wccl
parents
0e1ea974
0f640d95
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
examples/ne-match.ccl
+54
-0
54 additions, 0 deletions
examples/ne-match.ccl
libwccl/parser/grammar.g
+1
-1
1 addition, 1 deletion
libwccl/parser/grammar.g
with
55 additions
and
1 deletion
examples/ne-match.ccl
0 → 100644
+
54
−
0
View file @
dee560a0
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')
)
)
)
This diff is collapsed.
Click to expand it.
libwccl/parser/grammar.g
+
1
−
1
View file @
dee560a0
...
...
@@ -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);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment