|
Frog
|
#include "frog/mbma_mod.h"#include <cstdlib>#include <string>#include <set>#include <iostream>#include <algorithm>#include <fstream>#include "timbl/TimblAPI.h"#include "ticcutils/Configuration.h"#include "ticcutils/StringOps.h"#include "ticcutils/PrettyPrint.h"#include "ticcutils/Unicode.h"#include "ticcutils/SocketBasics.h"#include "ticcutils/json.hpp"#include "frog/Frog-util.h"#include "frog/FrogData.h"
Macros | |
| #define | LOG *TiCC::Log(errLog) |
| #define | DBG *TiCC::Log(dbgLog) |
Functions | |
| string | find_class (unsigned int step, const vector< string > &classes, unsigned int nranal) |
| vector< vector< string > > | generate_all_perms (const vector< string > &classes) |
| bool | mbmacmp (Rule *m1, Rule *m2) |
| BracketNest * | copy_nest (const BracketNest *brackets) |
Variables | |
| const long int | LEFT = 6 |
| const long int | RIGHT = 6 |
| #define DBG *TiCC::Log(dbgLog) |
| #define LOG *TiCC::Log(errLog) |
| BracketNest* copy_nest | ( | const BracketNest * | brackets | ) |
| string find_class | ( | unsigned int | step, |
| const vector< string > & | classes, | ||
| unsigned int | nranal | ||
| ) |
| vector<vector<string> > generate_all_perms | ( | const vector< string > & | classes | ) |
determine all alternative analyses, remember the largest and store every part in a vector of string vectors
| classes | A vector of possibilities generated by Timbl |
example: Timbl has given 3 results for the word 'gek':
classes={"A|N|V","0","0/P|0/e|0/te1|0/te2I"} (from the word 'gek')
This is converted to { {"A","N","V","V"}, {"0","0","0","0" }, {"0/P","0/e","0/te1","0/te2I"} }
As we can see, the "0" from classes is expanded by duplication 4 times. The "A|N|V" is expanded by duplicating the last "V".
an then for index 1 to 4 the results are collected:
{ {"A","0","0/P"}, {N","0", "0/e"}, {"V","0", "0/te1"}, {"V", "0","0/te2I"} }
| const long int LEFT = 6 |
| const long int RIGHT = 6 |
1.8.17