Adobe Globalization at MT Summit XIII

This article was originally written in English. Text in other languages was provided by machine translation.

Members of Adobe’s Translation Technology Team are currently getting our visas in order, because we are headed to China later this month!  We will be presenting some of our recent work at the Machine Translation Summit, held September 19-23 in Xiamen, China.

MT Summit is the major conference for the MT industry.  Held every other year, the conference rotates between the Americas, Europe, and Asia.  This year the hosting duties fall to the Asia-Pacific Association for Machine Translation, and the conference is being held on the scenic campus of the Xiamen National Accounting Institute

Adobe is well represented on the conference’s schedule.  On Wednesday, I will be presenting on our strategy for increasing the use of MT within Adobe, and on Thursday, my colleague Jeff Rueppel will present a demo of some tools we have been developing to simplify the use of the Moses open-source MT package.

Furthermore, this summer we have been extremely fortunate to host a summer intern, Yifan He from the Centre for Next-Generation Localisation (CNGL) in Dublin. Yifan appears multiple times on the MT Summit schedule — co-teaching a tutorial and presenting a paper as well as a poster.  We attribute his spectacular showing to a combination of his natural brilliance and Adobe’s nurturing atmosphere.  Great job, Yifan!

If you plan to be at the conference, please come find us!  We are always eager to hear about other people’s experiences with MT, especially in the corporate setting.  See you in Xiamen!

Posted in English, Events | Tagged , , | Leave a comment

Invoking ICU from Adobe AIR Applications

This article was originally written in English. Text in other languages was provided by machine translation.

Adobe Flash and AIR are ubiquitous platforms to develop rich internet applications. Flash is used for browser based applications and AIR is used for developing native platform applications. Both platforms have considerable support for globalization. Globalization enablement features like locale aware formatting/parsing, collation, case transforms, localization and multi-lingual text rendering are supported by both these platforms. But some more globalization features like text normalization, transliteration, Unicode character properties, encoding conversions, charset detections, Unicode string utilities etc are still missing in the Adobe AIR and Flash platforms. One of the primary reasons for not adding all these features inside the Adobe runtime platforms is the size of the software.

To overcome the size limitation issue, Adobe AIR and Flash can invoke the services of external dynamic libraries through ActionScript. There are some well known external libraries which have rich globalization support like ICU, GNU glib, Verisign IDN library to name a few. Fortunately the upcoming Adobe AIR 3.0 (now available as Adobe pre-release) has a wonderful feature called ActionScript native extensions, which is about ActionScript programming interface for a native code library like MS Windows DLL, Os X FrameWork, Android JAR or shared library or iOS static library. Please see Adobe AIR3 beta site http://labs.adobe.com/technologies/flashplatformruntimes/air3/ on how to download and take part in the Adobe AIR pre-release. Please make a note that this native extensions feature is available _only_ in Adobe AIR platform, not in the Flash platform.

In this blog, I demonstrate a sample (Download air_icu ) application to invoke ICU from an Adobe AIR application on Windows platform. Readers are reminded that this is only illustration sample software and by no means production quality software. Hence readers must exhibit discretion in using this software as it is. The sample illustrates ICU word breaking, sentence breaking, utf-conversion and Unicode character property verification.

You will need the following software to build an ICU extension for AIR platform.

1         Building ICU extension for Adobe AIR

Adobe AIR t native extensions, also known as ‘ane’ or ‘ANE’ files are archived packages. These consist of

  • ActionScript wrapper classes calling into external DLLs
  • The external DLLs
  • XML file describing details of external DLLs

The archived ANE files are used just like SWC libraries in integrating into an AIR application. In other words, ANE file is a library and it has public ActionScript APIs.

Covering all details about the ActionScript extension is too much for this blog article, but I will explain the steps to build this sample and run. Below are the sequential steps and commands.

1.1       Building Windows AIR ICU Extension DLL

1)      The AirIcuExtensionWin folder has the Visual studio solution ‘AirIcuExtension.sln’. Open this in MS VS2010.

2)      The file AIRIcuExtension.cpp has the necessary code needed to interface with Adobe AIR 3 beta 2. It also has the wrapper routines calling ICU C functions.

