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

namespace Corpus2::whole

parent a239625f
Branches
No related merge requests found
...@@ -18,6 +18,7 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -18,6 +18,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
Document::Document() Document::Document()
: paragraphs_(), relations_() : paragraphs_(), relations_()
...@@ -28,4 +29,5 @@ Document::~Document() ...@@ -28,4 +29,5 @@ Document::~Document()
{ {
} }
} /* end ns Corpus2 */ } // whole ns
} // Corpus2 ns
...@@ -22,6 +22,7 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -22,6 +22,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
/** /**
* A whole document, consisting of consecutive paragraphs ("chunks"), being * A whole document, consisting of consecutive paragraphs ("chunks"), being
...@@ -63,6 +64,7 @@ protected: ...@@ -63,6 +64,7 @@ protected:
std::vector< boost::shared_ptr<Relation> > relations_; std::vector< boost::shared_ptr<Relation> > relations_;
}; };
} /* end ns Corpus2 */ } // whole ns
} // Corpus2 ns
#endif // LIBCORPUS2_WHOLE_DOCUMENT_H #endif // LIBCORPUS2_WHOLE_DOCUMENT_H
...@@ -15,9 +15,10 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -15,9 +15,10 @@ or FITNESS FOR A PARTICULAR PURPOSE.
*/ */
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
#include <libcorpus2_whole/io/docreader.h> #include <libcorpus2_whole/io/documentreader.h>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
DocumentReader::DocumentReader(const Tagset& tagset, DocumentReader::DocumentReader(const Tagset& tagset,
const std::string &annot_path, const std::string &rela_path) const std::string &annot_path, const std::string &rela_path)
: DocumentReaderI("document") : DocumentReaderI("document")
...@@ -77,4 +78,5 @@ namespace Corpus2 { ...@@ -77,4 +78,5 @@ namespace Corpus2 {
return ""; return "";
} }
} /* end ns Corpus2 */ } // whole ns
} // Corpus2 ns
...@@ -26,6 +26,7 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -26,6 +26,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
/** /**
* A reader for whole documents. Note that a whole document is read into memory * A reader for whole documents. Note that a whole document is read into memory
...@@ -84,6 +85,8 @@ private: ...@@ -84,6 +85,8 @@ private:
/// Pointer to RelationReader /// Pointer to RelationReader
boost::shared_ptr<RelationReader> rel_reader_; boost::shared_ptr<RelationReader> rel_reader_;
}; };
} /* end ns Corpus2 */
} // whole ns
} // Corpus2 ns
#endif // LIBCORPUS2_WHOLE_DOCREADER_H #endif // LIBCORPUS2_WHOLE_DOCREADER_H
...@@ -22,6 +22,8 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -22,6 +22,8 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <boost/make_shared.hpp> #include <boost/make_shared.hpp>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
RelationReader::RelationReader(const std::string &rela_path) RelationReader::RelationReader(const std::string &rela_path)
: rela_path_(rela_path) : rela_path_(rela_path)
{ {
...@@ -197,4 +199,5 @@ std::string RelationReader::get_attribute_value( ...@@ -197,4 +199,5 @@ std::string RelationReader::get_attribute_value(
return ""; return "";
} }
} /* end ns Corpus2 */ } // whole ns
} // Corpus2 ns
...@@ -27,6 +27,8 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -27,6 +27,8 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <iostream> #include <iostream>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
const static std::string RELATION_TAG = "rel"; const static std::string RELATION_TAG = "rel";
const static std::string RELATIONS_TAG = "relations"; const static std::string RELATIONS_TAG = "relations";
const static std::string RELATION_DIRECT_FROM = "from"; const static std::string RELATION_DIRECT_FROM = "from";
...@@ -118,6 +120,8 @@ private: ...@@ -118,6 +120,8 @@ private:
boost::shared_ptr<DirectionPoint> rel_from_; boost::shared_ptr<DirectionPoint> rel_from_;
boost::shared_ptr<DirectionPoint> rel_to_; boost::shared_ptr<DirectionPoint> rel_to_;
}; };
} /* end ns Corpus2 */
} // whole ns
} // Corpus2 ns
#endif // LIBCORPUS2_WHOLE_RELREADER_H #endif // LIBCORPUS2_WHOLE_RELREADER_H
...@@ -18,6 +18,7 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -18,6 +18,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <libcorpus2_whole/relation.h> #include <libcorpus2_whole/relation.h>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
Relation::Relation(const std::string& name, Relation::Relation(const std::string& name,
const boost::shared_ptr<const DirectionPoint> from, const boost::shared_ptr<const DirectionPoint> from,
...@@ -39,4 +40,5 @@ Relation::~Relation() ...@@ -39,4 +40,5 @@ Relation::~Relation()
{ {
} }
} /* end ns Corpus2 */ } // whole ns
} // Corpus2 ns
...@@ -21,6 +21,7 @@ or FITNESS FOR A PARTICULAR PURPOSE. ...@@ -21,6 +21,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.
#include <boost/shared_ptr.hpp> #include <boost/shared_ptr.hpp>
namespace Corpus2 { namespace Corpus2 {
namespace whole {
/** /**
* Helper class to represent one of two point of direction in any relation. * Helper class to represent one of two point of direction in any relation.
...@@ -117,6 +118,7 @@ private: ...@@ -117,6 +118,7 @@ private:
const boost::shared_ptr<const DirectionPoint> to_; const boost::shared_ptr<const DirectionPoint> to_;
}; };
} /* end ns Corpus2 */ } // whole ns
} // Corpus2 ns
#endif // LIBCORPUS2_RELATIONT_H #endif // LIBCORPUS2_RELATIONT_H
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