Commit 8280c0ab authored by Yuri N. Sedunov's avatar Yuri N. Sedunov Committed by Girar Builder pender robot

3.0.0-alt7

- updated fedora patches for link-grammar-5 support
parent 7a0f427b
--- abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp.orig 2014-06-30 08:21:30.000000000 -0500
+++ abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2014-06-30 08:27:01.000000000 -0500
@@ -220,6 +220,7 @@ bool LinkGrammarWrap::parseSentence(Piec
pErr = NULL;
}
+#ifdef DEAD_DEBUG_CODE
// for(i=0; i< pT->m_vecGrammarErrors.getItemCount(); i++)
// {
// pErr = pT->m_vecGrammarErrors.getNthItem(i);
@@ -227,15 +228,10 @@ bool LinkGrammarWrap::parseSentence(Piec
// }
UT_UTF8String sErr = linkage_get_violation_name(linkage);
// UT_DEBUGMSG(("Top Level error message |%s|\n",sErr.utf8_str()));
- UT_sint32 count = linkage_get_num_sublinkages(linkage);
//
// Find linkages with violations
//
- for(i=0; i<count;i++)
{
- UT_sint32 iok = linkage_set_current_sublinkage(linkage, i);
- if(iok == 0)
- continue;
UT_sint32 j = 0;
UT_sint32 iNum = linkage_get_num_links(linkage);
for(j=0;j< iNum;j++)
@@ -252,6 +248,8 @@ bool LinkGrammarWrap::parseSentence(Piec
}
}
linkage_delete(linkage);
+#endif // DEAD_DEBUG_CODE
+
for(i=0; i< vecMapOfWords.getItemCount(); i++)
{
AbiGrammarError * p = vecMapOfWords.getNthItem(i);
--- abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp.orig 2013-04-07 08:53:03.000000000 -0500
+++ abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2014-06-27 08:58:42.186089562 -0500
@@ -145,11 +145,11 @@
--- abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp.orig 2014-06-29 14:50:30.000000000 -0500
+++ abiword-3.0.0/plugins/grammar/linkgrammarwrap/LinkGrammarWrap.cpp 2014-06-29 14:55:39.000000000 -0500
@@ -145,12 +145,11 @@ bool LinkGrammarWrap::parseSentence(Piec
}
AbiGrammarError * pWordMap = new AbiGrammarError();
pWordMap->m_iErrLow = iLow;
- pWordMap->m_iErrHigh = iLow + strlen(sentence_get_nth_word(sent, i));
+ pWordMap->m_iErrHigh = iLow + sentence_link_cost(sent, i);
+ pWordMap->m_iErrHigh = iLow + strlen(linkage_get_word(linkage, i));
pWordMap->m_iWordNum = i;
vecMapOfWords.addItem(pWordMap);
bool bNew = false;
- if(!sentence_nth_word_has_disjunction(sent, i))
+ if(!sentence_disjunct_cost(sent, i))
{
- {
+
//UT_DEBUGMSG(("|%s| NULL LINK\n",sent->word[i].string));
if(pErr == NULL)
@@ -167,7 +167,7 @@
{
@@ -167,7 +166,7 @@ bool LinkGrammarWrap::parseSentence(Piec
}
pErr = new AbiGrammarError();
}
- iHigh = iLow + strlen(sentence_get_nth_word(sent, i));
+ iHigh = iLow + sentence_link_cost(sent, i);
+ iHigh = iLow + strlen(linkage_get_word(linkage, i));
pErr->m_iErrLow = iLow + iOff -1;
pErr->m_iErrHigh = iHigh + iOff -1;
if(pErr->m_iErrLow < 0)
@@ -188,7 +188,7 @@
@@ -188,7 +187,7 @@ bool LinkGrammarWrap::parseSentence(Piec
//
// Expand the sqiggle
//
- iHigh = iLow + strlen(sentence_get_nth_word(sent, i)) + iOff;
+ iHigh = iLow + sentence_link_cost(sent, i) + iOff;
+ iHigh = iLow + strlen(linkage_get_word(linkage, i)) + iOff;
pErr->m_iErrHigh = iHigh;
if(pErr->m_iErrHigh < totlen-1)
{
@@ -197,7 +197,7 @@
@@ -196,8 +195,7 @@ bool LinkGrammarWrap::parseSentence(Piec
}
pErr->m_iWordNum = i;
}
}
- }
- iLow += strlen(sentence_get_nth_word(sent, i));
+ iLow += sentence_link_cost(sent, i);
+ iLow += strlen(linkage_get_word(linkage, i));
}
//
// No NULL links but still an error , mark the whole sentence bad.
......@@ -12,7 +12,7 @@
Name: %_name-%abi_ver
Version: %ver_major.0
Release: alt6
Release: alt7
Summary: Lean and fast full-featured word processor
Group: Office
......@@ -37,6 +37,7 @@ Patch15: abiword-3.0.0-gnutls-no-libgcrypt.patch
Patch16: abiword-3.0.0-librevenge.patch
Patch17: abiword-3.0.0-libebook.patch
Patch18: abiword-3.0.0-link-grammar-5.patch
Patch19: abiword-3.0.0-link-grammar-5-second.patch
Obsoletes: abisuite, abisuite-koi8, abisuite-cp1251, abisuite-iso8859-8
Conflicts: %_name %_name-light
......@@ -133,6 +134,7 @@ Python bindings for developing with AbiWord library
%patch16 -p0 -b .librevenge
%patch17 -p1 -b .libebook
%patch18 -p1 -b .link-grammar-5
%patch19 -p1 -b .link-grammar-5-second
%build
find plugins -name Makefile.am | sed 's|.am$||g' > plugin-makefiles.m4
......@@ -202,6 +204,9 @@ install -p -m 0644 -D %SOURCE13 %buildroot%_datadir/mime/packages/abiword.xml
%python_sitelibdir/gi/overrides/*
%changelog
* Tue Dec 02 2014 Yuri N. Sedunov <aris@altlinux.org> 3.0.0-alt7
- updated fedora patches for link-grammar-5 support
* Sun Jun 29 2014 Yuri N. Sedunov <aris@altlinux.org> 3.0.0-alt6
- new python-module-abiword subpackage (ALT #30134)
- e-d-s support enabled
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment