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
df87cab9
Commit
df87cab9
authored
13 years ago
by
ilor
Browse files
Options
Downloads
Plain Diff
Merge branch 'master' of nlp.pwr.wroc.pl:wccl
parents
fd891280
0e2d3643
Branches
Branches containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libwccl/lexicon/lexicon.cpp
+3
-3
3 additions, 3 deletions
libwccl/lexicon/lexicon.cpp
with
3 additions
and
3 deletions
libwccl/lexicon/lexicon.cpp
+
3
−
3
View file @
df87cab9
...
...
@@ -33,13 +33,13 @@ boost::shared_ptr<StrSet> Lexicon::translate(const StrSet& set) const
void
Lexicon
::
insert
(
const
UnicodeString
&
key
,
const
UnicodeString
&
value
)
{
if
(
has_key
(
key
))
{
throw
InvalidArgument
(
"key"
,
PwrNlp
::
to_utf8
(
key
)
+
" - entry already added."
);
throw
InvalidArgument
(
"key"
,
"Duplicated key in lexicon: "
+
PwrNlp
::
to_utf8
(
key
)
);
}
if
(
key
.
isEmpty
())
{
throw
InvalidArgument
(
"key"
,
"
Cannot add an empty string
."
);
throw
InvalidArgument
(
"key"
,
"
Empty key string in lexicon
."
);
}
if
(
value
.
isEmpty
())
{
throw
InvalidArgument
(
"value"
,
"
Cannot add an empty string
."
);
throw
InvalidArgument
(
"value"
,
"
Empty value string in lexicon
."
);
}
map_
[
key
]
=
value
;
}
...
...
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