{"id":761,"date":"2007-01-26T19:42:20","date_gmt":"2007-01-26T19:42:20","guid":{"rendered":"http:\/\/software.sil.org\/wesay\/?p=761"},"modified":"2017-04-26T19:53:58","modified_gmt":"2017-04-26T19:53:58","slug":"multilingual-option-lists","status":"publish","type":"post","link":"https:\/\/software.sil.org\/wesay\/multilingual-option-lists\/","title":{"rendered":"Multilingual Option Lists"},"content":{"rendered":"<p>Any dictionary program needs to help the user be consistent when entering field that have a closed set of values, e.g. parts of speech.<\/p>\n<p><a href=\"..\/..\/fieldworks\" title=\"\" class=\"external\">FLEx<\/a> calls these <em>Possibility Lists<\/em>, <a href=\"..\/..\/toolbox\" title=\"\" class=\"external\">Toolbox<\/a> has <em>Range Sets<\/em>. WeSay offers is something somewhat different, and yet another name (sorry).<\/p>\n<p><em>Option Lists<\/em> are multilingual, and they \u201cfall back\u201d to other languages if there isn\u2019t a value in the language you\u2019ve set it up to show. Here, I\u2019ve set it up to show POS in Thai, but so far only noun and verb have Thai values. <a href=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070126_094824953.png\" rel=\"lightbox\"><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070126_094824953.png\" alt=\"Parts of Speech (POS) option list\" title=\"Parts of Speech (POS) option list\" \/><br \/>\n<\/a><\/p>\n<p>A big thing we work at is forcing our programmer minds to give up on always having \u201cgood data\u201d. For example, what if you send your dictionary to someone else, who has a different <code>PartsOfSpeech OptionList<\/code> installed? Say, you had a pos named \u201cblah blah blah\u201d and then tried to open lexicon up on a machine that didn\u2019t have this pos. What should WeSay do? Show an error box? Not if we can help it. Say everything referenced in the lexicon must be in one large file? That may be hard to share with colleagues. We\u2019ve chosen to use a <em>human readable key<\/em> that indexes into a richer set of multilingual data. If that data is missing, we do the best we can. This screenshot shows how WeSay will still show the <em>key<\/em> of the offending item, but mark it in red. <a href=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070126_0910075001.png\" rel=\"lightbox\"><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070126_0910075001.png\" alt=\"Missing POS highlighted red\" title=\"Missing POS highlighted red\" \/><br \/>\n<\/a><\/p>\n<p>Finally, there is nothing in WeSay yet that really knows about Parts of Speech. They are just a custom field. So you could add something your language needs, like <a href=\"http:\/\/en.wikipedia.org\/wiki\/Classifier_%28linguistics%29\" title=\"\" class=\"external\" target=\"_blank\" rel=\"noopener\">classifiers<\/a> or <a href=\"http:\/\/en.wikipedia.org\/wiki\/Noun_class\" title=\"\" class=\"external\" target=\"_blank\" rel=\"noopener\">noun classes<\/a>.<\/p>\n<p>Part Of Speech is now available in the default template used by new projects.<\/p>\n<h2>Some Nitty-Gritty Details for Techies<\/h2>\n<p>We are trying to make do with \u201chuman readable keys\u201d rather than <a href=\"http:\/\/www.google.com\/url?sa=t&amp;ct=res&amp;cd=1&amp;url=http%3A%2F%2Fen.wikipedia.org%2Fwiki%2FGlobally_Unique_Identifier&amp;ei=Y2e5Rd3ZII_msAKH_qVz&amp;usg=__TNuk9mYdbb0XYhvojVThRoYiiA0=&amp;sig2=vz5sYUKBDExmXoCz2mpOXg\" title=\"\" class=\"external\" target=\"_blank\" rel=\"noopener\">GUIDs<\/a>. We use the key to look up stuff about the option, like how to show it in Spanish or what to show for an abbreviation of it. If the list is lost, the key is at least readable.<\/p>\n<p>This is also our foray into \u201ccustom fields\u201d, which I\u2019ll blog more about some day. The pos field shown above was defined with this XML: <a href=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070125_1705550001.png\" rel=\"lightbox\"><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070125_1705550001.png\" alt=\"Custom Fields XML\" title=\"Custom Fields XML\" \/><br \/>\n<\/a><\/p>\n<p>and the list of options is in a file that looks like this: <a href=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070125_1707444371.png\" rel=\"lightbox\"><br \/>\n<img decoding=\"async\" src=\"\/wp-content\/uploads\/sites\/35\/2017\/04\/20070125_1707444371.png\" alt=\"Options List XML\" title=\"Options List XML\" \/><br \/>\n<\/a><\/p>\n<div class=\"top border\"><a href=\"#top\">top<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Any dictionary program needs to help the user be consistent when entering field that have a closed set of values, e.g. parts of speech. FLEx calls these Possibility Lists, Toolbox has Range Sets. WeSay offers is something somewhat different, and yet another name (sorry). Option Lists are multilingual, and they \u201cfall back\u201d to other languages [&hellip;]<\/p>\n","protected":false},"author":26,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[10],"tags":[],"class_list":["post-761","post","type-post","status-publish","format-standard","hentry","category-news"],"acf":[],"_links":{"self":[{"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/posts\/761","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/users\/26"}],"replies":[{"embeddable":true,"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/comments?post=761"}],"version-history":[{"count":3,"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/posts\/761\/revisions"}],"predecessor-version":[{"id":764,"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/posts\/761\/revisions\/764"}],"wp:attachment":[{"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/media?parent=761"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/categories?post=761"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/software.sil.org\/wesay\/wp-json\/wp\/v2\/tags?post=761"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}