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

Merge branch 'johannes' into 'master'

Johannes

See merge request !7
parents 821ec273 363c1bde
No related branches found
No related tags found
1 merge request!7Johannes
...@@ -12,6 +12,8 @@ if (${CMAKE_C_COMPILER_VERSION} VERSION_LESS 5.3) ...@@ -12,6 +12,8 @@ if (${CMAKE_C_COMPILER_VERSION} VERSION_LESS 5.3)
#set_property(GLOBAL PROPERTY C_STANDARD 11) #set_property(GLOBAL PROPERTY C_STANDARD 11)
endif() endif()
set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} -O3")
# activate with cmake -DMACA_EXPORT=TRUE # activate with cmake -DMACA_EXPORT=TRUE
# to use macaon in python/java (with swig) # to use macaon in python/java (with swig)
if(MACA_EXPORT) if(MACA_EXPORT)
......
...@@ -94,6 +94,31 @@ if(MACA_EXPORT) ...@@ -94,6 +94,31 @@ if(MACA_EXPORT)
else() else()
message("swig >= 3.0 not installed on your system") message("swig >= 3.0 not installed on your system")
endif() endif()
set(TESTSOURCES
src/maca_lemmatizer_export.cc
src/maca_trans_parser_export.cc
src/maca_trans_tagger_export.cc
)
# #compiling library
# include_directories(src)
# add_library(swigtransparse ${TESOURCES})
#target_link_libraries(transparse perceptron)
add_executable(testcxx ./src/test.cc ${TESTSOURCES})
target_link_libraries(testcxx perceptron)
target_link_libraries(testcxx transparse)
target_link_libraries(testcxx maca_common)
# install (TARGETS testcxx DESTINATION bin)
endif() endif()
#include <iostream>
#include <fstream>
#include "maca_lemmatizer_export.h"
#include "maca_trans_parser_export.h"
#include "maca_trans_tagger_export.h"
// test programme to be able using valgrind on the exported part of macaon
using namespace std ;
int main(int argc, char *argv[]) {
if (argc < 4) {
cerr << "usage: " << argv[0] << " <langue> <mcd-file> <mcf-file>" << endl;
return 1;
}
//MacaonTransTagger *mt = new MacaonTransTagger(argv[1], argv[2]);
//MacaonTransLemmatizer *ml = new MacaonTransLemmatizer(argv[1], argv[2]);
MacaonTransParser *mp = new MacaonTransParser(argv[1], argv[2]);
ifstream ifp(argv[3]);
string text;
string line;
while (!ifp.eof()) {
getline(ifp, line);
text += line + "\n";
}
//const char *tags = mt->tagmcf(text.c_str());
//const char *lemmas = ml->lemmatizemcf(tags);
//const char *deps = mp->parsemcf(lemmas);
const char *deps = mp->parsemcf(text.c_str());
cout << deps << endl;
delete mp;
//delete ml;
//delete mt;
}
...@@ -22,8 +22,13 @@ extern int defait_amalgames; ...@@ -22,8 +22,13 @@ extern int defait_amalgames;
[ ]*: printf("\n:"); [ ]*: printf("\n:");
[ ]*; printf("\n;"); [ ]*; printf("\n;");
[ ]*… printf("\n…"); [ ]*… printf("\n…");
[ ]*\) printf("\n)");
[ ]*» printf("\n»");
\( printf("(\n");
' printf("'\n"); ' printf("'\n");
’ printf("'\n"); ’ printf("'\n");
\" printf("\"\n");
« printf("»\n");
-je printf("\n-je"); -je printf("\n-je");
-tu printf("\n-tu"); -tu printf("\n-tu");
-on printf("\n-on"); -on printf("\n-on");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment