Skip to content
Snippets Groups Projects
Commit 454d807c authored by Alexis Nasr's avatar Alexis Nasr
Browse files

Merge branch 'johannes' into 'master'

Johannes

See merge request !9
parents 8328bb18 b6d49a3f
Branches
No related tags found
1 merge request!9Johannes
#include <stdio.h>
#include <string.h>
#include <cstdio>
#include <cstring>
#ifdef __cplusplus
extern "C"{
#endif
//#ifdef __cplusplus
//extern "C"{
//#endif
#include "context.h"
#include "config2feat_vec.h"
#include "movement_tagger.h"
#include "simple_decoder_tagger.h"
#ifdef __cplusplus
}
#endif
//#ifdef __cplusplus
//}
//#endif
#include "maca_trans_tagger_export.h"
......@@ -21,13 +21,15 @@ MacaonTransTagger::MacaonTransTagger(char *lg, char *mcd) {
char * argv[] = { (char *)"initParser",
(char *)"-L", lg,
(char *)"-C", mcd,
//(char *)"--debug",
//(char *)"-v",
0
};
ctx = context_read_options(5, argv);
decode_tagger_set_linguistic_resources_filenames(ctx);
ctx->features_model = feat_model_read(ctx->features_model_filename, ctx->verbose);
ctx->features_model = feat_model_read(ctx->features_model_filename, feat_lib_build(), ctx->verbose);
ctx->vocabs = dico_vec_read(ctx->vocabs_filename, ctx->hash_ratio);
mcd_link_to_dico(ctx->mcd_struct, ctx->vocabs, ctx->verbose);
......@@ -126,7 +128,7 @@ void MacaonTransTagger::simple_decoder_tagger(context *ctx, const char *mcfStrin
add_signature_to_words_in_word_buffer(c->bf, ctx->f2p);
b0 = word_buffer_b0(c->bf);
postag = word_get_pos(b0);
postag = -1; //word_get_pos(b0);
if(ctx->debug_mode){
fprintf(stderr, "***********************************\n");
......@@ -179,7 +181,7 @@ void MacaonTransTagger::print_word(word *w, mcd *mcd_struct, dico *dico_pos, int
token = strtok(buffer, "\t");
col_nb = 0;
while(token){
if(col_nb != 0) printf("\t");
if(col_nb != 0) fprintf(outstream, "\t");
if(col_nb == mcd_get_pos_col(mcd_struct))
fprintf(outstream, "%s", dico_int2string(dico_pos, postag));
else
......
//#include "maca_trans_parser/src/context.h"
//#include "maca_common/include/word.h"
//#ifdef __cplusplus
//extern "C"{
//#endif
#include "context.h"
#include "../../maca_common/include/word.h"
//#ifdef __cplusplus
//}
//#endif
class MacaonTransTagger {
public:
......
#ifndef __SIMPLE_DECODER_TAGGER__
#define __SIMPLE_DECODER_TAGGER__
#include "context.h"
void add_signature_to_words_in_word_buffer(word_buffer *bf, form2pos *f2p);
void simple_decoder_tagger(context *ctx);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment