Fix for link-grammar 5.
This commit is contained in:
parent
c241d3fdb1
commit
cf47a0938b
43
abiword-3.0.0-link-grammar-5.patch
Normal file
43
abiword-3.0.0-link-grammar-5.patch
Normal file
@ -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.
|
@ -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 <limburgher@gmail.com> - 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 <rel-eng@lists.fedoraproject.org> - 1:3.0.0-9
|
||||
|
Loading…
Reference in New Issue
Block a user