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

(swig) Updated wrapper for Wccl::Parser

parent 06af9b59
Branches
No related merge requests found
......@@ -7,8 +7,16 @@
%}
%include "libcclbool.i"
%include "libccltset.i"
%include "libcclstrset.i"
%include "libcclposition.i"
%include "libccloperator.i"
%include "libcorpus/libcorpustagsetmanager.i"
// %include "libccltagrule.i"
// %include "libccltagrulesequence.i"
// %include "libcclmatchrule.i"
%include "libcclfunctionaloperator.i"
%include "libcorpus/libcorpustagset.i"
%include "std_string.i"
%include "std_vector.i"
......@@ -17,12 +25,82 @@
namespace Wccl {
class Parser {
public:
Parser(const Corpus2::Tagset&);
~TagsetManager();
explicit Parser(const Corpus2::Tagset&);
explicit Parser(const std::string& tagset_name);
~Parser();
/* --------------------------------------------------------------------- */
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<Operator<StrSet> >
parseStringOperator (const std::string& operator_string) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<Operator<Bool> >
parseBoolOperator (const std::string& operator_string) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<Operator<TSet> >
parseSymSetOperator (const std::string& operator_string) const;
%exception {
try {
$action
} catch (PwrNlp::PwrNlpError &e) {
PyErr_SetString(PyExc_IndexError, e.info().c_str());
return NULL;
}
}
shared_ptr<Operator<Position> >
parsePositionOperator(const std::string& operator_string) const;
/* --------------------------------------------------------------------- */
shared_ptr<FunctionalOperator>
parseAnyOperator(const std::string& operator_string) const;
/* --------------------------------------------------------------------- */
// shared_ptr<TagRuleSequence>
// parseTagRuleSequence(const std::string& rule_string) const;
// shared_ptr<TagRule>
// parseSingleRule(const std::string& rule_string) const;
// boost::shared_ptr<MatchRule>
// parseMatchRule(const std::string& rule_string) const;
/*
* NOT IMPLEMENTED YET!
* ------------------------------------------------
boost::shared_ptr<WcclFile> parseWcclFile(
const std::string& file_contents_string,
const std::string& search_path = ".") const;
*/
/* --------------------------------------------------------------------- */
// %rename (SharedPtrBoolOperator) boost::shared_ptr<Operator<Bool> >;
shared_ptr<Operator<Bool> > parseBoolOperator(const std::string&) const;
const Corpus2::Tagset& tagset() const;
};
}
......
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