3)      This is a DLL project and the build output is AirIcuExtension.dll

1.2       Building ActionScript Library

1)      Build the actionscript library using the below command.

C:\Flex4.5.1\bin\compc.exe -source-path src -include-classes com.adobe.extensions.AirIcuExtension  -external-library-path C:\air3_beta2\frameworks\libs\air\airglobal.swc -output bin\AirIcuExtension.swc

The file AirIcuExtension.as in the folder src\com\adobe\extensions has the public class AirIcuExtension which calls the ICU routines. In this sample, calling ICU sentence breaker, word breaker, normalizer, utf-conversion and Unicode character property have been illustrated.

1.3       Packaging ActionScript native extension

Open the bin\AirIcuExtension.swc is a zipped archive. Open it using WinRAR or WinZip program and extract the library.swf file in the swc package into the AirIcuExtension/bin folder.

The folder src\resources contains file extension.xml, AirIcuExtension.dll and ICU dlls icudt48.dll, icuuc48.dll, icuio48.dll and icuin48.dll. The file external.xml defines the external library details to AIR runtime.

For simplicity, place the AirIcuExtension.dll, ICU dlls and extension.xml files in AirIcuExtension\bin folder. All these files are packaged into a zipped archive called AiricuExtension.ane using the following command.

C:\air3_beta2\bin\adt -package -storetype pkcs12 -storepass <passwd> –keystore <AIR certificate> -tsa none -target ane AirIcuExtension.ane extension.xml -swc AirIcuExtension.swc -platform Windows-x86 library.swf AirIcuExtension.dll icudt48.dll icuin48.dll icuio48.dll icuuc48.dll

Using Adobe FlashBuilder4.x or  C:\air3_beta2\bin\adt program, one can make an AIR certificate.

The output is an archive file AirIcuExtension.ane in the AirIcuExtension/bin folder.

1.4       Building the Test program AirIcuExtensionTest.mxml

Now that we built and packaged the native extension package AiricuExtension.ane, we are readu to use this and call ICU services in a test program.

The folder AirIcuExtensionTest\src contains the test file AirIcuExtensionTest.mxml. The descriptor file AirIcuExtensionTest-app.xml has  the details of native extension. Using the mxml compiler, AirIcuExtensionTest.swf is built as follows in AirIcuExtensionTest folder.

C:\Flex4.5.1\bin\compc.exe\mxmlc +configname=air -external-library-path ..\AirIcuExtension\bin\AirIcuExtension.ane -output bin-debug\AirIcuExtensionTest.swf — src\AirIcuExtensionTest.mxml

The output swf file AirIcuExtensionTest.swf is placed in the bin-debug folder.

1.5       Building AIR package for executing AirIcuExtensionTest

The final step is to package the above AirIcuExtensionTest .swf and AirIcuExtension.ane files into an AIR executable folder.  Execute the following command

C:\air3_beta2\bin\adt -package -XnoAneValidate -storetype pkcs12 -storepass <passwd> –keystore <AIR certificate> -tsa none -target bundle AirIcuExtensionTest.air AirIcuExtensionTest-app.xml AirIcuExtensionTest.swf -extdir ..\..\AirIcuExtension\bin

The output of the above command is a folder AirIcuExtensionTest.air. Inside the folder, there is AirIcuExtensionTest.exe. You can execute and see the output.

2         Conclusion

The sample illustrated how to invoke ICU from ActionScript. The AIR ICU extension is easy to build using the publicly available Adobe Flex SDK and AIR3 Beta 2 SDKs. It will be much easier to do all this in the future Adobe Flash Builder IDE using GUI. The advantages of this feature are

  • AIR developers looking to develop international applications for desktop or mobile have the full power of ICU at hand. Many Unicode features, encoding conversions, IDN conversion utilities, string processing, transforms and many more international features can be easily coded.
  • The native ICU extension once built can be used any any developer as it is a library.
  • The Actionscript APIs calling ICU can be coded using the same signatures as ICU C++ API. This eliminates the learning curve.
  • Since ICU is in native code, performance is not compromised.
  • Since it is ICU, developers can expect cross-platform behavior in AIR programs.
  • Since the extension is a AIR library, ICU updates can be easily re-packaged in to the ane file.

