Commit 34216dbbd1108d8f1ec19e64ef97de153ef49b9c

Authored by Michał Lenart
1 parent f13a0a02

dodanie opcji oraz testów do C API

git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@233 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
CMakeLists.txt
... ... @@ -10,7 +10,7 @@ if (VERSION_SUFFIX)
10 10 set (Morfeusz_VERSION_TWEAK "${VERSION_SUFFIX}")
11 11 set (Morfeusz_VERSION "${Morfeusz_VERSION}_${Morfeusz_VERSION_TWEAK}")
12 12 endif ()
13   -set (CMAKE_BUILD_TYPE Release)
  13 +set (CMAKE_BUILD_TYPE Debug)
14 14 #~ set (CMAKE_SKIP_RPATH ON)
15 15  
16 16 message ("Version=${Morfeusz_VERSION}")
... ... @@ -159,24 +159,26 @@ add_subdirectory (fsabuilder)
159 159  
160 160 ########## add tests ##########
161 161  
162   -macro (test_build_and_recognize fname method)
163   - add_test (TestBuild-${method}-${fname} python fsabuilder/morfeusz_builder --analyzer --input-files testfiles/${fname} -o /tmp/test-${method}-${fname}.fsa --tagset-file=testfiles/polimorf.tagset --segments-file=testfiles/segmenty.dat --serialization-method=${method})
164   - add_test (TestBuild4Synth-${method}-${fname} python fsabuilder/morfeusz_builder --generator --input-files testfiles/${fname} -o /tmp/test-synth-${method}-${fname}.fsa --tagset-file=testfiles/polimorf.tagset --serialization-method=${method})
165   - add_test (TestRecognize-${method}-${fname} morfeusz/test_recognize_dict /tmp/test-${method}-${fname}.fsa testfiles/${fname})
166   - # add_test (TestNOTRecognize-${method}-${fname} fsa/test_not_recognize /tmp/test-${method}-${fname}.fsa testfiles/out_of_dict)
167   - # add_test (TestSpeed-${method}-${fname} fsa/test_speed /tmp/test-${method}-${fname}.fsa testfiles/speed_test_data)
168   -endmacro ()
169   -
170   -macro (test_result_equals inputFilename requiredOutputFilename encoding)
171   - # add_test (TestBuild4ResultEquals-${dictFilename}-${requiredOutputFilename} python fsabuilder/fsa/morfeusz_builder -i ${dictFilename} -o /tmp/test.fsa --tagset-file=testfiles/polimorf.tagset --output-format=BINARY --serialization-method=SIMPLE)
172   - add_test (TestResultEquals-${inputFilename}-${requiredOutputFilename} morfeusz/test_result_equals ${inputFilename} ${requiredOutputFilename} ${encoding})
173   -endmacro ()
174   -
175   -test_build_and_recognize(PoliMorfSmall.tab SIMPLE)
176   -test_build_and_recognize(PoliMorfSmall.tab V1)
177   -test_build_and_recognize(PoliMorfSmall.tab V2)
178   -
179   -test_result_equals (testfiles/test1.txt testfiles/test1.txt.out UTF8)
180   -test_result_equals (testfiles/test1.txt.ISO8859-2 testfiles/test1.txt.out.ISO8859-2 ISO8859_2)
181   -test_result_equals (testfiles/test1.txt.CP1250 testfiles/test1.txt.out.CP1250 CP1250)
182   -test_result_equals (testfiles/test1.txt.CP852 testfiles/test1.txt.out.CP852 CP852)
  162 +add_test(Test_C_API morfeusz/test_c_api)
  163 +
  164 +#macro (test_build_and_recognize fname method)
  165 +# add_test (TestBuild-${method}-${fname} python fsabuilder/morfeusz_builder --analyzer --input-files testfiles/${fname} -o /tmp/test-${method}-${fname}.fsa --tagset-file=testfiles/polimorf.tagset --segments-file=testfiles/segmenty.dat --serialization-method=${method})
  166 +# add_test (TestBuild4Synth-${method}-${fname} python fsabuilder/morfeusz_builder --generator --input-files testfiles/${fname} -o /tmp/test-synth-${method}-${fname}.fsa --tagset-file=testfiles/polimorf.tagset --serialization-method=${method})
  167 +# add_test (TestRecognize-${method}-${fname} morfeusz/test_recognize_dict /tmp/test-${method}-${fname}.fsa testfiles/${fname})
  168 +# # add_test (TestNOTRecognize-${method}-${fname} fsa/test_not_recognize /tmp/test-${method}-${fname}.fsa testfiles/out_of_dict)
  169 +# # add_test (TestSpeed-${method}-${fname} fsa/test_speed /tmp/test-${method}-${fname}.fsa testfiles/speed_test_data)
  170 +#endmacro ()
  171 +#
  172 +#macro (test_result_equals inputFilename requiredOutputFilename encoding)
  173 +# # add_test (TestBuild4ResultEquals-${dictFilename}-${requiredOutputFilename} python fsabuilder/fsa/morfeusz_builder -i ${dictFilename} -o /tmp/test.fsa --tagset-file=testfiles/polimorf.tagset --output-format=BINARY --serialization-method=SIMPLE)
  174 +# add_test (TestResultEquals-${inputFilename}-${requiredOutputFilename} morfeusz/test_result_equals ${inputFilename} ${requiredOutputFilename} ${encoding})
  175 +#endmacro ()
  176 +#
  177 +#test_build_and_recognize(PoliMorfSmall.tab SIMPLE)
  178 +#test_build_and_recognize(PoliMorfSmall.tab V1)
  179 +#test_build_and_recognize(PoliMorfSmall.tab V2)
  180 +#
  181 +#test_result_equals (testfiles/test1.txt testfiles/test1.txt.out UTF8)
  182 +#test_result_equals (testfiles/test1.txt.ISO8859-2 testfiles/test1.txt.out.ISO8859-2 ISO8859_2)
  183 +#test_result_equals (testfiles/test1.txt.CP1250 testfiles/test1.txt.out.CP1250 CP1250)
  184 +#test_result_equals (testfiles/test1.txt.CP852 testfiles/test1.txt.out.CP852 CP852)
... ...
morfeusz/CMakeLists.txt
... ... @@ -65,13 +65,15 @@ set_target_properties (libmorfeusz PROPERTIES OUTPUT_NAME "morfeusz2")
65 65  
66 66 add_executable (morfeusz_analyzer morfeusz_analyzer.cpp)
67 67 add_executable (morfeusz_generator morfeusz_generator.cpp)
68   -add_executable (test_result_equals test/test_result_equals.cpp)
69   -add_executable (test_recognize_dict test/test_recognize_dict.cpp)
  68 +add_executable (test_c_api tests/test_c_api.cpp)
  69 +#add_executable (test_result_equals test/test_result_equals.cpp)
  70 +#add_executable (test_recognize_dict test/test_recognize_dict.cpp)
70 71  
71 72 target_link_libraries (morfeusz_analyzer libmorfeusz)
72 73 target_link_libraries (morfeusz_generator libmorfeusz)
73   -target_link_libraries (test_result_equals libmorfeusz)
74   -target_link_libraries (test_recognize_dict libmorfeusz)
  74 +target_link_libraries (test_c_api libmorfeusz)
  75 +#target_link_libraries (test_result_equals libmorfeusz)
  76 +#target_link_libraries (test_recognize_dict libmorfeusz)
75 77  
76 78 add_subdirectory (wrappers)
77 79  
... ...
morfeusz/DefaultTagset.cpp
... ... @@ -12,7 +12,8 @@ namespace morfeusz {
12 12  
13 13 DefaultTagset::DefaultTagset(const unsigned char* ptr, const CharsetConverter* charsetConverter)
14 14 : tags(),
15   - names(){
  15 + names(),
  16 + charsetConverter(charsetConverter) {
16 17 uint32_t fsaSize = readInt32Const(ptr + FSA_DATA_SIZE_OFFSET);
17 18 const unsigned char* currPtr = ptr + FSA_DATA_OFFSET + fsaSize + 4;
18 19 readTags(currPtr, this->tags);
... ... @@ -50,13 +51,18 @@ namespace morfeusz {
50 51  
51 52 // FIXME - probably should not convert whole tagset on every setCharsetConverter method invocation.
52 53 void DefaultTagset::setCharsetConverter(const CharsetConverter* charsetConverter) {
  54 +
53 55 for (unsigned int i = 0; i < tags.size(); i++) {
54   - tags[i] = charsetConverter->fromUTF8(tags[i]);
  56 + tags[i] = charsetConverter->fromUTF8(
  57 + this->charsetConverter->toUTF8(tags[i]));
55 58 }
56 59  
57 60 for (unsigned int j = 0; j < names.size(); j++) {
58   - names[j] = charsetConverter->fromUTF8(names[j]);
  61 + names[j] = charsetConverter->fromUTF8(
  62 + this->charsetConverter->toUTF8(names[j]));
59 63 }
  64 +
  65 + this->charsetConverter = charsetConverter;
60 66 }
61 67  
62 68 }
... ...
morfeusz/DefaultTagset.hpp
... ... @@ -41,6 +41,7 @@ namespace morfeusz {
41 41 private:
42 42 std::vector<std::string> tags;
43 43 std::vector<std::string> names;
  44 + const CharsetConverter* charsetConverter;
44 45 };
45 46  
46 47 }
... ...
morfeusz/c_api/ResultsManager.cpp
... ... @@ -7,6 +7,9 @@
7 7  
8 8 #include "ResultsManager.hpp"
9 9 #include "morfeusz2.h"
  10 +#include <iostream>
  11 +
  12 +using namespace std;
10 13  
11 14 namespace morfeusz {
12 15  
... ... @@ -42,6 +45,7 @@ namespace morfeusz {
42 45  
43 46 InterpMorf ResultsManager::convertOneResult(const MorphInterpretation& res) {
44 47 InterpMorf convertedRes;
  48 + cerr << res.toString(true) << endl;
45 49 convertedRes.p = res.getStartNode();
46 50 convertedRes.k = res.getEndNode();
47 51 convertedRes.forma = const_cast<char*>(res.getOrth().c_str());
... ...
morfeusz/charset/CharsetConverter.cpp
... ... @@ -121,8 +121,23 @@ string CharsetConverter::fromUTF8(const string&amp; input) const {
121 121 return res;
122 122 }
123 123  
  124 +string CharsetConverter::toUTF8(const string& input) const {
  125 + string res;
  126 + const char* currInput = input.c_str();
  127 + const char* inputEnd = input.c_str() + input.length();
  128 + while (currInput != inputEnd) {
  129 + uint32_t cp = this->next(currInput, inputEnd);
  130 + UTF8CharsetConverter::getInstance().append(cp, res);
  131 + }
  132 + return res;
  133 +}
  134 +
124 135 string UTF8CharsetConverter::fromUTF8(const string& input) const {
125 136 return input;
126 137 }
127 138  
  139 +string UTF8CharsetConverter::toUTF8(const string& input) const {
  140 + return input;
  141 +}
  142 +
128 143 }
... ...
morfeusz/charset/CharsetConverter.hpp
... ... @@ -21,6 +21,7 @@ public:
21 21 virtual uint32_t next(const char*& it, const char* end) const = 0;
22 22 virtual void append(uint32_t cp, std::string& result) const = 0;
23 23 virtual std::string fromUTF8(const std::string& input) const;
  24 + virtual std::string toUTF8(const std::string& input) const;
24 25  
25 26 std::string toString(const std::vector<uint32_t>& codepoints) const;
26 27  
... ... @@ -36,6 +37,7 @@ public:
36 37 uint32_t next(const char*& it, const char* end) const;
37 38 void append(uint32_t cp, std::string& result) const;
38 39 std::string fromUTF8(const std::string& input) const;
  40 + std::string toUTF8(const std::string& input) const;
39 41 private:
40 42 UTF8CharsetConverter();
41 43 UTF8CharsetConverter(const UTF8CharsetConverter&); // do not implement
... ...
morfeusz/morfeusz2_c.cpp
... ... @@ -2,6 +2,7 @@
2 2 #include <vector>
3 3 #include <string>
4 4 #include <cstdio>
  5 +#include <iostream>
5 6  
6 7 #include "morfeusz2_version.h"
7 8 #include "morfeusz2_c.h"
... ... @@ -12,31 +13,100 @@ using namespace std;
12 13 using namespace morfeusz;
13 14  
14 15 static Morfeusz* morfeuszInstance = Morfeusz::createInstance();
  16 +static vector<MorphInterpretation> results;
  17 +static ResultsManager resultsManager;
15 18  
16 19 extern "C" DLLIMPORT
17 20 char* morfeusz_about() {
18   - return const_cast<char*>(MORFEUSZ_VERSION);
  21 + return const_cast<char*> (MORFEUSZ_VERSION);
19 22 }
20 23  
21 24 extern "C" DLLIMPORT
22 25 InterpMorf* morfeusz_analyse(char *tekst) {
23   - static vector<MorphInterpretation> res;
24   - static ResultsManager resManager;
25   - res.clear();
26   - morfeuszInstance->analyze(tekst, res);
27   - return resManager.convertResults(res);
  26 + results.clear();
  27 + morfeuszInstance->analyze(string(tekst), results);
  28 + return resultsManager.convertResults(results);
  29 +}
  30 +
  31 +static inline int setEncodingOption(int value) {
  32 + switch (value) {
  33 + case MORFEUSZ_UTF_8:
  34 + morfeuszInstance->setCharset(UTF8);
  35 + return 1;
  36 + case MORFEUSZ_ISO8859_2:
  37 + morfeuszInstance->setCharset(ISO8859_2);
  38 + return 1;
  39 + case MORFEUSZ_CP1250:
  40 + morfeuszInstance->setCharset(CP1250);
  41 + return 1;
  42 + case MORFEUSZ_CP852:
  43 + morfeuszInstance->setCharset(CP852);
  44 + return 1;
  45 + default:
  46 + fprintf(stderr, "Wrong encoding option %d\n", value);
  47 + return 0;
  48 + }
  49 +}
  50 +
  51 +static inline int setWhitespaceOption(int value) {
  52 + switch (value) {
  53 + case MORFEUSZ_KEEP_WHITESPACE:
  54 + morfeuszInstance->setWhitespaceHandling(KEEP);
  55 + return 1;
  56 + case MORFEUSZ_APPEND_WHITESPACE:
  57 + morfeuszInstance->setWhitespaceHandling(APPEND);
  58 + return 1;
  59 + case MORFEUSZ_SKIP_WHITESPACE:
  60 + morfeuszInstance->setWhitespaceHandling(SKIP);
  61 + return 1;
  62 + default:
  63 + fprintf(stderr, "Wrong whitespace option %d\n", value);
  64 + return 0;
  65 + }
  66 +}
  67 +
  68 +static inline int setCaseOption(int value) {
  69 + switch (value) {
  70 + case MORFEUSZ_STRICT_CASE:
  71 + morfeuszInstance->setCaseHandling(STRICT);
  72 + return 1;
  73 + case MORFEUSZ_WEAK_CASE:
  74 + morfeuszInstance->setCaseHandling(WEAK);
  75 + return 1;
  76 + case MORFEUSZ_IGNORE_CASE:
  77 + morfeuszInstance->setCaseHandling(IGNORE);
  78 + return 1;
  79 + default:
  80 + fprintf(stderr, "Wrong case option %d\n", value);
  81 + return 0;
  82 + }
  83 +}
  84 +
  85 +static inline int setTokenNumberingOption(int value) {
  86 + switch (value) {
  87 + case MORFEUSZ_CONTINUOUS_TOKEN_NUMBERING:
  88 + morfeuszInstance->setTokenNumbering(CONTINUOUS);
  89 + return 1;
  90 + case MORFEUSZ_SEPARATE_TOKEN_NUMBERING:
  91 + morfeuszInstance->setTokenNumbering(SEPARATE);
  92 + return 1;
  93 + default:
  94 + fprintf(stderr, "Wrong case option %d\n", value);
  95 + return 0;
  96 + }
28 97 }
29 98  
30 99 extern "C" DLLIMPORT
31 100 int morfeusz_set_option(int option, int value) {
32   - static int morfeusz_option_whitespace = 0;
33 101 switch (option) {
34 102 case MORFOPT_ENCODING:
35   - break;
36   -// return EncodedPtr::set_encoding(value);
  103 + return setEncodingOption(value);
37 104 case MORFOPT_WHITESPACE:
38   - morfeusz_option_whitespace = value;
39   - return 1;
  105 + return setWhitespaceOption(value);
  106 + case MORFOPT_CASE:
  107 + return setCaseOption(value);
  108 + case MORFOPT_TOKEN_NUMBERING:
  109 + return setTokenNumberingOption(value);
40 110 default:
41 111 fprintf(stderr, "Wrong option %d\n", option);
42 112 return 0;
... ... @@ -44,4 +114,3 @@ int morfeusz_set_option(int option, int value) {
44 114 return 1;
45 115 }
46 116  
47   -
... ...
morfeusz/morfeusz2_c.h
... ... @@ -125,6 +125,34 @@ extern &quot;C&quot; {
125 125  
126 126 #define MORFEUSZ_SKIP_WHITESPACE 0
127 127 #define MORFEUSZ_KEEP_WHITESPACE 2
  128 +#define MORFEUSZ_APPEND_WHITESPACE 4
  129 +
  130 +
  131 + /* MORFOPT_CASE:
  132 +
  133 + MORFEUSZ_WEAK_CASE: interps not matching case are ignored unless there is no alternative
  134 + MORFEUSZ_STRICT_CASE: interps not matching case are marked as unrecognized (ign)
  135 + MORFEUSZ_IGNORE_CASE: interps not matching case are treated the same way as those that match case
  136 + */
  137 +
  138 +#define MORFOPT_CASE 3
  139 +
  140 +#define MORFEUSZ_WEAK_CASE 301
  141 +#define MORFEUSZ_STRICT_CASE 302
  142 +#define MORFEUSZ_IGNORE_CASE 303
  143 +
  144 +
  145 + /* MORFOPT_TOKEN_NUMBERING
  146 +
  147 + SEPARATE: after each invocation first token number is set to 0
  148 + CONTINUOUS: after each invocation first token number is set to the end of the one from previous invocation
  149 +
  150 + */
  151 +
  152 +#define MORFOPT_TOKEN_NUMBERING 4
  153 +
  154 +#define MORFEUSZ_SEPARATE_TOKEN_NUMBERING 401
  155 +#define MORFEUSZ_CONTINUOUS_TOKEN_NUMBERING 402
128 156  
129 157 #ifdef __cplusplus
130 158 } /* extern C */
... ...
nbproject/configurations.xml
... ... @@ -63,6 +63,10 @@
63 63 <in>test_recognize_dict.cpp</in>
64 64 <in>test_result_equals.cpp</in>
65 65 </df>
  66 + <df name="tests">
  67 + <in>test_c_api.cpp</in>
  68 + </df>
  69 + <in>DefaultTagset.cpp</in>
66 70 <in>Environment.cpp</in>
67 71 <in>InflexionGraph.cpp</in>
68 72 <in>Morfeusz.cpp</in>
... ... @@ -100,6 +104,16 @@
100 104 <itemPath>CMakeLists.txt</itemPath>
101 105 <itemPath>build/Makefile</itemPath>
102 106 </logicalFolder>
  107 + <logicalFolder name="TestFiles"
  108 + displayName="Test Files"
  109 + projectFiles="false"
  110 + kind="TEST_LOGICAL_FOLDER">
  111 + <logicalFolder name="f1"
  112 + displayName="New C++ Simple Test"
  113 + projectFiles="true"
  114 + kind="TEST">
  115 + </logicalFolder>
  116 + </logicalFolder>
103 117 </logicalFolder>
104 118 <sourceFolderFilter>^(nbproject)$</sourceFolderFilter>
105 119 <sourceRootList>
... ... @@ -115,8 +129,10 @@
115 129 <rebuildPropChanged>false</rebuildPropChanged>
116 130 </toolsSet>
117 131 <flagsDictionary>
118   - <element flagsID="0" commonFlags="-std=c++98 -O3"/>
119   - <element flagsID="1" commonFlags="-std=c++98 -O3 -fPIC"/>
  132 + <element flagsID="0" commonFlags="-std=c++98"/>
  133 + <element flagsID="1" commonFlags="-std=c++98 -O3"/>
  134 + <element flagsID="2" commonFlags="-std=c++98 -O3 -fPIC"/>
  135 + <element flagsID="3" commonFlags="-std=c++98 -fPIC"/>
120 136 </flagsDictionary>
121 137 <codeAssistance>
122 138 </codeAssistance>
... ... @@ -126,14 +142,11 @@
126 142 <buildCommand>${MAKE} -f Makefile</buildCommand>
127 143 <cleanCommand>${MAKE} -f Makefile clean</cleanCommand>
128 144 <executablePath>build/morfeusz/morfeusz_analyzer</executablePath>
129   - <ccTool flags="1">
  145 + <ccTool flags="2">
130 146 <incDir>
131 147 <pElem>build</pElem>
132 148 <pElem>morfeusz</pElem>
133 149 </incDir>
134   - <preprocessorList>
135   - <Elem>NDEBUG</Elem>
136   - </preprocessorList>
137 150 </ccTool>
138 151 </makeTool>
139 152 </makefileType>
... ... @@ -144,6 +157,7 @@
144 157 <pElem>build/fsa</pElem>
145 158 </incDir>
146 159 <preprocessorList>
  160 + <Elem>NDEBUG</Elem>
147 161 <Elem>_OPTIMIZE__=1</Elem>
148 162 <Elem>__PIC__=2</Elem>
149 163 <Elem>__pic__=2</Elem>
... ... @@ -162,6 +176,7 @@
162 176 <pElem>build/fsa</pElem>
163 177 </incDir>
164 178 <preprocessorList>
  179 + <Elem>NDEBUG</Elem>
165 180 <Elem>_OPTIMIZE__=1</Elem>
166 181 <Elem>__PIC__=2</Elem>
167 182 <Elem>__pic__=2</Elem>
... ... @@ -174,11 +189,15 @@
174 189 </ccTool>
175 190 </item>
176 191 <item path="build/morfeusz/default_fsa.cpp" ex="false" tool="1" flavor2="4">
  192 + <ccTool flags="2">
  193 + </ccTool>
177 194 </item>
178 195 <item path="build/morfeusz/default_synth_fsa.cpp"
179 196 ex="false"
180 197 tool="1"
181 198 flavor2="4">
  199 + <ccTool flags="2">
  200 + </ccTool>
182 201 </item>
183 202 <item path="build/morfeusz/java/swigJAVA.cpp" ex="false" tool="1" flavor2="4">
184 203 </item>
... ... @@ -210,7 +229,7 @@
210 229 ex="false"
211 230 tool="1"
212 231 flavor2="4">
213   - <ccTool flags="1">
  232 + <ccTool flags="2">
214 233 <incDir>
215 234 <pElem>build/morfeusz</pElem>
216 235 <pElem>build/fsa</pElem>
... ... @@ -259,19 +278,20 @@
259 278 ex="false"
260 279 tool="1"
261 280 flavor2="4">
262   - <ccTool flags="1">
  281 + <ccTool flags="3">
263 282 </ccTool>
264 283 </item>
265 284 <item path="build/morfeusz/wrappers/morfeuszPERL_wrap.cxx"
266 285 ex="false"
267 286 tool="1"
268 287 flavor2="4">
269   - <ccTool flags="1">
  288 + <ccTool flags="2">
270 289 <incDir>
271 290 <pElem>/usr/lib/perl/5.14/CORE</pElem>
272 291 <pElem>build/morfeusz/wrappers/perl</pElem>
273 292 </incDir>
274 293 <preprocessorList>
  294 + <Elem>NDEBUG</Elem>
275 295 <Elem>morfeusz_perl_EXPORTS</Elem>
276 296 </preprocessorList>
277 297 </ccTool>
... ... @@ -339,6 +359,7 @@
339 359 <folder path="0/cli">
340 360 <ccTool>
341 361 <preprocessorList>
  362 + <Elem>NDEBUG</Elem>
342 363 <Elem>libmorfeusz_EXPORTS</Elem>
343 364 </preprocessorList>
344 365 </ccTool>
... ... @@ -353,6 +374,7 @@
353 374 <folder path="0/fsa">
354 375 <ccTool>
355 376 <preprocessorList>
  377 + <Elem>NDEBUG</Elem>
356 378 <Elem>libmorfeusz_EXPORTS</Elem>
357 379 </preprocessorList>
358 380 </ccTool>
... ... @@ -360,10 +382,34 @@
360 382 <folder path="0/segrules">
361 383 <ccTool>
362 384 <preprocessorList>
  385 + <Elem>NDEBUG</Elem>
  386 + <Elem>libmorfeusz_EXPORTS</Elem>
  387 + </preprocessorList>
  388 + </ccTool>
  389 + </folder>
  390 + <folder path="0/test">
  391 + <ccTool>
  392 + <preprocessorList>
  393 + <Elem>NDEBUG</Elem>
363 394 <Elem>libmorfeusz_EXPORTS</Elem>
364 395 </preprocessorList>
365 396 </ccTool>
366 397 </folder>
  398 + <folder path="TestFiles/f1">
  399 + <cTool>
  400 + <incDir>
  401 + <pElem>.</pElem>
  402 + </incDir>
  403 + </cTool>
  404 + <ccTool>
  405 + <incDir>
  406 + <pElem>.</pElem>
  407 + </incDir>
  408 + </ccTool>
  409 + <linkerTool>
  410 + <output>${TESTDIR}/TestFiles/f1</output>
  411 + </linkerTool>
  412 + </folder>
367 413 <folder path="build/morfeusz/wrappers/java">
368 414 <ccTool>
369 415 <incDir>
... ... @@ -383,6 +429,7 @@
383 429 <pElem>/usr/lib/jvm/java-6-openjdk/include</pElem>
384 430 </incDir>
385 431 <preprocessorList>
  432 + <Elem>NDEBUG</Elem>
386 433 <Elem>_OPTIMIZE__=1</Elem>
387 434 <Elem>libjmorfeusz_EXPORTS</Elem>
388 435 <Elem>libmorfeusz_EXPORTS</Elem>
... ... @@ -395,6 +442,7 @@
395 442 <folder path="morfeusz">
396 443 <ccTool>
397 444 <preprocessorList>
  445 + <Elem>NDEBUG</Elem>
398 446 <Elem>libmorfeusz_EXPORTS</Elem>
399 447 </preprocessorList>
400 448 </ccTool>
... ... @@ -423,111 +471,118 @@
423 471 </ccTool>
424 472 </folder>
425 473 <item path="morfeusz/DefaultTagset.cpp" ex="false" tool="1" flavor2="4">
426   - <ccTool flags="1">
427   - <incDir>
428   - <pElem>build</pElem>
429   - <pElem>morfeusz</pElem>
430   - <pElem>build/morfeusz</pElem>
431   - </incDir>
  474 + <ccTool flags="3">
432 475 <preprocessorList>
433   - <Elem>NDEBUG</Elem>
434 476 <Elem>libmorfeusz_EXPORTS</Elem>
435 477 </preprocessorList>
436 478 </ccTool>
437 479 </item>
438 480 <item path="morfeusz/Environment.cpp" ex="false" tool="1" flavor2="4">
439   - <ccTool flags="1">
  481 + <ccTool flags="3">
440 482 <preprocessorList>
441 483 <Elem>libmorfeusz_EXPORTS</Elem>
442 484 </preprocessorList>
443 485 </ccTool>
444 486 </item>
445 487 <item path="morfeusz/InflexionGraph.cpp" ex="false" tool="1" flavor2="4">
446   - <ccTool flags="1">
  488 + <ccTool flags="2">
447 489 <preprocessorList>
  490 + <Elem>NDEBUG</Elem>
448 491 <Elem>libmorfeusz_EXPORTS</Elem>
449 492 </preprocessorList>
450 493 </ccTool>
451 494 </item>
452 495 <item path="morfeusz/Morfeusz.cpp" ex="false" tool="1" flavor2="4">
453   - <ccTool flags="1">
  496 + <ccTool flags="3">
454 497 <preprocessorList>
455 498 <Elem>libmorfeusz_EXPORTS</Elem>
456 499 </preprocessorList>
457 500 </ccTool>
458 501 </item>
459 502 <item path="morfeusz/MorfeuszInternal.cpp" ex="false" tool="1" flavor2="4">
460   - <ccTool flags="1">
  503 + <ccTool flags="3">
461 504 <preprocessorList>
462 505 <Elem>libmorfeusz_EXPORTS</Elem>
463 506 </preprocessorList>
464 507 </ccTool>
465 508 </item>
466 509 <item path="morfeusz/MorphInterpretation.cpp" ex="false" tool="1" flavor2="4">
467   - <ccTool flags="1">
  510 + <ccTool flags="3">
468 511 <preprocessorList>
469 512 <Elem>libmorfeusz_EXPORTS</Elem>
470 513 </preprocessorList>
471 514 </ccTool>
472 515 </item>
473 516 <item path="morfeusz/Qualifiers.cpp" ex="false" tool="1" flavor2="4">
474   - <ccTool flags="1">
  517 + <ccTool flags="2">
475 518 <preprocessorList>
  519 + <Elem>NDEBUG</Elem>
476 520 <Elem>libmorfeusz_EXPORTS</Elem>
477 521 </preprocessorList>
478 522 </ccTool>
479 523 </item>
480 524 <item path="morfeusz/ResultsIterator.cpp" ex="false" tool="1" flavor2="4">
481   - <ccTool flags="1">
  525 + <ccTool flags="2">
482 526 <preprocessorList>
  527 + <Elem>NDEBUG</Elem>
483 528 <Elem>libmorfeusz_EXPORTS</Elem>
484 529 </preprocessorList>
485 530 </ccTool>
486 531 </item>
487 532 <item path="morfeusz/c_api/ResultsManager.cpp" ex="false" tool="1" flavor2="4">
488   - <ccTool flags="1">
  533 + <ccTool flags="3">
489 534 </ccTool>
490 535 </item>
491 536 <item path="morfeusz/case/CaseConverter.cpp" ex="false" tool="1" flavor2="4">
492   - <ccTool flags="1">
  537 + <ccTool flags="2">
  538 + <preprocessorList>
  539 + <Elem>NDEBUG</Elem>
  540 + </preprocessorList>
493 541 </ccTool>
494 542 </item>
495 543 <item path="morfeusz/case/CasePatternHelper.cpp"
496 544 ex="false"
497 545 tool="1"
498 546 flavor2="4">
499   - <ccTool flags="1">
  547 + <ccTool flags="3">
500 548 </ccTool>
501 549 </item>
502 550 <item path="morfeusz/case/caseconv.cpp" ex="false" tool="1" flavor2="4">
503   - <ccTool flags="1">
  551 + <ccTool flags="2">
  552 + <preprocessorList>
  553 + <Elem>NDEBUG</Elem>
  554 + </preprocessorList>
504 555 </ccTool>
505 556 </item>
506 557 <item path="morfeusz/charset/CharsetConverter.cpp"
507 558 ex="false"
508 559 tool="1"
509 560 flavor2="4">
510   - <ccTool flags="1">
  561 + <ccTool flags="3">
511 562 </ccTool>
512 563 </item>
513 564 <item path="morfeusz/charset/TextReader.cpp" ex="false" tool="1" flavor2="4">
514   - <ccTool flags="1">
  565 + <ccTool flags="3">
515 566 </ccTool>
516 567 </item>
517 568 <item path="morfeusz/charset/conversion_tables.cpp"
518 569 ex="false"
519 570 tool="1"
520 571 flavor2="4">
521   - <ccTool flags="1">
  572 + <ccTool flags="2">
  573 + <preprocessorList>
  574 + <Elem>NDEBUG</Elem>
  575 + </preprocessorList>
522 576 </ccTool>
523 577 </item>
524 578 <item path="morfeusz/cli/cli.cpp" ex="false" tool="1" flavor2="4">
525   - <ccTool flags="1">
  579 + <ccTool flags="2">
526 580 </ccTool>
527 581 </item>
528 582 <item path="morfeusz/const.cpp" ex="false" tool="1" flavor2="4">
529   - <ccTool flags="1">
  583 + <ccTool flags="2">
530 584 <preprocessorList>
  585 + <Elem>NDEBUG</Elem>
531 586 <Elem>libmorfeusz_EXPORTS</Elem>
532 587 </preprocessorList>
533 588 </ccTool>
... ... @@ -536,75 +591,87 @@
536 591 ex="false"
537 592 tool="1"
538 593 flavor2="4">
539   - <ccTool flags="1">
  594 + <ccTool flags="2">
  595 + <preprocessorList>
  596 + <Elem>NDEBUG</Elem>
  597 + </preprocessorList>
540 598 </ccTool>
541 599 </item>
542 600 <item path="morfeusz/deserialization/MorphDeserializer.cpp"
543 601 ex="false"
544 602 tool="1"
545 603 flavor2="4">
546   - <ccTool flags="1">
  604 + <ccTool flags="2">
  605 + <preprocessorList>
  606 + <Elem>NDEBUG</Elem>
  607 + </preprocessorList>
547 608 </ccTool>
548 609 </item>
549 610 <item path="morfeusz/deserialization/morphInterps/InterpretedChunksDecoder.cpp"
550 611 ex="false"
551 612 tool="1"
552 613 flavor2="4">
553   - <ccTool flags="1">
  614 + <ccTool flags="3">
554 615 </ccTool>
555 616 </item>
556 617 <item path="morfeusz/deserialization/morphInterps/InterpretedChunksDecoder4Analyzer.cpp"
557 618 ex="false"
558 619 tool="1"
559 620 flavor2="4">
560   - <ccTool flags="1">
  621 + <ccTool flags="3">
561 622 </ccTool>
562 623 </item>
563 624 <item path="morfeusz/deserialization/morphInterps/InterpretedChunksDecoder4Generator.cpp"
564 625 ex="false"
565 626 tool="1"
566 627 flavor2="4">
567   - <ccTool flags="1">
  628 + <ccTool flags="3">
568 629 </ccTool>
569 630 </item>
570 631 <item path="morfeusz/fsa/const.cpp" ex="false" tool="1" flavor2="4">
571   - <ccTool flags="1">
  632 + <ccTool flags="2">
572 633 </ccTool>
573 634 </item>
574 635 <item path="morfeusz/morfeusz2_c.cpp" ex="false" tool="1" flavor2="4">
575   - <ccTool flags="1">
  636 + <ccTool flags="3">
576 637 <preprocessorList>
577 638 <Elem>libmorfeusz_EXPORTS</Elem>
578 639 </preprocessorList>
579 640 </ccTool>
580 641 </item>
581 642 <item path="morfeusz/morfeusz_analyzer.cpp" ex="false" tool="1" flavor2="4">
582   - <ccTool flags="0">
  643 + <ccTool flags="1">
  644 + <preprocessorList>
  645 + <Elem>NDEBUG</Elem>
  646 + </preprocessorList>
583 647 </ccTool>
584 648 </item>
585 649 <item path="morfeusz/morfeusz_generator.cpp" ex="false" tool="1" flavor2="4">
586   - <ccTool flags="0">
  650 + <ccTool flags="1">
  651 + <preprocessorList>
  652 + <Elem>NDEBUG</Elem>
  653 + </preprocessorList>
587 654 </ccTool>
588 655 </item>
589 656 <item path="morfeusz/segrules/SegrulesFSA.cpp" ex="false" tool="1" flavor2="4">
590   - <ccTool flags="1">
  657 + <ccTool flags="2">
591 658 </ccTool>
592 659 </item>
593 660 <item path="morfeusz/segrules/segrules.cpp" ex="false" tool="1" flavor2="4">
594   - <ccTool flags="1">
  661 + <ccTool flags="2">
595 662 </ccTool>
596 663 </item>
597 664 <item path="morfeusz/test/test_recognize_dict.cpp"
598 665 ex="false"
599 666 tool="1"
600 667 flavor2="4">
601   - <ccTool flags="0">
602   - </ccTool>
603 668 </item>
604 669 <item path="morfeusz/test/test_result_equals.cpp"
605 670 ex="false"
606 671 tool="1"
607 672 flavor2="4">
  673 + </item>
  674 + <item path="morfeusz/tests/test_c_api.cpp" ex="false" tool="1" flavor2="4">
608 675 <ccTool flags="0">
609 676 </ccTool>
610 677 </item>
... ...