From cf47a0938ba543d09707c863a1be5088a5b463c0 Mon Sep 17 00:00:00 2001 From: Jon Ciesla Date: Jun 27 2014 18:18:49 +0000 Subject: Fix for link-grammar 5. --- diff --git a/abiword-3.0.0-link-grammar-5.patch b/abiword-3.0.0-link-grammar-5.patch new file mode 100644 index 0000000..bd91735 --- /dev/null +++ b/abiword-3.0.0-link-grammar-5.patch @@ -0,0 +1,43 @@ +--- 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 @@ + } + 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_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 @@ + } + pErr = new AbiGrammarError(); + } +- iHigh = iLow + strlen(sentence_get_nth_word(sent, i)); ++ iHigh = iLow + sentence_link_cost(sent, i); + pErr->m_iErrLow = iLow + iOff -1; + pErr->m_iErrHigh = iHigh + iOff -1; + if(pErr->m_iErrLow < 0) +@@ -188,7 +188,7 @@ + // + // Expand the sqiggle + // +- iHigh = iLow + strlen(sentence_get_nth_word(sent, i)) + iOff; ++ iHigh = iLow + sentence_link_cost(sent, i) + iOff; + pErr->m_iErrHigh = iHigh; + if(pErr->m_iErrHigh < totlen-1) + { +@@ -197,7 +197,7 @@ + pErr->m_iWordNum = i; + } + } +- iLow += strlen(sentence_get_nth_word(sent, i)); ++ iLow += sentence_link_cost(sent, i); + } + // + // No NULL links but still an error , mark the whole sentence bad. diff --git a/abiword.spec b/abiword.spec index c2e7798..770e399 100644 --- a/abiword.spec +++ b/abiword.spec @@ -25,6 +25,7 @@ Patch4: abiword-3.0.0-fix-redraw.patch Patch5: abiword-3.0.0-gnutls-no-libgcrypt.patch Patch6: abiword-3.0.0-librevenge.patch Patch7: abiword-3.0.0-libebook.patch +Patch8: abiword-3.0.0-link-grammar-5.patch BuildRequires: autoconf BuildRequires: automake @@ -114,6 +115,7 @@ Python bindings for developing with libabiword %patch5 -p1 -b .nogcrypt %patch6 -p0 -b .librevenge %patch7 -p1 -b .libebook +%patch8 -p1 -b .link-grammar-5 # setup abiword documentation %setup -q -T -b 1 -n abiword-docs-%{version} @@ -202,7 +204,7 @@ fi %changelog * Tue Jun 24 2014 Jon Ciesla - 1:3.0.0-10 -- Rebuild for new link-grammar. +- Rebuild for new link-grammar, with patch for API change. - Add librevenge BuildRequires, modified patch for current librevenge header placement. * Fri Jun 06 2014 Fedora Release Engineering - 1:3.0.0-9