In the future once AIR3 is released, a full fledged ICU native extension with proper API definitions will be a great globalization project.

Posted in English, Technology, Tutorials | Tagged , , | 18 Comments

CS5.5 trials now available in additional languages

This article was originally written in English. Text in other languages was provided by machine translation.

You may now download Win/Mac trials of CS5.5 in your language:

Enjoy!

 

Posted in English, Product announcements | Tagged , , , , , , | Leave a comment

A lightweight auto-complete ActionScript example with a trie

This article was originally written in English. Text in other languages was provided by machine translation.


Auto-complete functionality is used widely over the internet and mobile apps. A lot of websites and apps try to complete your input as soon as you start typing.  In this post, I would like to introduce a simple ActionScript auto-complete solution by using trie data structure.

A trie is an ordered tree data structure that is used to store an associative array. All the descendants of a node have a common prefix of the string associated with that node, and the root is associated with the empty string. Starting from the root node, you can check if a word exists in the trie easily by following pointers corresponding to the letters in the target word. Trie is a well-known data structure in computer science; you can find the detailed information about trie through Wikipedia.

Here is a simple trie implementation in ActionScript:

/**
* An simple data structure to store and look up words.
* @see http://en.wikipedia.org/wiki/Trie for additional details.
*/

public class Trie {
private var _rootKeys:Array;
public function Trie():void {
_rootKeys=[];
}

/**
* Return a list of words which have the given prefix.
*/

public function get(prefix:String):Array {
var results:Array=[];
var letter:String=prefix.substr(0,1);
var root:TrieNode=_rootKeys[letter];
if (root) {
getWordList(prefix, 1, root, results);
}
return results;
}

/**
* Add a word to the object which can be matched as a prefix.
*/

public function add(word:String):void {
var letter:String=word.substr(0,1);
var root:TrieNode=_rootKeys[letter];


if (!root) {
root=createNode(letter);
_rootKeys[letter]=root;
}
insertWord(word, 1, root);
}


private function traverse(root:TrieNode, results:Array, prefix:String):void {
if(root.children) {
for each( var c:TrieNode in root.children ) {
var node:TrieNode = c as TrieNode;
if( node.word ) {
results.push( prefix + node.value);
}
traverse(node, results, prefix+node.value );
}
}
}


private function getWordList(prefix:String,
position:uint,
root:TrieNode,
results:Array):void {
var letter:String=prefix.substr(position,1);
var child:TrieNode=root.children[letter];
if (!letter || !child) {
return;
}


if ( position<(prefix.length-1) ) {
getWordList(prefix, ++position, child, results);
}else {
if (!child.word) {
traverse( child, results, prefix);
}
}

}


private function insertWord(word:String,
position:uint,
root:TrieNode):void {
var letter:String=word.substr(position,1);
if (position==word.length || !letter) {
return;
}


var child:TrieNode=root.children[letter];
if (! child) {
child=createNode(letter);
root.children[letter]=child;
}


if (position==word.length-1) {
child.word=true;
} else {
insertWord(word, ++position, child);
}
}


private function createNode(letter:String):TrieNode {
return new TrieNode(letter,false);
}
}

Posted in English, Libraries, Technology, Tutorials | Tagged , , | Leave a comment

Format date and time in non-Gregorian calendars

This article was originally written in English. Text in other languages was provided by machine translation.

Although the Gregorian calendar is the most used civil calendar, there are other calendars used in different countries and regions.

Islamic calendar is used in many Islamic countries and it has quite a few variances. Japan uses the imperial calendar which identify the year with an era name(年号, nengō) and a number. Thailand uses a calendar that counts in the Buddhist era.

With flash.globalization package, you can easier format a date in non-Gregorian calendars. See the code below.

Posted in English, Libraries, Technology | Tagged , , , , | Leave a comment

Adobe Story now available on Prerelease Interest Form

This article was originally written in English. Text in other languages was provided by machine translation.

Adobe Story, arguably the most powerful script writing in the world got just better for all it’s international users. At present it is shipped in French, German, Italian and Spanish, besides English.

