Skip to content
Snippets Groups Projects
Commit 5b42d1a1 authored by Paweł Kędzia's avatar Paweł Kędzia
Browse files

Added wrapper for Corpus2::Lexeme

parent 8f55c3c3
Branches
No related merge requests found
#ifndef SWIG_LIBCORPUS2_LEXEME_I
#define SWIG_LIBCORPUS2_LEXEME_I
%module libcorpuslexeme
%{
#include <unicode/unistr.h>
#include <libcorpus2/lexeme.h>
%}
%include "libcorpustag.i"
%include "std_string.i"
%include "std_vector.i"
%feature("notabstract") Corpus2::Lexeme;
%rename(__op_eq__) Corpus2::Lexeme::operator==(const Lexeme& other) const;
%rename(__op_lw__) Corpus2::Lexeme::operator<(const Lexeme& other) const;
namespace Corpus2 {
class Lexeme {
public:
Lexeme();
Lexeme(const UnicodeString& lemma, const Tag& tag);
static Lexeme create(const UnicodeString& lemma, const Tag& tag);
const UnicodeString& lemma() const;
void set_lemma(const UnicodeString& l);
const std::string lemma_utf8() const;
const Tag& tag() const;
void set_tag(const Tag& tag);
bool is_null() const;
void set_disamb(bool value);
bool is_disamb() const;
bool operator<(const Lexeme& other) const;
bool operator==(const Lexeme& other) const;
};
}
using namespace std;
using namespace Corpus2;
#endif /* SWIG_LIBCORPUS2_LEXEME_I */
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