Frog
Macros | Functions
tagger_base.cxx File Reference
#include "frog/tagger_base.h"
#include <algorithm>
#include "ticcutils/SocketBasics.h"
#include "ticcutils/PrettyPrint.h"
#include "ticcutils/json.hpp"
#include "frog/Frog-util.h"
Include dependency graph for tagger_base.cxx:

Macros

#define LOG   *TiCC::Log(err_log)
 
#define DBG   *TiCC::Log(dbg_log)
 

Functions

json create_json (const vector< tag_entry > &tv)
 
vector< TagResult > json_to_TR (const json &in)
 
ostream & operator<< (ostream &os, const tag_entry &e)
 

Macro Definition Documentation

◆ DBG

#define DBG   *TiCC::Log(dbg_log)

◆ LOG

#define LOG   *TiCC::Log(err_log)

Function Documentation

◆ create_json()

json create_json ( const vector< tag_entry > &  tv)

output a vector of tag_entry structs as JSON

Parameters
tvThe vector of tag_entry elements, filled by the tagger
Returns
a json structure

◆ json_to_TR()

vector<TagResult> json_to_TR ( const json &  in)

convert a JSON structure to a vector of TagResult elements

Parameters
inThe input JSON
Returns
a vector of TagResult structures

Used by the server mode to convert incoming JSON to a structure we can further process

◆ operator<<()

ostream& operator<< ( ostream &  os,
const tag_entry e 
)

output a tag_entry (debugging only)

Parameters
osthe output stream
ethe element to output