For the all active Adobe Story user community, we are very happy to announce that you can express your interest to join the Adobe Story Prerelease program. So if you are interested to try out Adobe Story in the above mentioned 4 languages then register your interest at Adobe Prerelease Interest Form.

Please note we don’t guarantee any invites yet and it will depend on how much interests we receive.

Vinay Krishan Sharma
Localization Program Manager

Posted in English, Product announcements | Tagged | Leave a comment

Our blog goes multilingual!

This article was originally written in English. Text in other languages was provided by machine translation.

Today we’re rolling out some really cool multilingual functionality in our blog.

Thanks to a WordPress plug-in from Transposh, we are now able to provide translations in various languages for each of our blog posts, which can be easily selected through a simple language-switching mechanism, which you can find on the right sidebar of this page:


Up until now, we tried to reach many of our international customers by maintaining separate blog sites for each language. With the new functionality, we can now serve content in multiple languages in the same location.

For the moment, these are machine translations, which we all know are rarely perfect. But fortunately it’s also possible for readers to contribute better translations (you need to register with us first):

What I find really appealing with this new functionality is that original posts can be in any language, not just English. For example, we have some posts in Brazilian Portuguese, Spanish, Korean and Chinese. These can now be translated into any other available language, including English.

I have seen very few blogs that are multilingual. Our team is certainly the first one at Adobe to do so. Also, I believe we are one of the first multilingual corporate blogs.

I’m curious to see how this will be received by our community of readers. We’re starting with just a handful of languages. If you want to see it in other languages, let us know.

Try it out and let us know what you think.

Leandro Reis
Sr. Globalization Program Manager

Posted in English, General announcements | Tagged , | Leave a comment

Adobe Wish Form Now Available to International Users

This article was originally written in English. Text in other languages was provided by machine translation.

The wish form hosted at Adobe.com is now available to all our international users. We recently added two new fields for you to specify your ‘Product Language’ and ‘OS Language’ along with other information in this form.

Feel free to submit your bugs and feature requests to Adobe using this form. This form is also localized in Japanese, Korean, Simplified Chinese and Traditional Chinese.

Avinash S. Kotwal
International Program Manager

Posted in English, General announcements | 2 Comments

Difference between Flex SDK’s Matching Collator and Sorting Collator

This article was originally written in English. Text in other languages was provided by machine translation.

Flex SDK has two kinds of collators. Do you know the differences?

First of all, let me explain what a Collator is. The Flex SDK Collators are classes that are designed to compare two strings. Their compare functions return a numeric value to tell which of the two items is smaller or larger.

Here is an example:

<fx:Declarations>
    <s:SortingCollator id="c1"/>
    </fx:Declarations>
    <s:VGroup>
        <s:TextInput id="uiInput1" text="ABC"/>
        <s:TextInput id="uiInput2" text="ABC"/>
        <mx:Text id="uiOutput" text="{c1.compare(uiInput1.text, uiInput2.text)}"/>
    </s:VGroup>

This example shows 0 as the compare result by default. As you alter the inputs, the result becomes -1 if the first input is smaller or 1 if larger. See the screenshots below.

 width=

 width=

 width=

The difference in sorting

Now, let’s talk about the differences of Matching and Sorting Collators. Actually, they are essentially same but they have given some specific initial collation parameters good for general string matching (MatchingCollator) or parameters good for general string sorting (SortingCollator). Example below illustrates why two different collators are useful.

Assume you have following items in your Array. You want to sort the items and find a specific string from the items.

  • naïve
  • Naïve
  • NAÏVE
  • naive
  • Naive
  • NAIVE
  • adolescent
  • youthful

If you sort items using a SortingCollator class with “en_US” (English spoken in U.S.) locale, you get following sort result.

  • adolescent
  • naive
  • Naive
  • NAIVE
  • naïve
  • Naïve
  • NAÏVE
  • youthful

This ordering makes sense for most usages. (At least that is what we have hoped.) Lowercase letters come first over upper cases; letters without accent come first over ones with accent.

On the other hand, if you sort the items using a MatchingCollator, you get following result. (Result may vary as some attributes are ignored.)

  • adolescent
  • Naïve
  • NAÏVE
  • naive
  • naïve
  • NAIVE
  • Naive
  • youthful

