19namespace LinguisticProcessing {
36 return m_bowstream->str();
44 LDEBUG <<
"BowDocumentHandler::startDocument()";
46 m_bowstream=
new ostringstream();
48 m_writer->
setOut(m_bowstream);
55 LDEBUG <<
"BowDocumentHandler::endDocument()";
62 istringstream in(m_bowstream->str());
85 LDEBUG <<
"BowDocumentHandler::startNode()";
87 m_writer->
startNode(elementName, forIndexing );
93 LDEBUG <<
"BowDocumentHandler::endNode()";
100 LDEBUG <<
"BowDocumentHandler::startAnalysis()";
107 LDEBUG <<
"BowDocumentHandler::endAnalysis()";
114 LDEBUG <<
"BowDocumentHandler::handleText()";
115 m_writer->
handle(buf,length);
#define LPCLIENTSBOWHANDLERLOGINIT
void readHeader(std::istream &file)
BoWBlocType readBoWDocumentBlock(std::istream &file, BoWDocument &document, AbstractBoWDocumentHandler &handler, bool useIterator, bool useIndexIterator)
represent a document as a Bag Of Word, with associated document properties.
void endAnalysis() override
notify the end of an analysis content
std::string getSBoWContent() const
void startNode(const std::string &elementName, bool forIndexing) override
notify the start of a new hierarchyNode
void endNode(const Common::Misc::GenericDocumentProperties &props) override
notify the end of a hierarchyNode
void handle(const char *buf, int length) override
gives content.
virtual ~BowDocumentHandler()
void startAnalysis() override
notify the start of an analysis content
void startDocument(const Common::Misc::GenericDocumentProperties &props) override
notify the start of a new document
void endDocument() override
notify the end of the document
void endAnalysis() override
notify the end of an analysis content
virtual void setOut(std::ostream *out) override
set the output stream.
void handle(const char *buf, int length) override
gives content.
void startAnalysis() override
notify the start of an analysis content
void endNode(const Common::Misc::GenericDocumentProperties &props) override
notify the end of a hierarchyNode
void endDocument() override
notify the end of the document
void startNode(const std::string &elementName, bool forIndexing) override
notify the start of a new hierarchyNode
void startDocument(const Common::Misc::GenericDocumentProperties &props) override
notify the start of a new document