Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
corpus2
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
corpus2
Commits
071f2b1b
Commit
071f2b1b
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Patches
Plain Diff
fix xces/ccl ,disamb_only processing
parent
75b195ca
Branches
Branches containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libcorpus2/io/xmlreader.cpp
+5
-1
5 additions, 1 deletion
libcorpus2/io/xmlreader.cpp
libcorpus2/io/xmlreader.h
+2
-0
2 additions, 0 deletions
libcorpus2/io/xmlreader.h
with
7 additions
and
1 deletion
libcorpus2/io/xmlreader.cpp
+
5
−
1
View file @
071f2b1b
...
...
@@ -77,6 +77,8 @@ void XmlReader::on_start_element(const Glib::ustring &name,
state_
=
STATE_TAG
;
grab_characters_
=
true
;
clear_buf
();
}
else
if
(
state_
==
STATE_LEX_SKIP
&&
name
==
"lex"
||
name
==
"base"
||
name
==
"ctag"
)
{
//nop
}
else
if
(
name
==
"ns"
)
{
wa_
=
PwrNlp
::
Whitespace
::
None
;
}
else
if
(
state_
==
STATE_NONE
&&
name
==
"tok"
)
{
...
...
@@ -175,6 +177,8 @@ void XmlReader::start_lexeme(const AttributeList &attributes)
tok_
->
add_lexeme
(
Lexeme
());
tok_
->
lexemes
().
back
().
set_disamb
(
is_disamb
);
state_
=
STATE_LEX
;
}
else
{
state_
=
STATE_LEX_SKIP
;
}
}
...
...
@@ -225,7 +229,7 @@ void XmlReader::on_end_element(const Glib::ustring &name)
tok_
->
lexemes
().
back
().
set_tag
(
tag
);
grab_characters_
=
false
;
state_
=
STATE_LEX
;
}
else
if
(
state_
==
STATE_LEX
&&
name
==
"lex"
)
{
}
else
if
(
(
state_
==
STATE_LEX
||
state_
==
STATE_LEX_SKIP
)
&&
name
==
"lex"
)
{
state_
=
STATE_TOK
;
}
else
if
(
state_
==
STATE_TOK
&&
name
==
"tok"
)
{
finish_token
();
...
...
This diff is collapsed.
Click to expand it.
libcorpus2/io/xmlreader.h
+
2
−
0
View file @
071f2b1b
...
...
@@ -84,6 +84,8 @@ protected:
static
const
int
STATE_LEX
=
5
;
static
const
int
STATE_LEMMA
=
6
;
static
const
int
STATE_TAG
=
7
;
static
const
int
STATE_LEX_SKIP
=
8
;
/// The state of the parser
int
state_
;
...
...
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