You may notice that upper/lowercase ordering and accent character ordering are not consistent with a MatchingCollator class. In fact, the MachingCollator class is not designed for sorting.

The difference in matching

Now, assume you want to search a specific string, “naive“, from the list. With a SortingCollator class, you get following result:

  • naive

Yes, only one string with a SortingCollator class.

On the other hand, with a MatchingCollator class, you get following result.

  • Naïve
  • NAÏVE
  • naive
  • naïve
  • NAIVE
  • Naive

As you can see, the string comparison was done in more lenient manner with MatchingCollator class. Often such leniency is desired when searching strings.

Although SortingCollator and MatchingCollator behave differently as you have seen above, those classes are pretty much same underneath. In fact, they can mute to the other sibling by setting their properties. If you need to control more details of sorting/matching behavior, you also manipulate the properties. Please see the Flex SDK references for more details.

References

The example program used in this article

<?xml version="1.0" encoding="utf-8"?>
   <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
   >
   <fx:Declarations>
      <s:SortingCollator id="sortingCollator" locale="en_US"/>
      <s:MatchingCollator id="matchingCollator" locale="en_US"/>
      <s:Sort id="sort"/>
      <s:ArrayCollection id="arrayCollection" sort="{sort}" source="{wordList}"/>
   </fx:Declarations>
   <fx:Script>
      <![CDATA[
         private static const wordList:Array = [
            "naïve", "Naïve", "NAÏVE",
            "naive", "Naive", "NAIVE",
            "adolescent", "youthful" ];
         private function setCollator(useSortingCollator:Boolean):void
         {
            const collator:Object = useSortingCollator ?
            sortingCollator : matchingCollator;
            sort.compareFunction = function (a:Object, b:Object, fields:Array):int
               { return collator.compare(a as String, b as String); }
            arrayCollection.refresh();
            uiResult.text = "Sort Result:\n" + arrayCollection.toString();
            uiResult.text += "\n\nStinrgs equal to 'naive' are:\n";
            for (var i:uint = 0; i < arrayCollection.length; i++)
            {
               if (!collator.compare(arrayCollection[i], "naive"))
               uiResult.text += arrayCollection[i] + "\n";
            }
         }
      ]]>
   </fx:Script>
   <s:VGroup paddingTop="20" paddingBottom="20"
         paddingLeft="20" paddingRight="20" height="100%">
      <s:Button label="Use SortingCollator" click="setCollator(true)"/>
      <s:Button label="Use MatchingCollator" click="setCollator(false)"/>
      <s:TextArea id="uiResult" height="100%"/>
   </s:VGroup>
    </s:Application>

Posted in English, Technology | Tagged , | Leave a comment

More content into more languages!

This article was originally written in English. Text in other languages was provided by machine translation.

With all the internet chatter about Google’s decision to end their free machine translation (MT) API and transition to a paid service, some of you may be curious what role machine translation plays at Adobe.

Adobe does not currently integrate Google’s API into any products so we are not directly affected by this change. But we do license machine translation technology from commercial vendors and we are actively investigating ways to leverage MT throughout the company.

Adobe has a market presence in over 30 different languages, so any bit of documentation produced in English potentially multiplies out to a considerable cost if translated into all of those languages. Likewise, every day the company receives incoming communication in the form of emails, testing feedback, and customer service inquiries in even more languages!

To help manage this communication both directions, the Globalization Group at Adobe has turned to machine translation technology. The first step has been to insert MT into the document translation process. Instead of sending documentation out for translation from scratch, we first run the text through MT engines that have been customized for Adobe terminology, and then have our translators post-edit the output. Doing so, we see a speed-up of up to 50% with greater terminological consistency.

Right now, about 20 products are using MT for at least one language — including Photoshop, Acrobat, and Illustrator — and the list is expanding each month.

And the story doesn’t end there!  We are actively working on other ways to leverage MT to improve our ability to serve and communicate with a worldwide audience. Watch this blog as we gradually roll out new initiatives in the coming months!

– Raymond Flournoy
Senior Program Manager, MT Initiatives
Translation Technology Team

Posted in English, General announcements, Technology | Tagged , , | 2 Comments