Skip to content
Snippets Groups Projects
Commit 5f833feb authored by Bartosz Broda's avatar Bartosz Broda
Browse files

add stubs for mwe implementation

parent fcea786e
Branches
No related merge requests found
......@@ -25,7 +25,7 @@ include_directories(${LibXML++_INCLUDE_DIRS})
link_directories(${LibXML++_LIBRARY_DIRS})
set(LIBS ${LIBS} ${LibXML++_LIBRARIES})
add_library(corpus2_mwereader SHARED mwereader.cpp )
add_library(corpus2_mwereader SHARED mwereader.cpp mwe.cpp )
target_link_libraries(corpus2_mwereader corpus2)
......
#ifndef LIBMWEREADER_MWE_H
#define LIBMWEREADER_MWE_H
#include <libcorpus2/io/reader.h>
namespace Corpus2 {
class LexicalUnit
{
};
class FixedLU : public LexicalUnit
{
};
class FlexLU : public LexicalUnit
{
};
class MWEIndex // lub base -> vector<LexicalUnit>
{
};
}// ns Corpus2
#endif //LIBMWEREADER_MWE_H
......@@ -103,16 +103,16 @@ namespace Corpus2 {
}
}
void MWEParser::print_current_mwe(bool with_condition)
void MWEParser::print_current_mwe(bool with_condition, std::ostream &out)
{
std::cout << "Forma podstawowa: " << mwe_base_ << "\nZmienne: ";
out << "Forma podstawowa: " << mwe_base_ << "\nZmienne: ";
foreach(str_map::value_type &i, variables_)
std::cout << i.first << ": " << i.second << ", ";
std::cout << "\nWarunek głowy: " << head_cond_ << "\n";
out << i.first << ": " << i.second << ", ";
out << "\nWarunek głowy: " << head_cond_ << "\n";
if(with_condition){
std::cout << "Grupa jednostek: " << group_name_ << std::endl;
std::cout << "Operator: " << wccl_operator_ << std::endl;
out << "Grupa jednostek: " << group_name_ << std::endl;
out << "Operator: " << wccl_operator_ << std::endl;
}
......@@ -124,6 +124,8 @@ namespace Corpus2 {
boost::algorithm::trim(str);
grab_characters_ = false;
return str;
//std::pair<wcclptr, wcclptr, map<string,string>, string, type>
}
} // ns Corpus2
......@@ -6,6 +6,10 @@
namespace Corpus2 {
class MWEBuilder
{
};
class MWEParser : public BasicSaxParser
{
......@@ -20,7 +24,8 @@ protected:
void on_end_element(const Glib::ustring &name);
std::string finish_get_text();
void print_current_mwe(bool with_condition = false);
void print_current_mwe(bool with_condition = false,
std::ostream& out = std::cout);
/// retrives tagset= attribute
......
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