diff --git a/CMakeLists.txt b/CMakeLists.txt index f60324a1a5f4a65d33ac50847465680722be075a..98ced3ce6d3123d37c7849c42b64b39e73d68431 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,8 @@ PROJECT(Corpus2Library) set(corpus2_ver_major "1") -set(corpus2_ver_minor "3") -set(corpus2_ver_patch "4") +set(corpus2_ver_minor "4") +set(corpus2_ver_patch "0") cmake_minimum_required(VERSION 2.8.0) diff --git a/libcorpus2/sentence.h b/libcorpus2/sentence.h index d182fdac34c7f0d35c98ac10d570da1f1ab128c5..72b2a490249a257a3187411f07810b28b5de2327 100644 --- a/libcorpus2/sentence.h +++ b/libcorpus2/sentence.h @@ -118,12 +118,17 @@ public: return id_; } + /// Identifier setter + void set_id(const std::string &id) { + id_ = id; + } + protected: /// The tokens this sentence contains and owns std::vector<Token*> tokens_; /// The sentence identifer - default is empty - const std::string id_; + std::string id_; }; } /* end ns Corpus2 */ diff --git a/swig/sentence.i b/swig/sentence.i index 09cca92ec91cb34f20efc3968a7a02423c450ddc..437b1b61675d806a3121b65d9e087eb07d6c5e74 100644 --- a/swig/sentence.i +++ b/swig/sentence.i @@ -48,6 +48,8 @@ namespace Corpus2 { const std::string id() const; + void set_id(const std::string &id); + %extend { static boost::shared_ptr<Corpus2::Sentence> create_sent(const std::string &id) { return boost::shared_ptr<Corpus2::Sentence>(new Corpus2::Sentence(id));