Frog
|
#include <algorithm>
#include "frog/ner_tagger_mod.h"
#include "mbt/MbtAPI.h"
#include "frog/Frog-util.h"
#include "ticcutils/FileUtils.h"
#include "ticcutils/StringOps.h"
#include "ticcutils/PrettyPrint.h"
Macros | |
#define | LOG *TiCC::Log(err_log) |
#define | DBG *TiCC::Log(dbg_log) |
Functions | |
string | to_tag (const string &label, bool inside) |
#define DBG *TiCC::Log(dbg_log) |
#define LOG *TiCC::Log(err_log) |
string to_tag | ( | const string & | label, |
bool | inside | ||
) |
convert a label into a result tag
label | the label as a string |
inside | are we 'inside' the tag or at the begin? |
There are several cases:
The label is ambiguous, like "loc+org". then we return "O" The label is usable like 'org'. Then we return 'I-org' when 'inside' or 'B-org' othwerwise