[lttoolbox] 01/02: Imported Upstream version 3.3.1~r59199
Tino Didriksen
tinodidriksen-guest at moszumanska.debian.org
Sun Jun 21 17:15:07 UTC 2015
This is an automated email from the git hooks/post-receive script.
tinodidriksen-guest pushed a commit to branch master
in repository lttoolbox.
commit d46ba365c6d81f6159652cb6253e57375a93d006
Author: Tino Didriksen <mail at tinodidriksen.com>
Date: Sun Jun 21 17:14:44 2015 +0000
Imported Upstream version 3.3.1~r59199
---
configure.ac | 6 +-
lttoolbox/CMakeLists.txt | 4 +-
lttoolbox/Makefile.am | 4 +-
lttoolbox/compression.cc | 25 ++++
lttoolbox/compression.h | 19 ++-
lttoolbox/lt_comp.cc | 3 +-
lttoolbox/lt_locale.cc | 2 +-
lttoolbox/lt_proc.cc | 20 +--
lttoolbox/lt_trim.cc | 15 +++
lttoolbox/transducer.cc | 16 +--
lttoolbox/xsd/acx.xsd | 35 ++++++
lttoolbox/xsd/dix.xsd | 243 +++++++++++++++++++++++++++++++++++++
tests/data/bidix-epsilons-bi.dix | 22 ++++
tests/data/bidix-epsilons-mono.dix | 21 ++++
tests/lt_trim/__init__.py | 8 ++
15 files changed, 415 insertions(+), 28 deletions(-)
diff --git a/configure.ac b/configure.ac
index 99b7281..a717ebe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -5,7 +5,7 @@ AC_PREREQ(2.52)
m4_define([required_libxml_version], [2.6.17])
-AC_INIT([lttoolbox/lttoolbox.h], [3.3.0], [sortiz at users.sourceforge.net])
+AC_INIT([lttoolbox/lttoolbox.h], [3.3.1], [sortiz at users.sourceforge.net])
AC_CONFIG_HEADER([lttoolbox/lttoolbox_config.h])
AC_CANONICAL_SYSTEM
@@ -15,7 +15,7 @@ GENERIC_LIBRARY_NAME=lttoolbox
# Release versioning
GENERIC_MAJOR_VERSION=3
GENERIC_MINOR_VERSION=3
-GENERIC_MICRO_VERSION=0
+GENERIC_MICRO_VERSION=1
# API version (often = GENERIC_MAJOR_VERSION.GENERIC_MINOR_VERSION)
GENERIC_API_VERSION=$GENERIC_MAJOR_VERSION.$GENERIC_MINOR_VERSION
@@ -173,8 +173,6 @@ AC_TYPE_SIZE_T
# Checks for library functions.
AC_FUNC_ERROR_AT_LINE
-AC_FUNC_MALLOC
-AC_FUNC_REALLOC
AC_CHECK_DECLS([fread_unlocked, fwrite_unlocked, fgetc_unlocked, \
fputc_unlocked, fputs_unlocked, fgetwc_unlocked, fputwc_unlocked, fputws_unlocked])
diff --git a/lttoolbox/CMakeLists.txt b/lttoolbox/CMakeLists.txt
index 8735ec2..ff30e01 100644
--- a/lttoolbox/CMakeLists.txt
+++ b/lttoolbox/CMakeLists.txt
@@ -35,7 +35,7 @@ INSTALL (TARGETS lt-proc lt-comp lt-expand lt-tmxcomp lt-tmxproc lttoolbox3
FILE(GLOB HEADERS *.h)
INSTALL (FILES ${HEADERS}
- DESTINATION include/lttoolbox-3.1/lttoolbox)
+ DESTINATION include/lttoolbox-3.3/lttoolbox)
INSTALL (FILES dix.dtd
- DESTINATION share/lttoolbox-3.1)
+ DESTINATION share/lttoolbox-3.3)
diff --git a/lttoolbox/Makefile.am b/lttoolbox/Makefile.am
index c3e050a..89e47bc 100644
--- a/lttoolbox/Makefile.am
+++ b/lttoolbox/Makefile.am
@@ -24,7 +24,7 @@ lttoolboxdir = $(prefix)/share/lttoolbox
lttoolboxinclude = $(prefix)/include
lttoolboxlib = $(prefix)/lib
-lttoolbox_DATA = dix.dtd dix.rng acx.rng
+lttoolbox_DATA = dix.dtd dix.rng acx.rng xsd/dix.xsd xsd/acx.xsd
lt_print_SOURCES = lt_print.cc
lt_print_LDADD = liblttoolbox$(GENERIC_MAJOR_VERSION).la
@@ -69,4 +69,4 @@ man_MANS = lt-comp.1 lt-expand.1 lt-proc.1 lt-tmxcomp.1 lt-tmxproc.1 lt-print.1
INCLUDES = -I$(top_srcdir) $(LTTOOLBOX_CFLAGS)
CLEANFILES = *~
-EXTRA_DIST = dix.dtd dix.rng acx.rng CMakeLists.txt $(man_MANS)
+EXTRA_DIST = dix.dtd dix.rng acx.rng xsd/dix.xsd xsd/acx.xsd CMakeLists.txt $(man_MANS)
diff --git a/lttoolbox/compression.cc b/lttoolbox/compression.cc
index b30a5e6..736ee49 100644
--- a/lttoolbox/compression.cc
+++ b/lttoolbox/compression.cc
@@ -252,6 +252,7 @@ Compression::multibyte_read(istream &input)
return result;
}
+
void
Compression::wstring_write(wstring const &str, FILE *output)
{
@@ -272,6 +273,30 @@ Compression::wstring_read(FILE *input)
{
retval += static_cast<wchar_t>(Compression::multibyte_read(input));
}
+
+ return retval;
+}
+
+void
+Compression::string_write(string const &str, FILE *output)
+{
+ Compression::multibyte_write(str.size(), output);
+ for(unsigned int i = 0, limit = str.size(); i != limit; i++)
+ {
+ Compression::multibyte_write(static_cast<int>(str[i]), output);
+ }
+}
+
+string
+Compression::string_read(FILE *input)
+{
+ string retval = "";
+
+ for(unsigned int i = 0, limit = Compression::multibyte_read(input);
+ i != limit; i++)
+ {
+ retval += static_cast<char>(Compression::multibyte_read(input));
+ }
return retval;
}
diff --git a/lttoolbox/compression.h b/lttoolbox/compression.h
index 6b534e1..f5c3b7c 100644
--- a/lttoolbox/compression.h
+++ b/lttoolbox/compression.h
@@ -92,9 +92,26 @@ public:
* This method reads a wide string from the input stream.
* @see wstring_write()
* @param input the input stream.
- * @return the wide string readed.
+ * @return the wide string read.
*/
static wstring wstring_read(FILE *input);
+
+ /**
+ * This method allows to write a plain string to an output stream
+ * using its UCSencoding as integer.
+ * @see string_read()
+ * @param str the string to write.
+ * @param output the output stream.
+ */
+ static void string_write(string const &str, FILE *output);
+
+ /**
+ * This method reads a plain string from the input stream.
+ * @see string_write()
+ * @param input the input stream.
+ * @return the string read.
+ */
+ static string string_read(FILE *input);
};
#endif
diff --git a/lttoolbox/lt_comp.cc b/lttoolbox/lt_comp.cc
index 9992159..7692660 100644
--- a/lttoolbox/lt_comp.cc
+++ b/lttoolbox/lt_comp.cc
@@ -163,7 +163,8 @@ int main(int argc, char *argv[])
}
else
{
- ttype = 'a';
+ cerr << "Error: Cannot not open file '" << infile << "'." << endl << endl;
+ exit(EXIT_FAILURE);
}
initGenericErrorDefaultFunc(NULL);
diff --git a/lttoolbox/lt_locale.cc b/lttoolbox/lt_locale.cc
index 4fefe03..a3ee533 100644
--- a/lttoolbox/lt_locale.cc
+++ b/lttoolbox/lt_locale.cc
@@ -44,7 +44,7 @@ LtLocale::tryToSetLocale()
setlocale(LC_ALL, "C.UTF-8");
#endif
#ifdef __MINGW32__
- SetConsoleInputCP(65001);
+ //SetConsoleInputCP(65001);
SetConsoleOutputCP(65001);
#endif
}
diff --git a/lttoolbox/lt_proc.cc b/lttoolbox/lt_proc.cc
index 2f76c7a..613bc20 100644
--- a/lttoolbox/lt_proc.cc
+++ b/lttoolbox/lt_proc.cc
@@ -181,19 +181,22 @@ int main(int argc, char *argv[])
FILE *in = fopen(argv[optind], "rb");
if(in == NULL || ferror(in))
{
- endProgram(argv[0]);
+ cerr << "Error: Cannot not open file '" << argv[optind] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
}
input = fopen(argv[optind+1], "rb");
if(input == NULL || ferror(input))
{
- endProgram(argv[0]);
+ cerr << "Error: Cannot not open file '" << argv[optind+1] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
}
output= fopen(argv[optind+2], "wb");
if(output == NULL || ferror(output))
{
- endProgram(argv[0]);
+ cerr << "Error: Cannot not open file '" << argv[optind+2] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
}
fstp.load(in);
@@ -204,13 +207,15 @@ int main(int argc, char *argv[])
FILE *in = fopen(argv[optind], "rb");
if(in == NULL || ferror(in))
{
- endProgram(argv[0]);
+ cerr << "Error: Cannot not open file '" << argv[optind] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
}
input = fopen(argv[optind+1], "rb");
if(input == NULL || ferror(input))
{
- endProgram(argv[0]);
+ cerr << "Error: Cannot not open file '" << argv[optind+1] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
}
fstp.load(in);
@@ -221,8 +226,9 @@ int main(int argc, char *argv[])
FILE *in = fopen(argv[optind], "rb");
if(in == NULL || ferror(in))
{
- endProgram(argv[0]);
- }
+ cerr << "Error: Cannot not open file '" << argv[optind] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
+ }
fstp.load(in);
fclose(in);
}
diff --git a/lttoolbox/lt_trim.cc b/lttoolbox/lt_trim.cc
index 5b53e4e..d65873f 100644
--- a/lttoolbox/lt_trim.cc
+++ b/lttoolbox/lt_trim.cc
@@ -155,7 +155,17 @@ int main(int argc, char *argv[])
LtLocale::tryToSetLocale();
FILE *analyser = fopen(argv[1], "rb");
+ if(!analyser)
+ {
+ cerr << "Error: Cannot not open file '" << argv[1] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
+ }
FILE *bidix = fopen(argv[2], "rb");
+ if(!bidix)
+ {
+ cerr << "Error: Cannot not open file '" << argv[2] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
+ }
std::pair<std::pair<Alphabet, wstring>, std::map<wstring, Transducer> > trimmed = trim(analyser, bidix);
Alphabet alph_t = trimmed.first.first;
@@ -179,6 +189,11 @@ int main(int argc, char *argv[])
// Write the file:
FILE *output = fopen(argv[3], "wb");
+ if(!output)
+ {
+ cerr << "Error: Cannot not open file '" << argv[3] << "'." << endl << endl;
+ exit(EXIT_FAILURE);
+ }
// letters
Compression::wstring_write(letters, output);
diff --git a/lttoolbox/transducer.cc b/lttoolbox/transducer.cc
index 4bda5c8..2cffc71 100644
--- a/lttoolbox/transducer.cc
+++ b/lttoolbox/transducer.cc
@@ -1026,20 +1026,16 @@ Transducer::intersect(Transducer &trimmer,
if(trimmer_left == L"")
{
next = make_pair(this_src, make_pair(trimmer_trg, trimmer_preplus_next));
+ std::pair<int, int> states_trg = make_pair(this_src, trimmer_trg);
if(seen.find(next) == seen.end())
{
todo.push_front(next);
- states_this_trimmed.insert(make_pair(make_pair(this_src, trimmer_trg),
- trimmed_src));
- }
- else
- {
- // this_src/trimmed_trg is already processed, just ensure the paths are merged:
- int trimmed_trg = states_this_trimmed[make_pair(this_src, trimmer_trg)];
- trimmed.linkStates(trimmed_src,
- trimmed_trg,
- epsilon_tag);
+ states_this_trimmed.insert(make_pair(states_trg, trimmed.newState()));
}
+ int trimmed_trg = states_this_trimmed[states_trg];
+ trimmed.linkStates(trimmed_src,
+ trimmed_trg,
+ epsilon_tag);
}
}
diff --git a/lttoolbox/xsd/acx.xsd b/lttoolbox/xsd/acx.xsd
new file mode 100644
index 0000000..a0ad836
--- /dev/null
+++ b/lttoolbox/xsd/acx.xsd
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="analysis-chars">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="char"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="char">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="equiv-char"/>
+ </xs:sequence>
+ <xs:attribute name="value" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:length value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="equiv-char">
+ <xs:complexType>
+ <xs:attribute name="value" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:length value="1"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
diff --git a/lttoolbox/xsd/dix.xsd b/lttoolbox/xsd/dix.xsd
new file mode 100644
index 0000000..ed328c9
--- /dev/null
+++ b/lttoolbox/xsd/dix.xsd
@@ -0,0 +1,243 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- DTD for the format of dictionaries -->
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+ <xs:element name="dictionary">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element minOccurs="0" ref="alphabet"/>
+ <xs:element minOccurs="0" ref="sdefs"/>
+ <xs:element minOccurs="0" ref="pardefs"/>
+ <xs:element maxOccurs="unbounded" ref="section"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:keyref name="symbolNameRef" refer="symbol_name">
+ <xs:selector xpath=".//s" />
+ <xs:field xpath="@n" />
+ </xs:keyref>
+ <xs:key name="symbol_name">
+ <xs:selector xpath=".//sdef" />
+ <xs:field xpath="@n" />
+ </xs:key>
+ <!--
+ Commented out since it reports an error on entries having the
+ ignore attribute (@i) set to 'yes'.
+ Though, we should perhaps consider to differentiate ignoring a dictionary
+ in compilation vs. dictionary consistency.
+ <xs:keyref name="parNameRef" refer="paradigm_name">
+ <xs:selector xpath=".//par" />
+ <xs:field xpath="@n" />
+ </xs:keyref>
+ <xs:key name="paradigm_name">
+ <xs:selector xpath=".//pardef" />
+ <xs:field xpath="@n" />
+ </xs:key>
+ -->
+ </xs:element>
+ <!-- root element -->
+ <xs:element name="alphabet" type="xs:string"/>
+ <!-- alphabetic character list -->
+ <xs:element name="sdefs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="sdef"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- symbol definition section -->
+ <xs:element name="sdef">
+ <xs:complexType>
+ <xs:attribute name="n" use="required"/>
+ <xs:attribute name="c"/>
+ </xs:complexType>
+ <xs:unique name="sdef-unique">
+ <xs:selector xpath="sdef"/>
+ <xs:field xpath="@n" />
+ </xs:unique>
+ </xs:element>
+ <!-- symbol definition -->
+ <!-- n: symbol (tag) name -->
+ <!-- c: symbol (tag) comment -->
+ <xs:element name="pardefs">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="pardef"/>
+ </xs:sequence>
+ </xs:complexType>
+ <xs:unique name="pardef-unique">
+ <xs:selector xpath="pardef"/>
+ <xs:field xpath="@n" />
+ </xs:unique>
+ </xs:element>
+ <!-- paradigm definition section -->
+ <xs:element name="pardef">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="e"/>
+ </xs:sequence>
+ <xs:attribute name="n" use="required"/>
+ <xs:attribute name="c"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- paradigm definition -->
+ <!-- n: paradigm name -->
+ <!-- c: comment about paradigm -->
+ <xs:element name="section">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element maxOccurs="unbounded" ref="e"/>
+ </xs:sequence>
+ <xs:attribute name="id" use="required" type="xs:ID"/>
+ <xs:attribute name="type" use="required">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="standard"/>
+ <xs:enumeration value="inconditional"/>
+ <xs:enumeration value="postblank"/>
+ <xs:enumeration value="preblank"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ </xs:complexType>
+ </xs:element>
+ <!-- dictionary section -->
+ <!-- id: dictionary section identifier -->
+ <!-- type: dictionary section type -->
+ <xs:element name="e">
+ <xs:complexType>
+ <xs:choice maxOccurs="unbounded">
+ <xs:element ref="f"/>
+ <xs:element ref="i"/>
+ <xs:element ref="p"/>
+ <xs:element ref="par"/>
+ <xs:element ref="re"/>
+ </xs:choice>
+ <xs:attribute name="r">
+ <xs:simpleType>
+ <xs:restriction base="xs:token">
+ <xs:enumeration value="LR"/>
+ <xs:enumeration value="RL"/>
+ </xs:restriction>
+ </xs:simpleType>
+ </xs:attribute>
+ <xs:attribute name="lm"/>
+ <xs:attribute name="a"/>
+ <xs:attribute name="c"/>
+ <xs:attribute name="i"/>
+ <xs:attribute name="slr"/>
+ <xs:attribute name="srl"/>
+ <xs:attribute name="alt"/>
+ <xs:attribute name="v"/>
+ <xs:attribute name="vl"/>
+ <xs:attribute name="vr"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- entry -->
+ <!--
+ r: restriction LR: left-to-right,
+ RL: right-to-left
+ -->
+ <!-- lm: lemma -->
+ <!-- a: author -->
+ <!-- c: comment -->
+ <!-- i: ignore ('yes') means ignore, otherwise it is not ignored) -->
+ <!-- slr: translation sense when translating from left to right -->
+ <!-- srl: translation sense when translating from right to left -->
+ <xs:element name="par">
+ <xs:complexType>
+ <xs:attribute name="n" use="required"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- reference to paradigm -->
+ <!-- n: paradigm name -->
+ <xs:element name="i">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="b"/>
+ <xs:element ref="s"/>
+ <xs:element ref="g"/>
+ <xs:element ref="j"/>
+ <xs:element ref="a"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <xs:element name="f">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="b"/>
+ <xs:element ref="s"/>
+ <xs:element ref="g"/>
+ <xs:element ref="j"/>
+ <xs:element ref="a"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <!-- identity -->
+ <xs:element name="re" type="xs:string"/>
+ <!-- regular expression identification -->
+ <xs:element name="p">
+ <xs:complexType>
+ <xs:sequence>
+ <xs:element ref="l"/>
+ <xs:element ref="r"/>
+ </xs:sequence>
+ </xs:complexType>
+ </xs:element>
+ <!-- pair of strings -->
+ <xs:element name="l">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="a"/>
+ <xs:element ref="b"/>
+ <xs:element ref="g"/>
+ <xs:element ref="j"/>
+ <xs:element ref="s"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <!-- left part of p -->
+ <xs:element name="r">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="a"/>
+ <xs:element ref="b"/>
+ <xs:element ref="g"/>
+ <xs:element ref="j"/>
+ <xs:element ref="s"/>
+ </xs:choice>
+ </xs:complexType>
+ </xs:element>
+ <!-- right part of p -->
+ <xs:element name="a">
+ <xs:complexType/>
+ </xs:element>
+ <!-- post-generator wake-up mark -->
+ <xs:element name="b">
+ <xs:complexType/>
+ </xs:element>
+ <!-- blank chars block mark -->
+ <xs:element name="g">
+ <xs:complexType mixed="true">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element ref="a"/>
+ <xs:element ref="b"/>
+ <xs:element ref="j"/>
+ <xs:element ref="s"/>
+ </xs:choice>
+ <xs:attribute name="i"/>
+ </xs:complexType>
+ </xs:element>
+ <!-- mark special groups in lemmas -->
+ <!-- i is used to co-index groups in the left with those -->
+ <!-- on the right of a pair -->
+ <xs:element name="j">
+ <xs:complexType/>
+ </xs:element>
+ <!-- join lexical forms -->
+ <xs:element name="s">
+ <xs:complexType>
+ <xs:attribute name="n" use="required"/>
+ </xs:complexType>
+ </xs:element>
+</xs:schema>
+<!-- reference to symbol (tag) -->
+<!-- n: symbol (tag) name -->
diff --git a/tests/data/bidix-epsilons-bi.dix b/tests/data/bidix-epsilons-bi.dix
new file mode 100644
index 0000000..00596d6
--- /dev/null
+++ b/tests/data/bidix-epsilons-bi.dix
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dictionary>
+ <alphabet/>
+ <sdefs>
+ <sdef n="n" />
+ <sdef n="vblex" />
+ <sdef n="f" />
+ <sdef n="m" />
+ </sdefs>
+
+ <pardefs>
+ <pardef n="__n">
+<e> <p><l></l> <r><s n="n"/><s n="m"/></r></p></e>
+ </pardef>
+ </pardefs>
+
+ <section id="main" type="standard">
+<e> <p><l>aa<s n="vblex"/></l><r>aa<s n="vblex"/></r></p></e>
+<e> <p><l>aa<s n="n"/><s n="f"/></l><r>aa</r></p><par n="__n"/></e>
+<e> <p><l>ba<s n="n"/><s n="f"/></l><r>ba</r></p><par n="__n"/></e>
+ </section>
+</dictionary>
diff --git a/tests/data/bidix-epsilons-mono.dix b/tests/data/bidix-epsilons-mono.dix
new file mode 100644
index 0000000..6cc897a
--- /dev/null
+++ b/tests/data/bidix-epsilons-mono.dix
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<dictionary>
+ <alphabet>ABCDEFGHIJKLMNOPQRSTUVWXYZÆØÅabcdefghijklmnopqrstuvwxyzæøåcqwxzCQWXZéèêóòâôÉÊÈÓÔÒÂáàÁÀäÄöÖšŠčČðđÐ</alphabet>
+ <sdefs>
+ <sdef n="vblex" c="Verb"/>
+ <sdef n="pp" c="pp"/>
+ </sdefs>
+ <pardefs>
+<pardef n="DONT_REMOVE_bug_was_dependent_on_transition_order">
+ <e> <p><l>b</l> <r>b</r></p></e>
+</pardef>
+<pardef n="__vblex">
+ <e> <p><l>a</l> <r>a<s n="vblex"/><s n="pp"/></r></p></e>
+</pardef>
+ </pardefs>
+
+<section id="main" type="standard">
+ <e><i>a</i><par n="__vblex"/></e>
+ <e><i>b</i><par n="__vblex"/></e>
+</section>
+</dictionary>
diff --git a/tests/lt_trim/__init__.py b/tests/lt_trim/__init__.py
index be56539..bbf28ef 100644
--- a/tests/lt_trim/__init__.py
+++ b/tests/lt_trim/__init__.py
@@ -152,6 +152,14 @@ class FinalEpsilons(unittest.TestCase, TrimProcTest):
monodix = "data/final-epsilons-mono.dix"
bidix = "data/final-epsilons-bi.dix"
+class BidixEpsilons(unittest.TestCase, TrimProcTest):
+ inputs = ["aa ba"]
+ expectedOutputs = ["^aa/aa<vblex><pp>$ ^ba/*ba$"]
+ expectedRetCode = 0
+ monodix = "data/bidix-epsilons-mono.dix"
+ bidix = "data/bidix-epsilons-bi.dix"
+ bidir = "rl"
+
class Empty(unittest.TestCase, TrimProcTest):
def runTest(self):
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lttoolbox.git
More information about the debian-science-commits
mailing list