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

Some fixes

parent 457811ce
No related branches found
No related tags found
No related merge requests found
......@@ -19,6 +19,7 @@ CBIN=libcorpustag.o \
libcorpuslexeme.o \
libcorpussentence.o \
libcorpuschunk.o \
libcorpustoken.o \
libcorpustokenwriter.o \
libcorpustokenreader.o \
libcorpusiob.o \
......@@ -142,6 +143,13 @@ libcorpuschunk.o:
$(CPP) -shared libcorpuschunk_wrap.o \
$(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpuschunk.so
# Token
libcorpustoken.o:
$(SWIG) $(SWIGOPTS_LANG) libcorpustoken.i
$(CPP) -c libcorpustoken_wrap.cxx -I$(PYTHONDIR) $(CPPFLAGS)
$(CPP) -shared libcorpustoken_wrap.o \
$(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpustoken.so
# Sentence
libcorpussentence.o:
$(SWIG) $(SWIGOPTS_LANG) libcorpussentence.i
......
......@@ -16,6 +16,8 @@
%include "libcorpussentence.i"
%template(ChunkPtr) boost::shared_ptr<Corpus2::Chunk>;
%template(SentencePtrVector) std::vector<boost::shared_ptr<Sentence> >;
%template(attr_map_t) std::map<std::string, std::string>;
namespace Corpus2 {
......
......@@ -12,6 +12,7 @@
%template(Ptr) boost::shared_ptr<Corpus2::Sentence>;
%template(ConstPtr) boost::shared_ptr<const Corpus2::Sentence>;
%template(TokenPtrVector) std::vector<Corpus2::Token*>;
namespace Corpus2 {
class Sentence {
......
......@@ -13,6 +13,9 @@
%feature("notabstract") Corpus2::Tagset;
%template(TagVector) std::vector<Corpus2::Tag>;
%template(StdStringVector) std::vector<std::string>;
namespace Corpus2 {
class Tagset {
public:
......
......@@ -10,8 +10,10 @@
%include "std_string.i"
%include "std_vector.i"
%include "boost_shared_ptr.i"
%feature("notabstract") Corpus2::TagsetManager;
%template(TagsetPtr) boost::shared_ptr<Tagset>;
namespace Corpus2 {
class TagsetManager {
......@@ -21,8 +23,7 @@ namespace Corpus2 {
/* --------------------------------------------------------------------- */
const Tagset& get_tagset(const std::string& name);
// boost::shared_ptr<Tagset> get_cache_entry(const std::string& name);
boost::shared_ptr<Tagset> get_cache_entry(const std::string& name);
/* --------------------------------------------------------------------- */
};
......
......@@ -10,15 +10,15 @@
%include "libcorpuslexeme.i"
%include "libcorpustagset.i"
%include "std_pair.i"
%include "std_string.i"
%include "std_vector.i"
%feature("notabstract") Corpus2::Token;
%rename(__op_eq__) Corpus2::Token::operator==(const Token& other) const;
%rename(__op_eq__) Corpus2::Token::operator==(const Corpus2::Token& other) const;
%template(lexemeVector) std::vector<Lexeme>;
%template(LexemeVector) std::vector<Corpus2::Lexeme>;
namespace Corpus2 {
class Token {
......
......@@ -17,6 +17,8 @@
%nodefaultctor Corpus2::TokenReader;
%template(TokenReaderPtr) boost::shared_ptr<Corpus2::TokenReader>;
// %template(StdStringVector) std::vector<std::string>;
// %template(ChunkPtr) boost::shared_ptr<Corpus2::Chunk>;
namespace Corpus2 {
class TokenReader {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment