Begiak/awik

From Apertium
< Begiak
Revision as of 22:06, 16 December 2013 by Sushain (talk | contribs) (add first issue and wishlist)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Apertium Wiki Begiak Command

Issues

Bad message chopping

Problem: Commands such as .awik Руководство по созданию новой языковой пары result in outputs that don't contain the URL of the wiki article, i.e. the excerpt from the article is too long and the message terminates early. For example,

(3:14:31 PM) sushain: .awik Руководство по созданию новой языковой пары
(3:14:34 PM) begiak: "В этом руководстве описывается порядок создания новой языковой пары для системы машинного перевода Apertium.От вас не требуются какие-либо лингвистические знания или знания по машинному переводу, кроме как способности различать части речи (отлич

The correct behavior should be:

(3:14:31 PM) sushain: .awik Руководство по созданию новой языковой пары
(3:14:35 PM) sushain_begiak: "В этом руководстве описывается порядок создания новой языковой пары для системы машинного перевода Apertium.От вас не требуются какие-либо лингвистические знания или [...] - http://wiki.apertium.org/wiki/Руководство_по_созданию_новой_языковой_пары

Source: The excerpt to display is being chopped incorrectly due to not properly handling Unicode strings. IRC messages are limited in length not by their character length but rather their byte length. The incorrect code only truncates the article excerpt if the number of bytes after UTF-8 encoding is greater than the IRC message length minus the link's length. The problem occurs since the truncation uses the character length of the excerpt rather than the UTF-8 encoded byte length. Furthermore, a similar problem is observed in calculating the length of message remaining for the excerpt when accounting for the length of the URL.

Solution:

Wishlist

  • Search the entire Apertium wiki using the provided search functionality of MediaWiki.