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

Wrapper for Corpus

parent 44c96ffe
No related merge requests found
#ifndef SWIG_LIBCORPUS2_CORPUS_I
#define SWIG_LIBCORPUS2_CORPUS_I
%module libcorpuscorpus
%{
#include <libcorpus2_whole/corpus.h>
%}
%include "std_defs.i"
%include "document.i"
%template(CorpusPtr) boost::shared_ptr<Corpus2::whole::Corpus>;
%template(ConstCorpusPtr) boost::shared_ptr<const Corpus2::whole::Corpus>;
namespace Corpus2 {
namespace whole {
class Corpus {
public:
Corpus(const std::string name = "");
void add_document(boost::shared_ptr<Document> document);
boost::shared_ptr<Document> next_document();
const std::vector<boost::shared_ptr<Document> > documents() const;
};
} // whole ns
} // Corpus2 ns
using namespace std;
using namespace Corpus2;
using namespace Corpus2::whole;
#endif /* SWIG_LIBCORPUS2_CORPUS_I */
......@@ -27,6 +27,8 @@
%include "tokenreader.i"
%include "tokenwriter.i"
%include "corpus.i"
%{
#include <libcorpus2/util/settings.h>
static void set_verbose(bool v) {
......
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