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
e88ac964
There was an error fetching the commit references. Please try again later.
Commit
e88ac964
authored
13 years ago
by
Adam Radziszewski
Browse files
Options
Downloads
Patches
Plain Diff
add remove_all_lexemes to token, useful for tagging
parent
b6245edd
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
libcorpus2/token.h
+5
-0
5 additions, 0 deletions
libcorpus2/token.h
swig/token.i
+2
-0
2 additions, 0 deletions
swig/token.i
with
7 additions
and
0 deletions
libcorpus2/token.h
+
5
−
0
View file @
e88ac964
...
@@ -115,6 +115,11 @@ public:
...
@@ -115,6 +115,11 @@ public:
lexemes_
.
push_back
(
lex
);
lexemes_
.
push_back
(
lex
);
}
}
/// Leaves a faulty token with no lexemes (use with care!)
void
remove_all_lexemes
()
{
lexemes_
.
clear
();
}
/// Replaces all the lexemes with the given vector
/// Replaces all the lexemes with the given vector
void
replace_lexemes
(
const
std
::
vector
<
Lexeme
>&
new_lexemes
)
{
void
replace_lexemes
(
const
std
::
vector
<
Lexeme
>&
new_lexemes
)
{
lexemes_
=
new_lexemes
;
lexemes_
=
new_lexemes
;
...
...
This diff is collapsed.
Click to expand it.
swig/token.i
+
2
−
0
View file @
e88ac964
...
@@ -50,6 +50,8 @@ namespace Corpus2 {
...
@@ -50,6 +50,8 @@ namespace Corpus2 {
void add_lexeme(const Lexeme& lex);
void add_lexeme(const Lexeme& lex);
void remove_all_lexemes();
const Lexeme& get_preferred_lexeme(const Tagset& tagset) const;
const Lexeme& get_preferred_lexeme(const Tagset& tagset) const;
size_t get_preferred_lexeme_index(const Tagset& tagset) const;
size_t get_preferred_lexeme_index(const Tagset& tagset) const;
...
...
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