Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
macaon2
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexis Nasr
macaon2
Commits
f1a77980
Commit
f1a77980
authored
Nov 15, 2016
by
Johannes Heinecke
Browse files
Options
Downloads
Patches
Plain Diff
programme test pour l'export
parent
53eea287
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!7
Johannes
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CMakeLists.txt
+2
-0
2 additions, 0 deletions
CMakeLists.txt
maca_export/CMakeLists.txt
+25
-0
25 additions, 0 deletions
maca_export/CMakeLists.txt
maca_export/src/test.cc
+39
-0
39 additions, 0 deletions
maca_export/src/test.cc
with
66 additions
and
0 deletions
CMakeLists.txt
+
2
−
0
View file @
f1a77980
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
maca_export/CMakeLists.txt
+
25
−
0
View file @
f1a77980
...
@@ -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
()
This diff is collapsed.
Click to expand it.
maca_export/src/test.cc
0 → 100644
+
39
−
0
View file @
f1a77980
#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;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment