Commit 349ab047e003235cc9c54a908143ea5a2dcaa3e7

Authored by Michał Lenart
1 parent 36667aad

obsługa opcji whitespaceHandling==APPEND + testy do niej

git-svn-id: svn://svn.nlp.ipipan.waw.pl/morfeusz/morfeusz@237 ff4e3ee1-f430-4e82-ade0-24591c43f1fd
morfeusz/ChunkBounds.hpp 0 → 100644
  1 +/*
  2 + * File: ChunkBounds.hpp
  3 + * Author: lennyn
  4 + *
  5 + * Created on June 27, 2014, 10:59 PM
  6 + */
  7 +
  8 +#ifndef CHUNKBOUNDS_HPP
  9 +#define CHUNKBOUNDS_HPP
  10 +
  11 +namespace morfeusz {
  12 +
  13 + struct ChunkBounds {
  14 + const char* chunkStartPtr;
  15 + const char* wordStartPtr;
  16 + const char* wordEndPtr;
  17 + const char* chunkEndPtr;
  18 + };
  19 +
  20 +}
  21 +
  22 +#endif /* CHUNKBOUNDS_HPP */
  23 +
... ...
morfeusz/InterpretedChunk.hpp
... ... @@ -35,6 +35,12 @@ struct InterpretedChunk {
35 35  
36 36 /**
37 37 * Pointer to end of this chunks text (exclusive)
  38 + * including preceding whitespaces if whitespace-handling set to APPEND
  39 + */
  40 + const char* chunkStartPtr;
  41 +
  42 + /**
  43 + * Pointer to end of this chunks text (exclusive)
38 44 * including following whitespaces if whitespace-handling set to APPEND
39 45 */
40 46 const char* chunkEndPtr;
... ...
morfeusz/MorfeuszInternal.cpp
... ... @@ -20,6 +20,7 @@
20 20 #include "segrules/segrules.hpp"
21 21 #include "const.hpp"
22 22 #include "charset/utf8.h"
  23 +#include "ChunkBounds.hpp"
23 24  
24 25 // TODO - konstruktor kopiujący działający Tak-Jak-Trzeba
25 26  
... ... @@ -148,28 +149,44 @@ namespace morfeusz {
148 149 TextReader& reader,
149 150 int startNodeNum,
150 151 std::vector<MorphInterpretation>& results) const {
151   -
152   - if (env.getProcessorType() == ANALYZER
153   - && options.whitespaceHandling == KEEP) {
154   - if (reader.isAtWhitespace() && !reader.isAtEnd()) {
155   - processWhitespacesChunk(reader, startNodeNum, results);
156   - return true;
  152 + if (env.getProcessorType() == ANALYZER) {
  153 + switch (options.whitespaceHandling) {
  154 + case KEEP:
  155 + {
  156 + bool res = reader.isAtWhitespace() && !reader.isAtEnd();
  157 + if (res) {
  158 + processWhitespacesChunk(reader, startNodeNum, results);
  159 + }
  160 + reader.markChunkStartsHere();
  161 + reader.markWordStartsHere();
  162 + return res;
  163 + }
  164 + case APPEND:
  165 + reader.markChunkStartsHere();
  166 + reader.skipWhitespaces();
  167 + reader.markWordStartsHere();
  168 + return false;
  169 + case SKIP:
  170 + reader.skipWhitespaces();
  171 + reader.markChunkStartsHere();
  172 + reader.markWordStartsHere();
  173 + return false;
  174 + default:
  175 + break;
157 176 }
158 177 }
159   - else {
160   - reader.skipWhitespaces();
161   - }
  178 +
162 179 return false;
163 180 }
164 181  
165   - void MorfeuszInternal::handleWhitespacesAtEnd(
  182 + const char* MorfeuszInternal::handleWhitespacesAtEnd(
166 183 const Environment& env,
167 184 TextReader& reader) const {
168   -
169 185 if (env.getProcessorType() == ANALYZER
170 186 && options.whitespaceHandling == APPEND) {
171 187 reader.skipWhitespaces();
172 188 }
  189 + return reader.getCurrPtr();
173 190 }
174 191  
175 192 void MorfeuszInternal::processOneWord(
... ... @@ -178,7 +195,6 @@ namespace morfeusz {
178 195 int startNodeNum,
179 196 vector<MorphInterpretation>& results,
180 197 bool insideIgnHandler) const {
181   -
182 198 if (handleWhitespacesAtBeginning(env, reader, startNodeNum, results)) {
183 199 startNodeNum = results.back().getEndNode();
184 200 }
... ... @@ -192,15 +208,17 @@ namespace morfeusz {
192 208  
193 209 const SegrulesFSA& segrulesFSA = env.getCurrentSegrulesFSA();
194 210  
195   - reader.markWordStartsHere();
196 211 doProcessOneWord(env, reader, segrulesFSA.initialState);
197 212  
198 213 while (reader.isInsideAWord()) {
199 214 reader.next();
200 215 }
201   -
202   - const char* endOfWordPtr = reader.getCurrPtr();
203   - handleWhitespacesAtEnd(env, reader);
  216 +
  217 + ChunkBounds chunkBounds;
  218 + chunkBounds.chunkStartPtr = reader.getChunkStartPtr();
  219 + chunkBounds.wordStartPtr = reader.getWordStartPtr();
  220 + chunkBounds.wordEndPtr = reader.getCurrPtr();
  221 + chunkBounds.chunkEndPtr = handleWhitespacesAtEnd(env, reader);
204 222  
205 223 if (!graph.empty()) {
206 224 const InterpretedChunksDecoder& interpretedChunksDecoder = env.getInterpretedChunksDecoder();
... ... @@ -213,23 +231,27 @@ namespace morfeusz {
213 231 const InflexionGraph::Edge& e = edges[j];
214 232 unsigned int targetNode = startNodeNum + e.nextNode;
215 233 InterpretedChunk ic = e.chunk;
216   - ic.chunkEndPtr = (ic.textEndPtr == endOfWordPtr)
217   - ? reader.getCurrPtr()
  234 + ic.chunkStartPtr =
  235 + ic.textStartPtr == reader.getWordStartPtr()
  236 + ? reader.getChunkStartPtr()
  237 + : ic.textStartPtr;
  238 + ic.chunkEndPtr = (ic.textEndPtr == chunkBounds.wordEndPtr)
  239 + ? chunkBounds.wordEndPtr
218 240 : ic.textEndPtr;
219 241 interpretedChunksDecoder.decode(srcNode, targetNode, ic, results);
220 242 }
221 243 srcNode++;
222 244 }
223 245 if (results.size() == initialResultsSize) {
224   - this->appendIgnotiumToResults(env, string(reader.getWordStartPtr(), reader.getCurrPtr()), startNodeNum, results);
  246 + this->appendIgnotiumToResults(env, chunkBounds, startNodeNum, results);
225 247 }
226 248 }
227 249 else if (env.getProcessorType() == ANALYZER
228 250 && !insideIgnHandler) {
229   - this->handleIgnChunk(env, reader.getWordStartPtr(), reader.getCurrPtr(), startNodeNum, results);
  251 + this->handleIgnChunk(env, chunkBounds, startNodeNum, results);
230 252 }
231 253 else {
232   - this->appendIgnotiumToResults(env, string(reader.getWordStartPtr(), reader.getCurrPtr()), startNodeNum, results);
  254 + this->appendIgnotiumToResults(env, chunkBounds, startNodeNum, results);
233 255 }
234 256 }
235 257  
... ... @@ -345,39 +367,48 @@ namespace morfeusz {
345 367  
346 368 void MorfeuszInternal::handleIgnChunk(
347 369 const Environment& env,
348   - const char* inputStart,
349   - const char* inputEnd,
  370 + const ChunkBounds& chunkBounds,
350 371 int startNodeNum,
351 372 std::vector<MorphInterpretation>& results) const {
352   - const char* currInput = inputStart;
  373 + const char* currInput = chunkBounds.chunkStartPtr;
353 374 const char* prevInput;
354 375 uint32_t codepoint = 0x00;
355 376 bool separatorFound = false;
356   - while (currInput != inputEnd) {
  377 + while (currInput != chunkBounds.chunkEndPtr) {
357 378 prevInput = currInput;
358 379 const char* nonSeparatorInputEnd = prevInput;
359 380 do {
360   - codepoint = env.getCharsetConverter().next(currInput, inputEnd);
  381 + codepoint = env.getCharsetConverter().next(currInput, chunkBounds.chunkEndPtr);
361 382 if (!env.isSeparator(codepoint)) {
362 383 nonSeparatorInputEnd = currInput;
363 384 }
364 385 }
365   - while (currInput != inputEnd && !env.isSeparator(codepoint));
  386 + while (currInput != chunkBounds.chunkEndPtr && !env.isSeparator(codepoint));
366 387  
367 388 if (env.isSeparator(codepoint)) {
368 389 separatorFound = true;
369 390 if (nonSeparatorInputEnd != prevInput) {
  391 + // there are non-separators + separators
370 392  
371 393 int startNode = results.empty() ? startNodeNum : results.back().getEndNode();
  394 + // process part before separators
372 395 TextReader newReader1(prevInput, nonSeparatorInputEnd, env);
373 396 notMatchingCaseSegs = 0;
374 397 this->processOneWord(env, newReader1, startNode, results, true);
375 398  
  399 + // process separators part
  400 + if (currInput == chunkBounds.wordEndPtr) {
  401 + currInput = chunkBounds.chunkEndPtr;
  402 + }
376 403 startNode = results.empty() ? startNodeNum : results.back().getEndNode();
377 404 TextReader newReader2(nonSeparatorInputEnd, currInput, env);
378 405 this->processOneWord(env, newReader2, startNode, results, true);
379 406 }
380 407 else {
  408 + // there are only separators
  409 + if (currInput == chunkBounds.wordEndPtr) {
  410 + currInput = chunkBounds.chunkEndPtr;
  411 + }
381 412 int startNode = results.empty() ? startNodeNum : results.back().getEndNode();
382 413 TextReader newReader3(prevInput, currInput, env);
383 414 notMatchingCaseSegs = 0;
... ... @@ -386,25 +417,28 @@ namespace morfeusz {
386 417 }
387 418 }
388 419  
389   - // currInput == inputEnd
  420 + // currInput == chunkBounds.chunkEndPtr
390 421 if (!env.isSeparator(codepoint)) {
391 422 if (separatorFound) {
  423 + // process part after separators
392 424 int startNode = results.empty() ? startNodeNum : results.back().getEndNode();
393   - TextReader newReader4(prevInput, inputEnd, env);
  425 + TextReader newReader4(prevInput, chunkBounds.chunkEndPtr, env);
394 426 this->processOneWord(env, newReader4, startNode, results, true);
395 427 }
396 428 else {
397   - this->appendIgnotiumToResults(env, string(inputStart, inputEnd), startNodeNum, results);
  429 + this->appendIgnotiumToResults(env, chunkBounds, startNodeNum, results);
398 430 }
399 431 }
400 432 }
401 433  
402 434 void MorfeuszInternal::appendIgnotiumToResults(
403 435 const Environment& env,
404   - const string& word,
  436 + const ChunkBounds& chunkBounds,
405 437 int startNodeNum,
406 438 std::vector<MorphInterpretation>& results) const {
407   - MorphInterpretation interp(MorphInterpretation::createIgn(startNodeNum, startNodeNum + 1, word, env.getTagset()));
  439 + string orth(chunkBounds.chunkStartPtr, chunkBounds.chunkEndPtr);
  440 + string lemma(chunkBounds.wordStartPtr, chunkBounds.wordEndPtr);
  441 + MorphInterpretation interp(MorphInterpretation::createIgn(startNodeNum, startNodeNum + 1, orth, lemma, env.getTagset()));
408 442 results.push_back(interp);
409 443 }
410 444  
... ... @@ -416,7 +450,7 @@ namespace morfeusz {
416 450 nextNodeNum = results.back().getEndNode();
417 451 }
418 452 }
419   -
  453 +
420 454 void MorfeuszInternal::adjustTokensCounter() const {
421 455 if (options.tokenNumbering == SEPARATE) {
422 456 nextNodeNum = 0;
... ... @@ -429,7 +463,7 @@ namespace morfeusz {
429 463 strcpy(textCopy, text.c_str());
430 464 return new ResultsIteratorImpl(*this, textCopy, textCopy + text.length(), true);
431 465 }
432   -
  466 +
433 467 ResultsIterator* MorfeuszInternal::analyze(const char* text) const {
434 468 adjustTokensCounter();
435 469 return new ResultsIteratorImpl(*this, text, text + strlen(text), false);
... ...
morfeusz/MorfeuszInternal.hpp
... ... @@ -17,6 +17,7 @@
17 17 #include "morfeusz2.h"
18 18  
19 19 #include "fsa/fsa.hpp"
  20 +#include "ChunkBounds.hpp"
20 21 #include "InterpsGroup.hpp"
21 22 #include "case/CaseConverter.hpp"
22 23 #include "charset/CharsetConverter.hpp"
... ... @@ -153,21 +154,21 @@ namespace morfeusz {
153 154 *
154 155 * @param env
155 156 * @param reader
  157 + * @return pointer to chunk end (possibly after some whitespaces)
156 158 */
157   - void handleWhitespacesAtEnd(
  159 + const char* handleWhitespacesAtEnd(
158 160 const Environment& env,
159 161 TextReader& reader) const;
160 162  
161 163 void handleIgnChunk(
162 164 const Environment& env,
163   - const char* inputStart,
164   - const char* inputEnd,
  165 + const ChunkBounds& chunkBounds,
165 166 int startNodeNum,
166 167 std::vector<MorphInterpretation>& results) const;
167 168  
168 169 void appendIgnotiumToResults(
169 170 const Environment& env,
170   - const std::string& word,
  171 + const ChunkBounds& chunkBounds,
171 172 int startNodeNum,
172 173 std::vector<MorphInterpretation>& results) const;
173 174  
... ...
morfeusz/MorphInterpretation.cpp
... ... @@ -51,8 +51,8 @@ namespace morfeusz {
51 51  
52 52 }
53 53  
54   - MorphInterpretation MorphInterpretation::createIgn(int startNode, int endNode, const std::string& orth, const Tagset<string>& tagset) {
55   - MorphInterpretation mi(startNode, endNode, orth, orth, 0, 0, &emptyQualifiers, &tagset);
  54 + MorphInterpretation MorphInterpretation::createIgn(int startNode, int endNode, const std::string& orth, const std::string& lemma, const Tagset<string>& tagset) {
  55 + MorphInterpretation mi(startNode, endNode, orth, lemma, 0, 0, &emptyQualifiers, &tagset);
56 56 return mi;
57 57 }
58 58  
... ...
morfeusz/charset/TextReader.cpp
... ... @@ -17,6 +17,7 @@ namespace morfeusz {
17 17 const char* inputEnd,
18 18 const Environment& env)
19 19 : codepointsNum(0),
  20 + chunkStartPtr(inputStart),
20 21 wordStartPtr(inputStart),
21 22 currPtr(inputStart),
22 23 inputEnd(inputEnd),
... ... @@ -31,6 +32,7 @@ namespace morfeusz {
31 32  
32 33 TextReader::TextReader(const std::string& text, const Environment& env)
33 34 : codepointsNum(0),
  35 + chunkStartPtr(text.c_str()),
34 36 wordStartPtr(text.c_str()),
35 37 currPtr(text.c_str()),
36 38 inputEnd(text.c_str() + text.length()),
... ... @@ -41,17 +43,25 @@ namespace morfeusz {
41 43 thePeek(0x00),
42 44 theNormalizedPeek(0x00),
43 45 ptrAfterThePeek(NULL) {
44   -
  46 +
45 47 }
46 48  
47 49 void TextReader::markWordStartsHere() {
48 50 codepointsNum = 0;
49 51 wordStartPtr = currPtr;
50 52 }
  53 +
  54 + void TextReader::markChunkStartsHere() {
  55 + chunkStartPtr = currPtr;
  56 + }
51 57  
52 58 const char* TextReader::getWordStartPtr() const {
53 59 return wordStartPtr;
54 60 }
  61 +
  62 + const char* TextReader::getChunkStartPtr() const {
  63 + return chunkStartPtr;
  64 + }
55 65  
56 66 const char* TextReader::getCurrPtr() const {
57 67 return currPtr;
... ... @@ -148,7 +158,7 @@ namespace morfeusz {
148 158 }
149 159  
150 160 TextReader::~TextReader() {
151   -
  161 +
152 162 }
153 163  
154 164 }
... ...
morfeusz/charset/TextReader.hpp
... ... @@ -17,8 +17,10 @@ class TextReader {
17 17 public:
18 18 TextReader(const char* inputStart, const char* inputEnd, const Environment& env);
19 19 TextReader(const std::string& text, const Environment& env);
  20 + void markChunkStartsHere();
20 21 void markWordStartsHere();
21 22 const char* getWordStartPtr() const;
  23 + const char* getChunkStartPtr() const;
22 24 const char* getCurrPtr() const;
23 25 const char* getNextPtr();
24 26 const char* getEndPtr() const;
... ... @@ -35,6 +37,7 @@ public:
35 37 virtual ~TextReader();
36 38 private:
37 39 int codepointsNum;
  40 + const char* chunkStartPtr;
38 41 const char* wordStartPtr;
39 42 const char* currPtr;
40 43 const char* inputEnd;
... ...
morfeusz/deserialization/morphInterps/InterpretedChunksDecoder4Analyzer.cpp
... ... @@ -23,7 +23,7 @@ void InterpretedChunksDecoder4Analyzer::decode(
23 23 string orth;
24 24 string lemma4Prefixes;
25 25 if (tryToGetLemma4Prefixes(interpretedChunk, lemma4Prefixes)) {
26   - orth.insert(orth.end(), interpretedChunk.textStartPtr, interpretedChunk.chunkEndPtr);
  26 + orth.insert(orth.end(), interpretedChunk.chunkStartPtr, interpretedChunk.chunkEndPtr);
27 27 const unsigned char* currPtr = getInterpretationsPtr(interpretedChunk.interpsGroupPtr);
28 28 while (currPtr < interpretedChunk.interpsEndPtr) {
29 29 DecodeMorphInterpParams params = {startNode, endNode, orth, lemma4Prefixes, interpretedChunk};
... ...
morfeusz/morfeusz2.h
... ... @@ -321,7 +321,10 @@ namespace morfeusz {
321 321 /**
322 322 * Creates new instance with "ign" tag (meaning: "not found in the dictionary")
323 323 */
324   - static MorphInterpretation createIgn(int startNode, int endNode, const std::string& orth, const Tagset<std::string>& tagset);
  324 + static MorphInterpretation createIgn(
  325 + int startNode, int endNode,
  326 + const std::string& orth, const std::string& lemma,
  327 + const Tagset<std::string>& tagset);
325 328  
326 329 /**
327 330 * Creates new instance with "sp" tag (meaning: "this is a sequence of whitespaces")
... ...
morfeusz/tests/TestCAPI.cpp
... ... @@ -7,6 +7,7 @@
7 7  
8 8 #include "TestCAPI.hpp"
9 9 #include <string>
  10 +#include <iostream>
10 11 #include "morfeusz2_c.h"
11 12  
12 13 using namespace std;
... ... @@ -27,6 +28,8 @@ void TestCAPI::tearDown() {
27 28 }
28 29  
29 30 void TestCAPI::testTwoSimpleInvocations() {
  31 + cerr << "testTwoSimpleInvocations" << endl;
  32 +
30 33 char* text = const_cast<char*> (string("AAaaBBbbCCcc DDDD.").c_str());
31 34 InterpMorf* results = morfeusz_analyse(text);
32 35 CPPUNIT_ASSERT_EQUAL(0, results[0].p);
... ... @@ -60,6 +63,8 @@ void TestCAPI::testTwoSimpleInvocations() {
60 63 }
61 64  
62 65 void TestCAPI::testWhitespaceKEEP() {
  66 + cerr << "testWhitespaceKEEP" << endl;
  67 +
63 68  
64 69 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_WHITESPACE, MORFEUSZ_KEEP_WHITESPACE));
65 70  
... ... @@ -87,6 +92,8 @@ void TestCAPI::testWhitespaceKEEP() {
87 92 }
88 93  
89 94 void TestCAPI::testWhitespaceAPPEND() {
  95 + cerr << "testWhitespaceAPPEND" << endl;
  96 +
90 97 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_WHITESPACE, MORFEUSZ_APPEND_WHITESPACE));
91 98  
92 99 char* text = const_cast<char*> (string("AAaaBBbbCCcc .").c_str());
... ... @@ -94,7 +101,7 @@ void TestCAPI::testWhitespaceAPPEND() {
94 101 CPPUNIT_ASSERT_EQUAL(0, results[0].p);
95 102 CPPUNIT_ASSERT_EQUAL(1, results[0].k);
96 103 CPPUNIT_ASSERT_EQUAL(string("AAaaBBbbCCcc "), string(results[0].forma));
97   - CPPUNIT_ASSERT_EQUAL(string("AAaaBBbbCCcc "), string(results[0].haslo));
  104 + CPPUNIT_ASSERT_EQUAL(string("AAaaBBbbCCcc"), string(results[0].haslo));
98 105 CPPUNIT_ASSERT_EQUAL(string("ign"), string(results[0].interp));
99 106  
100 107 CPPUNIT_ASSERT_EQUAL(1, results[1].p);
... ... @@ -107,6 +114,8 @@ void TestCAPI::testWhitespaceAPPEND() {
107 114 }
108 115  
109 116 void TestCAPI::testEncodingUTF8() {
  117 + cerr << "testEncodingUTF8" << endl;
  118 +
110 119 unsigned char text[] = {'z', 'a', /* ż */ 197, 188, /* ó */ 195, 179, '\0'};
111 120 char* actualText = (char*) text;
112 121 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_ENCODING, MORFEUSZ_CP1250));
... ... @@ -120,6 +129,8 @@ void TestCAPI::testEncodingUTF8() {
120 129 }
121 130  
122 131 void TestCAPI::testTokenNumberingCONTINUOUS() {
  132 + cerr << "testTokenNumberingCONTINUOUS" << endl;
  133 +
123 134  
124 135 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_WHITESPACE, MORFEUSZ_SKIP_WHITESPACE));
125 136 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_TOKEN_NUMBERING, MORFEUSZ_CONTINUOUS_TOKEN_NUMBERING));
... ... @@ -148,30 +159,44 @@ void TestCAPI::testTokenNumberingCONTINUOUS() {
148 159 }
149 160  
150 161 void TestCAPI::testEncodingISO8859_2() {
  162 + cerr << "testEncodingISO8859_2" << endl;
  163 +
151 164 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_ENCODING, MORFEUSZ_ISO8859_2));
152 165 }
153 166  
154 167 void TestCAPI::testEncodingCP1250() {
  168 + cerr << "testEncodingCP1250" << endl;
  169 +
155 170 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_ENCODING, MORFEUSZ_CP1250));
156 171 }
157 172  
158 173 void TestCAPI::testEncodingCP852() {
  174 + cerr << "testEncodingCP852" << endl;
  175 +
159 176 CPPUNIT_ASSERT_EQUAL(1, morfeusz_set_option(MORFOPT_ENCODING, MORFEUSZ_CP852));
160 177 }
161 178  
162 179 void TestCAPI::testWrongWhitespaceOption() {
  180 + cerr << "testWrongWhitespaceOption" << endl;
  181 +
163 182 CPPUNIT_ASSERT_EQUAL(0, morfeusz_set_option(MORFOPT_WHITESPACE, 666777));
164 183 }
165 184  
166 185 void TestCAPI::testWrongEncodingOption() {
  186 + cerr << "testWrongEncodingOption" << endl;
  187 +
167 188 CPPUNIT_ASSERT_EQUAL(0, morfeusz_set_option(MORFOPT_ENCODING, 666777));
168 189 }
169 190  
170 191 void TestCAPI::testWrongCaseOption() {
  192 + cerr << "testWrongCaseOption" << endl;
  193 +
171 194 CPPUNIT_ASSERT_EQUAL(0, morfeusz_set_option(MORFOPT_CASE, 666777));
172 195 }
173 196  
174 197 void TestCAPI::testWrongTokenNumberingOption() {
  198 + cerr << "testWrongTokenNumberingOption" << endl;
  199 +
175 200 CPPUNIT_ASSERT_EQUAL(0, morfeusz_set_option(MORFOPT_TOKEN_NUMBERING, 666777));
176 201 }
177 202  
... ...
morfeusz/tests/TestMorfeusz.cpp
... ... @@ -31,6 +31,7 @@ void TestMorfeusz::tearDown() {
31 31 }
32 32  
33 33 void TestMorfeusz::testAnalyzeIterate1() {
  34 + cerr << "testAnalyzeIterate1" << endl;
34 35 ResultsIterator* it = morfeusz->analyze("AAAAbbbbCCCC");
35 36 CPPUNIT_ASSERT(it->hasNext());
36 37 CPPUNIT_ASSERT_EQUAL(string("AAAAbbbbCCCC"), it->peek().getOrth());
... ... @@ -41,7 +42,57 @@ void TestMorfeusz::testAnalyzeIterate1() {
41 42 delete it;
42 43 }
43 44  
  45 +void TestMorfeusz::testAnalyzeIterateWithWhitespaceHandlingKEEP() {
  46 + cerr << "testAnalyzeIterateWithWhitespaceHandlingKEEP" << endl;
  47 + morfeusz->setWhitespaceHandling(KEEP);
  48 + ResultsIterator* it = morfeusz->analyze(" AAAAbbbbCCCC DDDDeeee.\t");
  49 +
  50 + CPPUNIT_ASSERT(it->hasNext());
  51 + CPPUNIT_ASSERT_EQUAL(string(" "), it->next().getOrth());
  52 +
  53 + CPPUNIT_ASSERT(it->hasNext());
  54 + CPPUNIT_ASSERT_EQUAL(string("AAAAbbbbCCCC"), it->next().getOrth());
  55 +
  56 + CPPUNIT_ASSERT(it->hasNext());
  57 + CPPUNIT_ASSERT_EQUAL(string(" "), it->next().getOrth());
  58 +
  59 + CPPUNIT_ASSERT(it->hasNext());
  60 + CPPUNIT_ASSERT_EQUAL(string("DDDDeeee"), it->next().getOrth());
  61 +
  62 + CPPUNIT_ASSERT(it->hasNext());
  63 + CPPUNIT_ASSERT_EQUAL(string("."), it->next().getOrth());
  64 +
  65 + CPPUNIT_ASSERT(it->hasNext());
  66 + CPPUNIT_ASSERT_EQUAL(string("\t"), it->next().getOrth());
  67 +
  68 + CPPUNIT_ASSERT(!it->hasNext());
  69 + CPPUNIT_ASSERT_THROW(it->peek(), MorfeuszException);
  70 + CPPUNIT_ASSERT_THROW(it->next(), MorfeuszException);
  71 + delete it;
  72 +}
  73 +
  74 +void TestMorfeusz::testAnalyzeIterateWithWhitespaceHandlingAPPEND() {
  75 + cerr << "testAnalyzeIterateWithWhitespaceHandlingAPPEND" << endl;
  76 + morfeusz->setWhitespaceHandling(APPEND);
  77 + ResultsIterator* it = morfeusz->analyze(" AAAAbbbbCCCC DDDDeeee.\t");
  78 +
  79 + CPPUNIT_ASSERT(it->hasNext());
  80 + CPPUNIT_ASSERT_EQUAL(string(" AAAAbbbbCCCC "), it->next().getOrth());
  81 +
  82 + CPPUNIT_ASSERT(it->hasNext());
  83 + CPPUNIT_ASSERT_EQUAL(string("DDDDeeee"), it->next().getOrth());
  84 +
  85 + CPPUNIT_ASSERT(it->hasNext());
  86 + CPPUNIT_ASSERT_EQUAL(string(".\t"), it->next().getOrth());
  87 +
  88 + CPPUNIT_ASSERT(!it->hasNext());
  89 + CPPUNIT_ASSERT_THROW(it->peek(), MorfeuszException);
  90 + CPPUNIT_ASSERT_THROW(it->next(), MorfeuszException);
  91 + delete it;
  92 +}
  93 +
44 94 void TestMorfeusz::testAnalyzeVector1() {
  95 + cerr << "testAnalyzeVector1" << endl;
45 96 vector<MorphInterpretation> res;
46 97 morfeusz->analyze("AAAAbbbbCCCC", res);
47 98 CPPUNIT_ASSERT_EQUAL((size_t) 1, res.size());
... ... @@ -59,27 +110,60 @@ static inline string prepareErrorneusTmpFile() {
59 110 }
60 111  
61 112 void TestMorfeusz::testOpenInvalidFile() {
  113 + cerr << "testOpenInvalidFile" << endl;
62 114 string filename(prepareErrorneusTmpFile());
63 115 CPPUNIT_ASSERT_THROW(morfeusz->setAnalyzerDictionary(filename), FileFormatException);
64 116 }
65 117  
66 118 void TestMorfeusz::testOpenNonExistentFile() {
  119 + cerr << "testOpenNonExistentFile" << endl;
67 120 string filename(tmpnam(NULL));
68 121 CPPUNIT_ASSERT_THROW(morfeusz->setAnalyzerDictionary(filename), std::ios_base::failure);
69 122 }
70 123  
71 124 void TestMorfeusz::testSetInvalidAgglOption() {
  125 + cerr << "testSetInvalidAgglOption" << endl;
72 126 CPPUNIT_ASSERT_THROW(morfeusz->setAggl("asdfasdfa"), MorfeuszException);
73 127 }
74 128  
75 129 void TestMorfeusz::testSetInvalidPraetOption() {
  130 + cerr << "testSetInvalidPraetOption" << endl;
76 131 CPPUNIT_ASSERT_THROW(morfeusz->setPraet("asdfasdfa"), MorfeuszException);
77 132 }
78 133  
79 134 void TestMorfeusz::testWhitespaceHandlingKEEP() {
80   -
  135 + cerr << "testWhitespaceHandlingKEEP" << endl;
  136 + vector<MorphInterpretation> res;
  137 + morfeusz->setWhitespaceHandling(KEEP);
  138 + morfeusz->analyze(" AAAAbbbbCCCC DDDDeeee\t", res);
  139 + CPPUNIT_ASSERT_EQUAL((size_t) 5, res.size());
  140 + CPPUNIT_ASSERT_EQUAL(string(" "), res[0].getOrth());
  141 + CPPUNIT_ASSERT_EQUAL(string(" "), res[0].getLemma());
  142 + CPPUNIT_ASSERT_EQUAL(1, res[0].getTagnum());
  143 + CPPUNIT_ASSERT_EQUAL(string("AAAAbbbbCCCC"), res[1].getOrth());
  144 + CPPUNIT_ASSERT_EQUAL(string("AAAAbbbbCCCC"), res[1].getLemma());
  145 + CPPUNIT_ASSERT_EQUAL(0, res[1].getTagnum());
  146 + CPPUNIT_ASSERT_EQUAL(string(" "), res[2].getOrth());
  147 + CPPUNIT_ASSERT_EQUAL(string(" "), res[2].getLemma());
  148 + CPPUNIT_ASSERT_EQUAL(1, res[2].getTagnum());
  149 + CPPUNIT_ASSERT_EQUAL(string("DDDDeeee"), res[3].getOrth());
  150 + CPPUNIT_ASSERT_EQUAL(string("DDDDeeee"), res[3].getLemma());
  151 + CPPUNIT_ASSERT_EQUAL(0, res[3].getTagnum());
  152 + CPPUNIT_ASSERT_EQUAL(string("\t"), res[4].getOrth());
  153 + CPPUNIT_ASSERT_EQUAL(string("\t"), res[4].getLemma());
  154 + CPPUNIT_ASSERT_EQUAL(1, res[4].getTagnum());
81 155 }
82 156  
83 157 void TestMorfeusz::testWhitespaceHandlingAPPEND() {
84   -
  158 + cerr << "testWhitespaceHandlingAPPEND" << endl;
  159 + vector<MorphInterpretation> res;
  160 + morfeusz->setWhitespaceHandling(APPEND);
  161 + morfeusz->analyze(" AAAAbbbbCCCC DDDDeeee\t", res);
  162 + CPPUNIT_ASSERT_EQUAL((size_t) 2, res.size());
  163 + CPPUNIT_ASSERT_EQUAL(string(" AAAAbbbbCCCC "), res[0].getOrth());
  164 + CPPUNIT_ASSERT_EQUAL(string("AAAAbbbbCCCC"), res[0].getLemma());
  165 + CPPUNIT_ASSERT_EQUAL(0, res[0].getTagnum());
  166 + CPPUNIT_ASSERT_EQUAL(string("DDDDeeee\t"), res[1].getOrth());
  167 + CPPUNIT_ASSERT_EQUAL(string("DDDDeeee"), res[1].getLemma());
  168 + CPPUNIT_ASSERT_EQUAL(0, res[1].getTagnum());
85 169 }
... ...
morfeusz/tests/TestMorfeusz.hpp
... ... @@ -16,6 +16,8 @@ class TestMorfeusz : public CPPUNIT_NS::TestFixture {
16 16 CPPUNIT_TEST_SUITE(TestMorfeusz);
17 17  
18 18 CPPUNIT_TEST(testAnalyzeIterate1);
  19 + CPPUNIT_TEST(testAnalyzeIterateWithWhitespaceHandlingKEEP);
  20 + CPPUNIT_TEST(testAnalyzeIterateWithWhitespaceHandlingAPPEND);
19 21 CPPUNIT_TEST(testAnalyzeVector1);
20 22 CPPUNIT_TEST(testOpenInvalidFile);
21 23 CPPUNIT_TEST(testOpenNonExistentFile);
... ... @@ -34,6 +36,8 @@ public:
34 36  
35 37 private:
36 38 void testAnalyzeIterate1();
  39 + void testAnalyzeIterateWithWhitespaceHandlingKEEP();
  40 + void testAnalyzeIterateWithWhitespaceHandlingAPPEND();
37 41 void testAnalyzeVector1();
38 42 void testOpenInvalidFile();
39 43 void testOpenNonExistentFile();
... ...
nbproject/configurations.xml
... ... @@ -165,8 +165,9 @@
165 165 <rebuildPropChanged>false</rebuildPropChanged>
166 166 </toolsSet>
167 167 <flagsDictionary>
168   - <element flagsID="0" commonFlags="-std=c++98 -O3"/>
  168 + <element flagsID="0" commonFlags="-std=c++98"/>
169 169 <element flagsID="1" commonFlags="-std=c++98 -O3 -fPIC"/>
  170 + <element flagsID="2" commonFlags="-std=c++98 -fPIC"/>
170 171 </flagsDictionary>
171 172 <codeAssistance>
172 173 </codeAssistance>
... ... @@ -185,6 +186,7 @@
185 186 <pElem>build/fsa</pElem>
186 187 </incDir>
187 188 <preprocessorList>
  189 + <Elem>NDEBUG</Elem>
188 190 <Elem>_OPTIMIZE__=1</Elem>
189 191 <Elem>__PIC__=2</Elem>
190 192 <Elem>__pic__=2</Elem>
... ... @@ -203,6 +205,7 @@
203 205 <pElem>build/fsa</pElem>
204 206 </incDir>
205 207 <preprocessorList>
  208 + <Elem>NDEBUG</Elem>
206 209 <Elem>_OPTIMIZE__=1</Elem>
207 210 <Elem>__PIC__=2</Elem>
208 211 <Elem>__pic__=2</Elem>
... ... @@ -215,15 +218,11 @@
215 218 </ccTool>
216 219 </item>
217 220 <item path="build/morfeusz/default_fsa.cpp" ex="false" tool="1" flavor2="4">
218   - <ccTool flags="1">
219   - </ccTool>
220 221 </item>
221 222 <item path="build/morfeusz/default_synth_fsa.cpp"
222 223 ex="false"
223 224 tool="1"
224 225 flavor2="4">
225   - <ccTool flags="1">
226   - </ccTool>
227 226 </item>
228 227 <item path="build/morfeusz/java/swigJAVA.cpp" ex="false" tool="1" flavor2="4">
229 228 </item>
... ... @@ -239,6 +238,7 @@
239 238 <pElem>build/morfeusz/java</pElem>
240 239 </incDir>
241 240 <preprocessorList>
  241 + <Elem>NDEBUG</Elem>
242 242 <Elem>_OPTIMIZE__=1</Elem>
243 243 <Elem>__PIC__=2</Elem>
244 244 <Elem>__pic__=2</Elem>
... ... @@ -263,6 +263,7 @@
263 263 <pElem>build/morfeusz/perl</pElem>
264 264 </incDir>
265 265 <preprocessorList>
  266 + <Elem>NDEBUG</Elem>
266 267 <Elem>_OPTIMIZE__=1</Elem>
267 268 <Elem>morfeusz_perl_EXPORTS</Elem>
268 269 </preprocessorList>
... ... @@ -283,6 +284,7 @@
283 284 <pElem>build/morfeusz/python</pElem>
284 285 </incDir>
285 286 <preprocessorList>
  287 + <Elem>NDEBUG</Elem>
286 288 <Elem>_OPTIMIZE__=1</Elem>
287 289 <Elem>__PIC__=2</Elem>
288 290 <Elem>__pic__=2</Elem>
... ... @@ -304,14 +306,12 @@
304 306 ex="false"
305 307 tool="1"
306 308 flavor2="4">
307   - <ccTool flags="1">
308   - </ccTool>
309 309 </item>
310 310 <item path="build/morfeusz/wrappers/morfeuszPERL_wrap.cxx"
311 311 ex="false"
312 312 tool="1"
313 313 flavor2="4">
314   - <ccTool flags="1">
  314 + <ccTool flags="2">
315 315 <incDir>
316 316 <pElem>/usr/lib/perl/5.14/CORE</pElem>
317 317 <pElem>build/morfeusz/wrappers/perl</pElem>
... ... @@ -331,6 +331,7 @@
331 331 <pElem>morfeusz/build/morfeusz</pElem>
332 332 </incDir>
333 333 <preprocessorList>
  334 + <Elem>NDEBUG</Elem>
334 335 <Elem>_OPTIMIZE__=1</Elem>
335 336 </preprocessorList>
336 337 <undefinedList>
... ... @@ -346,6 +347,7 @@
346 347 <pElem>morfeusz/build/morfeusz</pElem>
347 348 </incDir>
348 349 <preprocessorList>
  350 + <Elem>NDEBUG</Elem>
349 351 <Elem>_OPTIMIZE__=1</Elem>
350 352 </preprocessorList>
351 353 <undefinedList>
... ... @@ -361,7 +363,6 @@
361 363 <pElem>build/morfeusz</pElem>
362 364 </incDir>
363 365 <preprocessorList>
364   - <Elem>NDEBUG</Elem>
365 366 <Elem>libmorfeusz_EXPORTS</Elem>
366 367 </preprocessorList>
367 368 </ccTool>
... ... @@ -374,7 +375,6 @@
374 375 <pElem>build/morfeusz</pElem>
375 376 </incDir>
376 377 <preprocessorList>
377   - <Elem>NDEBUG</Elem>
378 378 <Elem>libmorfeusz_EXPORTS</Elem>
379 379 </preprocessorList>
380 380 </ccTool>
... ... @@ -387,7 +387,6 @@
387 387 <pElem>build/morfeusz</pElem>
388 388 </incDir>
389 389 <preprocessorList>
390   - <Elem>NDEBUG</Elem>
391 390 <Elem>libmorfeusz_EXPORTS</Elem>
392 391 </preprocessorList>
393 392 </ccTool>
... ... @@ -400,7 +399,6 @@
400 399 <pElem>build/morfeusz</pElem>
401 400 </incDir>
402 401 <preprocessorList>
403   - <Elem>NDEBUG</Elem>
404 402 <Elem>libmorfeusz_EXPORTS</Elem>
405 403 </preprocessorList>
406 404 </ccTool>
... ... @@ -413,7 +411,6 @@
413 411 <pElem>build/morfeusz</pElem>
414 412 </incDir>
415 413 <preprocessorList>
416   - <Elem>NDEBUG</Elem>
417 414 <Elem>libmorfeusz_EXPORTS</Elem>
418 415 </preprocessorList>
419 416 </ccTool>
... ... @@ -426,7 +423,6 @@
426 423 <pElem>build/morfeusz</pElem>
427 424 </incDir>
428 425 <preprocessorList>
429   - <Elem>NDEBUG</Elem>
430 426 <Elem>libmorfeusz_EXPORTS</Elem>
431 427 </preprocessorList>
432 428 </ccTool>
... ... @@ -439,7 +435,6 @@
439 435 <pElem>build/morfeusz</pElem>
440 436 </incDir>
441 437 <preprocessorList>
442   - <Elem>NDEBUG</Elem>
443 438 <Elem>libmorfeusz_EXPORTS</Elem>
444 439 </preprocessorList>
445 440 </ccTool>
... ... @@ -592,9 +587,6 @@
592 587 <pElem>build</pElem>
593 588 <pElem>morfeusz</pElem>
594 589 </incDir>
595   - <preprocessorList>
596   - <Elem>NDEBUG</Elem>
597   - </preprocessorList>
598 590 </ccTool>
599 591 </folder>
600 592 <folder path="build/morfeusz/wrappers/java">
... ... @@ -635,7 +627,6 @@
635 627 <pElem>morfeusz</pElem>
636 628 </incDir>
637 629 <preprocessorList>
638   - <Elem>NDEBUG</Elem>
639 630 <Elem>libmorfeusz_EXPORTS</Elem>
640 631 </preprocessorList>
641 632 </ccTool>
... ... @@ -648,6 +639,7 @@
648 639 <pElem>/usr/lib/jvm/default-java/include</pElem>
649 640 </incDir>
650 641 <preprocessorList>
  642 + <Elem>NDEBUG</Elem>
651 643 <Elem>_OPTIMIZE__=1</Elem>
652 644 <Elem>libjmorfeusz_EXPORTS</Elem>
653 645 </preprocessorList>
... ... @@ -664,159 +656,134 @@
664 656 </ccTool>
665 657 </folder>
666 658 <item path="morfeusz/DefaultTagset.cpp" ex="false" tool="1" flavor2="4">
667   - <ccTool flags="1">
  659 + <ccTool flags="2">
668 660 <incDir>
669 661 <pElem>build</pElem>
670 662 <pElem>morfeusz</pElem>
671 663 <pElem>build/morfeusz</pElem>
672 664 </incDir>
673 665 <preprocessorList>
674   - <Elem>NDEBUG</Elem>
675 666 <Elem>libmorfeusz_EXPORTS</Elem>
676 667 </preprocessorList>
677 668 </ccTool>
678 669 </item>
679 670 <item path="morfeusz/Environment.cpp" ex="false" tool="1" flavor2="4">
680   - <ccTool flags="1">
  671 + <ccTool flags="2">
681 672 <incDir>
682 673 <pElem>build</pElem>
683 674 <pElem>morfeusz</pElem>
684 675 <pElem>build/morfeusz</pElem>
685 676 </incDir>
686 677 <preprocessorList>
687   - <Elem>NDEBUG</Elem>
688 678 <Elem>libmorfeusz_EXPORTS</Elem>
689 679 </preprocessorList>
690 680 </ccTool>
691 681 </item>
692 682 <item path="morfeusz/InflexionGraph.cpp" ex="false" tool="1" flavor2="4">
693   - <ccTool flags="1">
  683 + <ccTool flags="2">
694 684 <incDir>
695 685 <pElem>build</pElem>
696 686 <pElem>morfeusz</pElem>
697 687 <pElem>build/morfeusz</pElem>
698 688 </incDir>
699 689 <preprocessorList>
700   - <Elem>NDEBUG</Elem>
701 690 <Elem>libmorfeusz_EXPORTS</Elem>
702 691 </preprocessorList>
703 692 </ccTool>
704 693 </item>
705 694 <item path="morfeusz/Morfeusz.cpp" ex="false" tool="1" flavor2="4">
706   - <ccTool flags="1">
  695 + <ccTool flags="2">
707 696 <incDir>
708 697 <pElem>build</pElem>
709 698 <pElem>morfeusz</pElem>
710 699 <pElem>build/morfeusz</pElem>
711 700 </incDir>
712 701 <preprocessorList>
713   - <Elem>NDEBUG</Elem>
714 702 <Elem>libmorfeusz_EXPORTS</Elem>
715 703 </preprocessorList>
716 704 </ccTool>
717 705 </item>
718 706 <item path="morfeusz/MorfeuszInternal.cpp" ex="false" tool="1" flavor2="4">
719   - <ccTool flags="1">
  707 + <ccTool flags="2">
720 708 <incDir>
721 709 <pElem>build</pElem>
722 710 <pElem>morfeusz</pElem>
723 711 <pElem>build/morfeusz</pElem>
724 712 </incDir>
725 713 <preprocessorList>
726   - <Elem>NDEBUG</Elem>
727 714 <Elem>libmorfeusz_EXPORTS</Elem>
728 715 </preprocessorList>
729 716 </ccTool>
730 717 </item>
731 718 <item path="morfeusz/MorphInterpretation.cpp" ex="false" tool="1" flavor2="4">
732   - <ccTool flags="1">
  719 + <ccTool flags="2">
733 720 <incDir>
734 721 <pElem>build</pElem>
735 722 <pElem>morfeusz</pElem>
736 723 <pElem>build/morfeusz</pElem>
737 724 </incDir>
738 725 <preprocessorList>
739   - <Elem>NDEBUG</Elem>
740 726 <Elem>libmorfeusz_EXPORTS</Elem>
741 727 </preprocessorList>
742 728 </ccTool>
743 729 </item>
744 730 <item path="morfeusz/Qualifiers.cpp" ex="false" tool="1" flavor2="4">
745   - <ccTool flags="1">
  731 + <ccTool flags="2">
746 732 <incDir>
747 733 <pElem>build</pElem>
748 734 <pElem>morfeusz</pElem>
749 735 <pElem>build/morfeusz</pElem>
750 736 </incDir>
751 737 <preprocessorList>
752   - <Elem>NDEBUG</Elem>
753 738 <Elem>libmorfeusz_EXPORTS</Elem>
754 739 </preprocessorList>
755 740 </ccTool>
756 741 </item>
757 742 <item path="morfeusz/ResultsIteratorImpl.cpp" ex="false" tool="1" flavor2="4">
758   - <ccTool flags="1">
  743 + <ccTool flags="2">
759 744 <incDir>
760 745 <pElem>build</pElem>
761 746 <pElem>morfeusz</pElem>
762 747 <pElem>build/morfeusz</pElem>
763 748 </incDir>
764 749 <preprocessorList>
765   - <Elem>NDEBUG</Elem>
766 750 <Elem>libmorfeusz_EXPORTS</Elem>
767 751 </preprocessorList>
768 752 </ccTool>
769 753 </item>
770 754 <item path="morfeusz/c_api/ResultsManager.cpp" ex="false" tool="1" flavor2="4">
771   - <ccTool flags="1">
772   - </ccTool>
773 755 </item>
774 756 <item path="morfeusz/case/CaseConverter.cpp" ex="false" tool="1" flavor2="4">
775   - <ccTool flags="1">
776   - </ccTool>
777 757 </item>
778 758 <item path="morfeusz/case/CasePatternHelper.cpp"
779 759 ex="false"
780 760 tool="1"
781 761 flavor2="4">
782   - <ccTool flags="1">
783   - </ccTool>
784 762 </item>
785 763 <item path="morfeusz/case/caseconv.cpp" ex="false" tool="1" flavor2="4">
786   - <ccTool flags="1">
787   - </ccTool>
788 764 </item>
789 765 <item path="morfeusz/charset/CharsetConverter.cpp"
790 766 ex="false"
791 767 tool="1"
792 768 flavor2="4">
793   - <ccTool flags="1">
794   - </ccTool>
795 769 </item>
796 770 <item path="morfeusz/charset/TextReader.cpp" ex="false" tool="1" flavor2="4">
797   - <ccTool flags="1">
798   - </ccTool>
799 771 </item>
800 772 <item path="morfeusz/charset/conversion_tables.cpp"
801 773 ex="false"
802 774 tool="1"
803 775 flavor2="4">
804   - <ccTool flags="1">
805   - </ccTool>
806 776 </item>
807 777 <item path="morfeusz/cli/cli.cpp" ex="false" tool="1" flavor2="4">
808   - <ccTool flags="1">
809   - </ccTool>
810 778 </item>
811 779 <item path="morfeusz/const.cpp" ex="false" tool="1" flavor2="4">
812   - <ccTool flags="1">
  780 + <ccTool flags="2">
813 781 <incDir>
814 782 <pElem>build</pElem>
815 783 <pElem>morfeusz</pElem>
816 784 <pElem>build/morfeusz</pElem>
817 785 </incDir>
818 786 <preprocessorList>
819   - <Elem>NDEBUG</Elem>
820 787 <Elem>libmorfeusz_EXPORTS</Elem>
821 788 </preprocessorList>
822 789 </ccTool>
... ... @@ -825,50 +792,37 @@
825 792 ex="false"
826 793 tool="1"
827 794 flavor2="4">
828   - <ccTool flags="1">
829   - </ccTool>
830 795 </item>
831 796 <item path="morfeusz/deserialization/MorphDeserializer.cpp"
832 797 ex="false"
833 798 tool="1"
834 799 flavor2="4">
835   - <ccTool flags="1">
836   - </ccTool>
837 800 </item>
838 801 <item path="morfeusz/deserialization/morphInterps/InterpretedChunksDecoder.cpp"
839 802 ex="false"
840 803 tool="1"
841 804 flavor2="4">
842   - <ccTool flags="1">
843   - </ccTool>
844 805 </item>
845 806 <item path="morfeusz/deserialization/morphInterps/InterpretedChunksDecoder4Analyzer.cpp"
846 807 ex="false"
847 808 tool="1"
848 809 flavor2="4">
849   - <ccTool flags="1">
850   - </ccTool>
851 810 </item>
852 811 <item path="morfeusz/deserialization/morphInterps/InterpretedChunksDecoder4Generator.cpp"
853 812 ex="false"
854 813 tool="1"
855 814 flavor2="4">
856   - <ccTool flags="1">
857   - </ccTool>
858 815 </item>
859 816 <item path="morfeusz/fsa/const.cpp" ex="false" tool="1" flavor2="4">
860   - <ccTool flags="1">
861   - </ccTool>
862 817 </item>
863 818 <item path="morfeusz/morfeusz2_c.cpp" ex="false" tool="1" flavor2="4">
864   - <ccTool flags="1">
  819 + <ccTool flags="2">
865 820 <incDir>
866 821 <pElem>build</pElem>
867 822 <pElem>morfeusz</pElem>
868 823 <pElem>build/morfeusz</pElem>
869 824 </incDir>
870 825 <preprocessorList>
871   - <Elem>NDEBUG</Elem>
872 826 <Elem>libmorfeusz_EXPORTS</Elem>
873 827 </preprocessorList>
874 828 </ccTool>
... ... @@ -880,9 +834,6 @@
880 834 <pElem>morfeusz</pElem>
881 835 <pElem>build/morfeusz</pElem>
882 836 </incDir>
883   - <preprocessorList>
884   - <Elem>NDEBUG</Elem>
885   - </preprocessorList>
886 837 </ccTool>
887 838 </item>
888 839 <item path="morfeusz/morfeusz_generator.cpp" ex="false" tool="1" flavor2="4">
... ... @@ -892,18 +843,11 @@
892 843 <pElem>morfeusz</pElem>
893 844 <pElem>build/morfeusz</pElem>
894 845 </incDir>
895   - <preprocessorList>
896   - <Elem>NDEBUG</Elem>
897   - </preprocessorList>
898 846 </ccTool>
899 847 </item>
900 848 <item path="morfeusz/segrules/SegrulesFSA.cpp" ex="false" tool="1" flavor2="4">
901   - <ccTool flags="1">
902   - </ccTool>
903 849 </item>
904 850 <item path="morfeusz/segrules/segrules.cpp" ex="false" tool="1" flavor2="4">
905   - <ccTool flags="1">
906   - </ccTool>
907 851 </item>
908 852 <item path="morfeusz/test/test_recognize_dict.cpp"
909 853 ex="false"
... ... @@ -922,9 +866,6 @@
922 866 <pElem>morfeusz</pElem>
923 867 <pElem>build/morfeusz</pElem>
924 868 </incDir>
925   - <preprocessorList>
926   - <Elem>NDEBUG</Elem>
927   - </preprocessorList>
928 869 </ccTool>
929 870 </item>
930 871 <item path="morfeusz/tests/.cpp" ex="true" tool="3" flavor2="0">
... ... @@ -936,9 +877,6 @@
936 877 <pElem>morfeusz</pElem>
937 878 <pElem>build/morfeusz</pElem>
938 879 </incDir>
939   - <preprocessorList>
940   - <Elem>NDEBUG</Elem>
941   - </preprocessorList>
942 880 </ccTool>
943 881 </item>
944 882 <item path="morfeusz/tests/TestMorfeusz.cpp" ex="false" tool="1" flavor2="4">
... ... @@ -948,9 +886,6 @@
948 886 <pElem>morfeusz</pElem>
949 887 <pElem>build/morfeusz</pElem>
950 888 </incDir>
951   - <preprocessorList>
952   - <Elem>NDEBUG</Elem>
953   - </preprocessorList>
954 889 </ccTool>
955 890 </item>
956 891 <item path="morfeusz/tests/test_c_api.cpp" ex="false" tool="1" flavor2="0">
... ...