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

Added sentence identifier (default is set as empty identifer)

parent 6d77a112
Branches
No related merge requests found
......@@ -19,8 +19,8 @@ or FITNESS FOR A PARTICULAR PURPOSE.
namespace Corpus2 {
Sentence::Sentence()
: tokens_()
Sentence::Sentence(const std::string &id)
: tokens_(), id_(id)
{
}
......
......@@ -45,8 +45,9 @@ public:
/// Convenience typedef for a shared pointer to a const Sentence
typedef boost::shared_ptr<const Sentence> ConstPtr;
/// Empty constructor. Creates a Sentence with no tokens.
Sentence();
/// Constructor with default (empty) sentence identifier.
/// Creates a Sentence with no tokens.
Sentence(const std::string &id = "");
/// Sentence cloning. All the tokens are duplicated.
virtual Ptr clone_shared() const;
......@@ -115,6 +116,9 @@ public:
protected:
/// The tokens this sentence contains and owns
std::vector<Token*> tokens_;
/// The sentence identifer - default is empty
const std::string id_;
};
} /* end ns Corpus2 */
......
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