From 091e867ec046d5954183d732ddf0dcaef8bea83e Mon Sep 17 00:00:00 2001 From: Igor <igor.danielewicz@pwr.edu.pl> Date: Fri, 13 Oct 2017 11:59:32 +0200 Subject: [PATCH] Added autodoc --- swig/add_autodoc.sh | 3 +++ swig/annotatedsentence.i | 2 ++ swig/annotationchannel.i | 2 ++ swig/annotationview.i | 2 ++ swig/cclrelreader.i | 2 ++ swig/chunk.i | 2 ++ swig/corpus.i | 2 ++ swig/corpusreader.i | 2 ++ swig/document.i | 2 ++ swig/documentreader.i | 2 ++ swig/exception.i | 2 ++ swig/iob.i | 2 ++ swig/lexeme.i | 2 ++ swig/relation.i | 2 ++ swig/relationreader.i | 2 ++ swig/relationwriter.i | 2 ++ swig/sentence.i | 2 ++ swig/tag.i | 2 ++ swig/tagging.i | 2 ++ swig/tagset.i | 3 ++- swig/tagsetmanager.i | 2 ++ swig/token.i | 2 ++ swig/tokenmetadata.i | 2 ++ swig/tokenreader.i | 2 ++ swig/tokenwriter.i | 2 ++ 25 files changed, 51 insertions(+), 1 deletion(-) create mode 100644 swig/add_autodoc.sh diff --git a/swig/add_autodoc.sh b/swig/add_autodoc.sh new file mode 100644 index 0000000..bff6603 --- /dev/null +++ b/swig/add_autodoc.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +find -type f -name "*.i" | xargs sed -i 's/^namespace Corpus2/\n%feature("autodoc", "1");\nnamespace Corpus2/' diff --git a/swig/annotatedsentence.i b/swig/annotatedsentence.i index f3d2b4e..9aff2b8 100644 --- a/swig/annotatedsentence.i +++ b/swig/annotatedsentence.i @@ -20,6 +20,8 @@ %template(AnnotatedSentencePtr) boost::shared_ptr<Corpus2::AnnotatedSentence>; %template(ConstAnnotatedSentencePtr) boost::shared_ptr<const Corpus2::AnnotatedSentence>; + +%feature("autodoc", "1"); namespace Corpus2 { class MissingAnnotationChannel : public Corpus2Error { public: diff --git a/swig/annotationchannel.i b/swig/annotationchannel.i index 405c0ca..4f9beb7 100644 --- a/swig/annotationchannel.i +++ b/swig/annotationchannel.i @@ -23,6 +23,8 @@ %template(AnnotationChannelPtr) boost::shared_ptr<Corpus2::AnnotationChannel>; %template(ConstAnnotationChannelPtr) boost::shared_ptr<const Corpus2::AnnotationChannel>; + +%feature("autodoc", "1"); namespace Corpus2 { struct Annotation { Annotation() : indices(), head_index(-1), seg_number(0) {} diff --git a/swig/annotationview.i b/swig/annotationview.i index 977c1d3..064ede0 100644 --- a/swig/annotationview.i +++ b/swig/annotationview.i @@ -18,6 +18,8 @@ %nodefaultctor Corpus2::TokenWriter; + +%feature("autodoc", "1"); namespace Corpus2 { class AnnotationView : public Corpus2::Sentence { public: diff --git a/swig/cclrelreader.i b/swig/cclrelreader.i index d18d751..6c53cc6 100644 --- a/swig/cclrelreader.i +++ b/swig/cclrelreader.i @@ -10,6 +10,8 @@ %include "document.i" %include "boost_shared_ptr.i" + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class CclRelReader { diff --git a/swig/chunk.i b/swig/chunk.i index 85e0dce..d1288a0 100644 --- a/swig/chunk.i +++ b/swig/chunk.i @@ -21,6 +21,8 @@ %template(ConstChunkPtr) boost::shared_ptr<const Corpus2::Chunk>; %template(ChunkPtrVector) std::vector< boost::shared_ptr<Corpus2::Chunk> >; + +%feature("autodoc", "1"); namespace Corpus2 { class Chunk { public: diff --git a/swig/corpus.i b/swig/corpus.i index 4d3f8df..1b32b32 100644 --- a/swig/corpus.i +++ b/swig/corpus.i @@ -12,6 +12,8 @@ %template(CorpusPtr) boost::shared_ptr<Corpus2::whole::Corpus>; %template(ConstCorpusPtr) boost::shared_ptr<const Corpus2::whole::Corpus>; + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class Corpus { diff --git a/swig/corpusreader.i b/swig/corpusreader.i index 7f5bddf..e24d291 100644 --- a/swig/corpusreader.i +++ b/swig/corpusreader.i @@ -15,6 +15,8 @@ %template(CorpusReaderPtrVector) std::vector<boost::shared_ptr<Corpus2::whole::CorpusReader> >; + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class CorpusReader { diff --git a/swig/document.i b/swig/document.i index 0e8ea3c..e158c55 100644 --- a/swig/document.i +++ b/swig/document.i @@ -15,6 +15,8 @@ %template(DocumentPtrVector) std::vector<boost::shared_ptr<Corpus2::whole::Document> >; + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class Document { diff --git a/swig/documentreader.i b/swig/documentreader.i index 2290e46..3bc5f12 100644 --- a/swig/documentreader.i +++ b/swig/documentreader.i @@ -15,6 +15,8 @@ %template(DocumentReaderPtrVector) std::vector<boost::shared_ptr<Corpus2::whole::DocumentReader> >; + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class DocumentReader { diff --git a/swig/exception.i b/swig/exception.i index 97295ea..27a97ce 100644 --- a/swig/exception.i +++ b/swig/exception.i @@ -10,6 +10,8 @@ %include "libpwrnlperror.i" + +%feature("autodoc", "1"); namespace Corpus2 { class Corpus2Error : public PwrNlp::PwrNlpError { public: diff --git a/swig/iob.i b/swig/iob.i index c422473..e7ee2cb 100644 --- a/swig/iob.i +++ b/swig/iob.i @@ -15,6 +15,8 @@ %rename(IOB_to_string) Corpus2::IOB::to_string; %rename(IOB_from_string) Corpus2::IOB::from_string; + +%feature("autodoc", "1"); namespace Corpus2 { namespace IOB { enum Enum { diff --git a/swig/lexeme.i b/swig/lexeme.i index 56e41b5..9392394 100644 --- a/swig/lexeme.i +++ b/swig/lexeme.i @@ -17,6 +17,8 @@ %template(LexemeVector) std::vector<Corpus2::Lexeme>; + +%feature("autodoc", "1"); namespace Corpus2 { class Lexeme { public: diff --git a/swig/relation.i b/swig/relation.i index b3970ab..27168b0 100755 --- a/swig/relation.i +++ b/swig/relation.i @@ -19,6 +19,8 @@ using std::string; + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class DirectionPoint { diff --git a/swig/relationreader.i b/swig/relationreader.i index 216abf1..97c6498 100644 --- a/swig/relationreader.i +++ b/swig/relationreader.i @@ -16,6 +16,8 @@ %constant std::string RELATION_SENTENCE_ID = Corpus2::whole::RELATION_SENTENCE_ID; %constant std::string RELATION_CHANNEL_NAME = Corpus2::whole::RELATION_CHANNEL_NAME; + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class RelationReader { diff --git a/swig/relationwriter.i b/swig/relationwriter.i index 1cb9f1d..f1c7465 100755 --- a/swig/relationwriter.i +++ b/swig/relationwriter.i @@ -7,6 +7,8 @@ %} + +%feature("autodoc", "1"); namespace Corpus2 { namespace whole { class RelationWriter { diff --git a/swig/sentence.i b/swig/sentence.i index 437b1b6..5a89b71 100644 --- a/swig/sentence.i +++ b/swig/sentence.i @@ -16,6 +16,8 @@ %template(SentencePtrVector) std::vector<boost::shared_ptr<Corpus2::Sentence> >; %template(ConstSentencePtrVector) std::vector<boost::shared_ptr<const Corpus2::Sentence> >; + +%feature("autodoc", "1"); namespace Corpus2 { class Sentence { public: diff --git a/swig/tag.i b/swig/tag.i index 80d5d51..c327874 100644 --- a/swig/tag.i +++ b/swig/tag.i @@ -19,6 +19,8 @@ %template(TagVector) std::vector<Corpus2::Tag>; + +%feature("autodoc", "1"); namespace Corpus2 { class Tag { public: diff --git a/swig/tagging.i b/swig/tagging.i index 9ebf738..ee6dc99 100644 --- a/swig/tagging.i +++ b/swig/tagging.i @@ -12,6 +12,8 @@ %include "tagset.i" %include "token.i" + +%feature("autodoc", "1"); namespace Corpus2 { Tag get_attribute_mask(const Tagset& tagset, diff --git a/swig/tagset.i b/swig/tagset.i index 8fe526e..dc77bfe 100644 --- a/swig/tagset.i +++ b/swig/tagset.i @@ -5,7 +5,6 @@ %{ #include <libcorpus2/tagset.h> %} - %include "tag.i" %include "exception.i" @@ -18,6 +17,8 @@ %template(TagsetPtr) boost::shared_ptr<Corpus2::Tagset>; %template(ConstTagsetPtr) boost::shared_ptr<const Corpus2::Tagset>; + +%feature("autodoc", "1"); namespace Corpus2 { class Tagset; class TagParseError : public Corpus2Error { diff --git a/swig/tagsetmanager.i b/swig/tagsetmanager.i index 113ed7e..4b690cb 100644 --- a/swig/tagsetmanager.i +++ b/swig/tagsetmanager.i @@ -15,6 +15,8 @@ %feature("notabstract") Corpus2::TagsetManager; + +%feature("autodoc", "1"); namespace Corpus2 { class TagsetNotFound : public Corpus2Error { public: diff --git a/swig/token.i b/swig/token.i index 4e46e88..8f7c42c 100644 --- a/swig/token.i +++ b/swig/token.i @@ -24,6 +24,8 @@ %template(TokenPtrVector) std::vector<Corpus2::Token*>; %template(ConstTokenPtrVector) std::vector<const Corpus2::Token*>; + +%feature("autodoc", "1"); namespace Corpus2 { class Token { public: diff --git a/swig/tokenmetadata.i b/swig/tokenmetadata.i index 8a80fd7..cb6ba0c 100644 --- a/swig/tokenmetadata.i +++ b/swig/tokenmetadata.i @@ -17,6 +17,8 @@ %template(TokenMetaDataPtr) boost::shared_ptr<Corpus2::TokenMetaData>; %template(ConstTokenMetaDataPtr) boost::shared_ptr<const Corpus2::TokenMetaData>; + +%feature("autodoc", "1"); namespace Corpus2 { class TokenMetaData { public: diff --git a/swig/tokenreader.i b/swig/tokenreader.i index 1770331..4a77779 100644 --- a/swig/tokenreader.i +++ b/swig/tokenreader.i @@ -23,6 +23,8 @@ // typedef boost::shared_ptr<Corpus2::Token> TokenPtr; + +%feature("autodoc", "1"); namespace Corpus2 { class TokenReader { public: diff --git a/swig/tokenwriter.i b/swig/tokenwriter.i index 3ca74db..0a5819e 100644 --- a/swig/tokenwriter.i +++ b/swig/tokenwriter.i @@ -19,6 +19,8 @@ %template(TokenWriterPtr) boost::shared_ptr<Corpus2::TokenWriter>; %template(ConstTokenWriterPtr) boost::shared_ptr<const Corpus2::TokenWriter>; + +%feature("autodoc", "1"); namespace Corpus2 { class TokenWriter { public: -- GitLab