Skip to content
Snippets Groups Projects
Commit e88ac964 authored by Adam Radziszewski's avatar Adam Radziszewski
Browse files

add remove_all_lexemes to token, useful for tagging

parent b6245edd
Branches
No related merge requests found
......@@ -115,6 +115,11 @@ public:
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
void replace_lexemes(const std::vector<Lexeme>& new_lexemes) {
lexemes_ = new_lexemes;
......
......@@ -50,6 +50,8 @@ namespace Corpus2 {
void add_lexeme(const Lexeme& lex);
void remove_all_lexemes();
const Lexeme& get_preferred_lexeme(const Tagset& tagset) const;
size_t get_preferred_lexeme_index(const Tagset& tagset) const;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment