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 merge requests found
...@@ -19,6 +19,7 @@ CBIN=libcorpustag.o \ ...@@ -19,6 +19,7 @@ CBIN=libcorpustag.o \
libcorpuslexeme.o \ libcorpuslexeme.o \
libcorpussentence.o \ libcorpussentence.o \
libcorpuschunk.o \ libcorpuschunk.o \
libcorpustoken.o \
libcorpustokenwriter.o \ libcorpustokenwriter.o \
libcorpustokenreader.o \ libcorpustokenreader.o \
libcorpusiob.o \ libcorpusiob.o \
...@@ -142,6 +143,13 @@ libcorpuschunk.o: ...@@ -142,6 +143,13 @@ libcorpuschunk.o:
$(CPP) -shared libcorpuschunk_wrap.o \ $(CPP) -shared libcorpuschunk_wrap.o \
$(PWRUTILBIN) $(CORPUS2BIN) -o _libcorpuschunk.so $(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 # Sentence
libcorpussentence.o: libcorpussentence.o:
$(SWIG) $(SWIGOPTS_LANG) libcorpussentence.i $(SWIG) $(SWIGOPTS_LANG) libcorpussentence.i
......
...@@ -16,6 +16,8 @@ ...@@ -16,6 +16,8 @@
%include "libcorpussentence.i" %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>; %template(attr_map_t) std::map<std::string, std::string>;
namespace Corpus2 { namespace Corpus2 {
......
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
%template(Ptr) boost::shared_ptr<Corpus2::Sentence>; %template(Ptr) boost::shared_ptr<Corpus2::Sentence>;
%template(ConstPtr) boost::shared_ptr<const Corpus2::Sentence>; %template(ConstPtr) boost::shared_ptr<const Corpus2::Sentence>;
%template(TokenPtrVector) std::vector<Corpus2::Token*>;
namespace Corpus2 { namespace Corpus2 {
class Sentence { class Sentence {
......
...@@ -13,6 +13,9 @@ ...@@ -13,6 +13,9 @@
%feature("notabstract") Corpus2::Tagset; %feature("notabstract") Corpus2::Tagset;
%template(TagVector) std::vector<Corpus2::Tag>;
%template(StdStringVector) std::vector<std::string>;
namespace Corpus2 { namespace Corpus2 {
class Tagset { class Tagset {
public: public:
......
...@@ -10,8 +10,10 @@ ...@@ -10,8 +10,10 @@
%include "std_string.i" %include "std_string.i"
%include "std_vector.i" %include "std_vector.i"
%include "boost_shared_ptr.i"
%feature("notabstract") Corpus2::TagsetManager; %feature("notabstract") Corpus2::TagsetManager;
%template(TagsetPtr) boost::shared_ptr<Tagset>;
namespace Corpus2 { namespace Corpus2 {
class TagsetManager { class TagsetManager {
...@@ -21,8 +23,7 @@ namespace Corpus2 { ...@@ -21,8 +23,7 @@ namespace Corpus2 {
/* --------------------------------------------------------------------- */ /* --------------------------------------------------------------------- */
const Tagset& get_tagset(const std::string& name); 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 @@ ...@@ -10,15 +10,15 @@
%include "libcorpuslexeme.i" %include "libcorpuslexeme.i"
%include "libcorpustagset.i" %include "libcorpustagset.i"
%include "std_pair.i"
%include "std_string.i" %include "std_string.i"
%include "std_vector.i" %include "std_vector.i"
%feature("notabstract") Corpus2::Token; %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 { namespace Corpus2 {
class Token { class Token {
......
...@@ -17,6 +17,8 @@ ...@@ -17,6 +17,8 @@
%nodefaultctor Corpus2::TokenReader; %nodefaultctor Corpus2::TokenReader;
%template(TokenReaderPtr) boost::shared_ptr<Corpus2::TokenReader>; %template(TokenReaderPtr) boost::shared_ptr<Corpus2::TokenReader>;
// %template(StdStringVector) std::vector<std::string>;
// %template(ChunkPtr) boost::shared_ptr<Corpus2::Chunk>;
namespace Corpus2 { namespace Corpus2 {
class TokenReader { class TokenReader {
......
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