![]() |
LIMA
Libre Multilingual Analyzer — C++ API
|
#include <common/Handler/shiftFrom.h>
Public Member Functions | |
| ShiftFrom (const QString &xml) | |
| virtual | ~ShiftFrom () |
| const QString & | xml () |
| const QString & | xml_noent () |
| int | correct_offset (int offset, int indexOfToken) const |
| Return the correct absolute position of a token in its origin text when found at position indexOfToken in a shifted text, taking into account shiftings in shiftFrom and the initial offset. | |
| QString | rebuild_text (const QString &input, int offset) const |
| Replace in input the sequences in mapping (shifted by offset) | |
Friends | |
| LIMA_DATAHANDLER_EXPORT QDebug & | operator<< (QDebug &, const ShiftFrom &) |
Definition at line 24 of file shiftFrom.h.
| Lima::ShiftFrom::ShiftFrom | ( | const QString & | xml | ) |
Definition at line 93 of file shiftFrom.cpp.
|
virtual |
Definition at line 100 of file shiftFrom.cpp.
| int Lima::ShiftFrom::correct_offset | ( | int | offset, |
| int | indexOfToken | ||
| ) | const |
Return the correct absolute position of a token in its origin text when found at position indexOfToken in a shifted text, taking into account shiftings in shiftFrom and the initial offset.
Definition at line 74 of file shiftFrom.cpp.
| QString Lima::ShiftFrom::rebuild_text | ( | const QString & | input, |
| int | offset | ||
| ) | const |
Replace in input the sequences in mapping (shifted by offset)
This allows to put back interpreted entities that were replaced by underscores to avoid introducing shifts in the input xml
Definition at line 54 of file shiftFrom.cpp.
| const QString & Lima::ShiftFrom::xml | ( | ) |
Definition at line 38 of file shiftFrom.cpp.
| const QString & Lima::ShiftFrom::xml_noent | ( | ) |
Definition at line 43 of file shiftFrom.cpp.
|
friend |
Definition at line 160 of file shiftFrom.cpp.