Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
WCCL
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Analysers
WCCL
Commits
94b97137
Commit
94b97137
authored
Dec 6, 2010
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
Add sample sentence-based data tests and position support
parent
8d796a6e
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
tests/data/sentence.ccl
+11
-0
11 additions, 0 deletions
tests/data/sentence.ccl
tests/data/t01.xml
+168
-0
168 additions, 0 deletions
tests/data/t01.xml
tests/datadriven.cpp
+6
-1
6 additions, 1 deletion
tests/datadriven.cpp
with
185 additions
and
1 deletion
tests/data/sentence.ccl
0 → 100644
+
11
−
0
View file @
94b97137
sentence=t01.xml
---
orth[0]
["Uważam"]
---
position=2
orth[0]
["że"]
This diff is collapsed.
Click to expand it.
tests/data/t01.xml
0 → 100644
+
168
−
0
View file @
94b97137
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cesAna SYSTEM "xcesAnaIPI.dtd">
<cesAna
version=
"1.0"
type=
"lex disamb"
>
<chunkList>
<chunk
id=
"ch51"
type=
"tok"
>
<chunk
type=
"s"
>
<tok>
<orth>
Uważam
</orth>
<lex
disamb=
"1"
><base>
uważać
</base><ctag>
fin:sg:pri:imperf
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
,
</orth>
<lex
disamb=
"1"
><base>
,
</base><ctag>
interp
</ctag></lex>
</tok>
<tok>
<orth>
że
</orth>
<lex
disamb=
"1"
><base>
że
</base><ctag>
conj
</ctag></lex>
</tok>
<tok>
<orth>
światopogląd
</orth>
<lex><base>
światopogląd
</base><ctag>
subst:sg:acc:m3
</ctag></lex>
<lex
disamb=
"1"
><base>
światopogląd
</base><ctag>
subst:sg:nom:m3
</ctag></lex>
</tok>
<tok>
<orth>
może
</orth>
<lex><base>
może
</base><ctag>
qub
</ctag></lex>
<lex
disamb=
"1"
><base>
móc
</base><ctag>
fin:sg:ter:imperf
</ctag></lex>
</tok>
<tok>
<orth>
być
</orth>
<lex
disamb=
"1"
><base>
być
</base><ctag>
inf:imperf
</ctag></lex>
</tok>
<tok>
<orth>
materialistyczny
</orth>
<lex><base>
materialistyczny
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
materialistyczny
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
materialistyczny
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
materialistyczny
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<tok>
<orth>
lub
</orth>
<lex
disamb=
"1"
><base>
lub
</base><ctag>
conj
</ctag></lex>
<lex><base>
lubić
</base><ctag>
impt:sg:sec:imperf
</ctag></lex>
</tok>
<tok>
<orth>
idealistyczny
</orth>
<lex><base>
idealistyczny
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
idealistyczny
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
idealistyczny
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
idealistyczny
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<tok>
<orth>
(
</orth>
<lex
disamb=
"1"
><base>
(
</base><ctag>
interp
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
w
</orth>
<lex><base>
w
</base><ctag>
prep:acc:nwok
</ctag></lex>
<lex
disamb=
"1"
><base>
w
</base><ctag>
prep:loc:nwok
</ctag></lex>
</tok>
<tok>
<orth>
prymitywnych
</orth>
<lex><base>
prymitywny
</base><ctag>
adj:pl:acc:m1:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:gen:f:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:gen:m1:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:gen:m2:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:gen:m3:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:gen:n:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
prymitywny
</base><ctag>
adj:pl:loc:f:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:loc:m1:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:loc:m2:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:loc:m3:pos
</ctag></lex>
<lex><base>
prymitywny
</base><ctag>
adj:pl:loc:n:pos
</ctag></lex>
</tok>
<tok>
<orth>
cywilizacjach
</orth>
<lex
disamb=
"1"
><base>
cywilizacja
</base><ctag>
subst:pl:loc:f
</ctag></lex>
</tok>
<tok>
<orth>
nawet
</orth>
<lex
disamb=
"1"
><base>
nawet
</base><ctag>
qub
</ctag></lex>
</tok>
<tok>
<orth>
magiczny
</orth>
<lex><base>
magiczny
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
magiczny
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
magiczny
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
magiczny
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
)
</orth>
<lex
disamb=
"1"
><base>
)
</base><ctag>
interp
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
,
</orth>
<lex
disamb=
"1"
><base>
,
</base><ctag>
interp
</ctag></lex>
</tok>
<tok>
<orth>
ale
</orth>
<lex
disamb=
"1"
><base>
ale
</base><ctag>
conj
</ctag></lex>
</tok>
<tok>
<orth>
nie
</orth>
<lex
disamb=
"1"
><base>
nie
</base><ctag>
qub
</ctag></lex>
<lex><base>
on
</base><ctag>
ppron3:pl:acc:f:ter:praep
</ctag></lex>
<lex><base>
on
</base><ctag>
ppron3:pl:acc:m2:ter:praep
</ctag></lex>
<lex><base>
on
</base><ctag>
ppron3:pl:acc:m3:ter:praep
</ctag></lex>
<lex><base>
on
</base><ctag>
ppron3:pl:acc:n:ter:praep
</ctag></lex>
<lex><base>
on
</base><ctag>
ppron3:sg:acc:n:ter:praep
</ctag></lex>
</tok>
<tok>
<orth>
morski
</orth>
<lex><base>
morski
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
morski
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
morski
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
morski
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
,
</orth>
<lex
disamb=
"1"
><base>
,
</base><ctag>
interp
</ctag></lex>
</tok>
<tok>
<orth>
lotniczy
</orth>
<lex><base>
lotniczy
</base><ctag>
adj:pl:nom:m1:pos
</ctag></lex>
<lex><base>
lotniczy
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
lotniczy
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
lotniczy
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
lotniczy
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
,
</orth>
<lex
disamb=
"1"
><base>
,
</base><ctag>
interp
</ctag></lex>
</tok>
<tok>
<orth>
rolny
</orth>
<lex><base>
rolny
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
rolny
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
rolny
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
rolny
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<tok>
<orth>
czy
</orth>
<lex
disamb=
"1"
><base>
czy
</base><ctag>
conj
</ctag></lex>
<lex><base>
czy
</base><ctag>
qub
</ctag></lex>
</tok>
<tok>
<orth>
leśny
</orth>
<lex><base>
leśny
</base><ctag>
adj:sg:acc:m3:pos
</ctag></lex>
<lex><base>
leśny
</base><ctag>
adj:sg:nom:m1:pos
</ctag></lex>
<lex><base>
leśny
</base><ctag>
adj:sg:nom:m2:pos
</ctag></lex>
<lex
disamb=
"1"
><base>
leśny
</base><ctag>
adj:sg:nom:m3:pos
</ctag></lex>
</tok>
<ns/>
<tok>
<orth>
.
</orth>
<lex
disamb=
"1"
><base>
.
</base><ctag>
interp
</ctag></lex>
</tok>
</chunk>
</chunk>
</chunkList>
</cesAna>
This diff is collapsed.
Click to expand it.
tests/datadriven.cpp
+
6
−
1
View file @
94b97137
...
...
@@ -100,11 +100,16 @@ void test_one_item_actual(const compare_test& c)
++
line_no
;
std
::
getline
(
ifs_in
,
line
);
BOOST_REQUIRE
(
line
==
"---"
||
line
==
""
);
}
else
{
if
(
operator_string
.
empty
()
&&
line
.
substr
(
0
,
9
)
==
"position="
)
{
std
::
string
new_position
=
line
.
substr
(
9
);
sc
.
set_position
(
atoi
(
new_position
.
c_str
()));
}
else
{
operator_string
+=
line
+
"
\n
"
;
}
}
}
}
int
init_subdir
(
const
path
&
dir
,
std
::
string
ps
,
std
::
vector
<
compare_test
>&
tests
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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