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
7e2814aa
Commit
7e2814aa
authored
14 years ago
by
Adam Wardynski
Browse files
Options
Downloads
Patches
Plain Diff
Switching around GetSymbols constructor parameters.
parent
e9096722
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libwccl/ops/functions/tset/getsymbols.h
+4
-3
4 additions, 3 deletions
libwccl/ops/functions/tset/getsymbols.h
tests/getsymbols.cpp
+7
-7
7 additions, 7 deletions
tests/getsymbols.cpp
with
11 additions
and
10 deletions
libwccl/ops/functions/tset/getsymbols.h
+
4
−
3
View file @
7e2814aa
...
...
@@ -14,8 +14,8 @@ class GetSymbols : public Function<TSet> {
public:
typedef
boost
::
shared_ptr
<
Function
<
Position
>
>
PosFunctionPtr
;
GetSymbols
(
const
PosFunctionPtr
&
pos_expr
,
const
Corpus2
::
Tag
&
mask
)
:
pos_expr_
(
pos_expr
)
,
mask_
(
mask
)
GetSymbols
(
const
Corpus2
::
Tag
&
mask
,
const
PosFunctionPtr
&
pos_expr
)
:
mask_
(
mask
),
pos_expr_
(
pos_expr
)
{
BOOST_ASSERT
(
pos_expr_
);
}
...
...
@@ -39,9 +39,10 @@ public:
std
::
string
name
(
const
Corpus2
::
Tagset
&
tagset
)
const
;
protected
:
Corpus2
::
Tag
mask_
;
const
PosFunctionPtr
pos_expr_
;
Corpus2
::
Tag
mask_
;
/**
* Gets a position from the argument expression, then gets the
...
...
This diff is collapsed.
Click to expand it.
tests/getsymbols.cpp
+
7
−
7
View file @
7e2814aa
...
...
@@ -65,17 +65,17 @@ struct SymbolsFix
BOOST_FIXTURE_TEST_CASE
(
symbols_nowhere
,
SymbolsFix
)
{
GetSymbols
symbols
(
nowhere_constant
,
gnd
);
GetSymbols
symbols
(
gnd
,
nowhere_constant
);
BOOST_CHECK
(
symbols
.
apply
(
cx
)
->
equals
(
empty
));
GetSymbols
s2
(
nowhere_constant
,
nmb
);
GetSymbols
s2
(
nmb
,
nowhere_constant
);
BOOST_CHECK
(
s2
.
apply
(
cx
)
->
equals
(
empty
));
GetSymbols
s3
(
nowhere_constant
,
pos
);
GetSymbols
s3
(
pos
,
nowhere_constant
);
BOOST_CHECK
(
s3
.
apply
(
cx
)
->
equals
(
empty
));
}
BOOST_FIXTURE_TEST_CASE
(
get_gnd
,
SymbolsFix
)
{
GetSymbols
symbols
(
pos_zero_constant
,
gnd
);
GetSymbols
symbols
(
gnd
,
pos_zero_constant
);
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{m1,m2}"
);
sc
.
advance
();
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{f}"
);
...
...
@@ -85,7 +85,7 @@ BOOST_FIXTURE_TEST_CASE(get_gnd, SymbolsFix)
BOOST_FIXTURE_TEST_CASE
(
get_nmb
,
SymbolsFix
)
{
GetSymbols
symbols
(
pos_zero_constant
,
nmb
);
GetSymbols
symbols
(
nmb
,
pos_zero_constant
);
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{sg}"
);
sc
.
advance
();
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{pl}"
);
...
...
@@ -95,7 +95,7 @@ BOOST_FIXTURE_TEST_CASE(get_nmb, SymbolsFix)
BOOST_FIXTURE_TEST_CASE
(
get_vcl
,
SymbolsFix
)
{
GetSymbols
symbols
(
pos_zero_constant
,
vcl
);
GetSymbols
symbols
(
vcl
,
pos_zero_constant
);
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{}"
);
sc
.
advance
();
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{wok}"
);
...
...
@@ -105,7 +105,7 @@ BOOST_FIXTURE_TEST_CASE(get_vcl, SymbolsFix)
BOOST_FIXTURE_TEST_CASE
(
get_pos
,
SymbolsFix
)
{
GetSymbols
symbols
(
pos_zero_constant
,
pos
);
GetSymbols
symbols
(
pos
,
pos_zero_constant
);
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{subst}"
);
sc
.
advance
();
BOOST_CHECK_EQUAL
(
symbols
.
apply
(
cx
)
->
to_string
(
tagset
),
"{adja,prep,subst}"
);
...
...
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