Tuesday, April 28, 2009

BlackBerry connection tip

We developed a small client application for BlackBerry phones that connects to MiaMia servers. A lot of things can be said about BlackBerry adherence to standards, but I don't want to use cuss words here. The main problem is that these phones were initially devised to serve as "corporate walkie-talkies", and only recently their design was stretched to accommodate the needs of the general public. In a nutshell, this is a hardware equivalent of Lotus Notes - a combination of lack of respect for standards and a kungfu grip on the corporate customers.

As a result, once in a while developers encounter what can be described as a "chastity belt" - when it comes to communications with external world. Look for blackberry connection problems in Google or read this frustrated rant that sums it all. And if, as a BlackBerry user, you encountered problems with MSN Messenger, IRC, or anything else - same reason.

By default, when possible and a proxy-based connection (MDS, BES, BIS) exists, BlackBerry seems to re-route all requests there. It is not at all certain that your tiny app will be allowed to go further. Chances are, it will be stopped, and possibly hang. However, there are two possibilities that should work in most cases:


  • direct TCP/IP via GPRS network
  • wireless connection

To cut the long story short, the easiest way to provide maximum coverage is to create a tiny function that will be used like this:



 protected String getDeviceSpecificUrlParameters()
{
try {
if (net.rim.device.api.system.WLANInfo.getWLANState() == net.rim.device.api.system.WLANInfo.WLAN_STATE_CONNECTED)
{
return ";deviceside=true;interface=wifi;ConnectionSetup=delayed;retrynocontext=true";
}
} catch (Exception e) {} // doesn't matter, just go elsewhere
return ";deviceside=true";
}

then call it whenever you make a connection, e.g.
 ...
Connector.open(url + getDeviceSpecificUrlParameters());
...

If your application is designed to work across different platforms (like ours), you can re-implement that getDeviceSpecificUrlParameters() for whatever platform you need.


A word of warning: if it's a brand new phone, and the access to GPRS is not configured, you may need to explain your users how to set up their APN parameters. The carrier-specific parameters can be found here, here, and here.

Tuesday, April 14, 2009

Making peace with Vista

This is not directly related to the subject of the blog, but is worth sharing, since so many people are having problems with this.

My development machine runs Windows Vista. I'm not a fan of it (probably, like the majority), but I have to eat the same food my users do. Many people experience the same phenomenon, where Vista suddenly freezes without any provocation. It gets progressively worse with time. In my case, a few days ago it came to a point where the freezing occurred every half an hour. 

I tried different things: switching off visual styles, removing the useless Windows Defender, etc. The performance improved, of course, but the freeze attacks still remained.

Finally, I found this tip. (In Vista Home Basic, it is a bit different: you need to navigate to Control Panel -> System -> Performance -> Adjust indexing options.) It all makes sense: usually in databases functional indices are paramount, and when the system builds them, everything else is secondary. The most important analogy: if an index is corrupt, all kinds of bad things are likely to happen. Except that why would we need them in a desktop OS? It turns out that the reason is the ultra-annoying search, which is a part of the Start menu. I suppose the reason for this nuisance was to show that it's no worse OS X. Well, this is dumb. The old search was fine, and those who need better capabilities, generally use something else. In Vista, as a result, a background process is indexing nearly every file in the system. Why not make the indexing a scheduled task, and fall back to un-indexed search when necessary?

After I reduced the population of files to index to the contents of Start menu only, suddenly Vista became the most stable, high-performance system I have ever seen - I kid you not! On the other hand, if you do need and like that new bloated search, or need the thumbnails, simply go and rebuild the index. Also at this opportunity review what extensions you want to index.

Oh, and of course, I assume no responsibility if you do something silly to your machine, so don't just push everything without thinking.

Wednesday, March 4, 2009

Guide to sequences uploaded

We uploaded a short guide to building and debugging the sequences. It is available at our whitepaper download page.

Friday, February 20, 2009

Carabao Language Kit 1.5.0.1 released

The version 1.5.0.1 is now available for download. Lots of changes and enhancements thanks to ongoing development of Chinese (not in the default database though).

Fixed:

  • Regression: "phantom capitalization" of re-used words
  • Regression: sequence style forcing / avoiding
  • Repositioning errors in sentences with attached tokens
  • Sequence processing in languages not using white spaces
  • Regression: single member sequence processing

Added:

  • Lattice-based processing for speech recognition and OCR application usage
  • Optional and unmapped members in sequences
  • Members in sequences which are validated but not mapped
  • Possibility to get a crosslingual representation (components only: DeepAnalyzer and Translation Server)
  • Possibility to load content from a disambiguated crosslingual representation
  • GUI in Translation Console to enable lattice-based processing
  • GUI in Translation Console to enable loading crosslingual representation
  • GUI in Translation Console to hint the system about the expected domains in the text
  • Analysis mode in Translation Console, when the source and target languages are the same and no styles are enforced / avoided
  • Capability of using the white space as a delimiter in languages that don't have white spaces
  • Smart quotes and other delimiters

Improved:

  • Dictionary GUI - presents thesaurus from another language, if missing in the current language
  • Sequence builder GUI - color coding of members which are not mapped, or contain conditions producing empty sets

Monday, December 8, 2008

Carabao Language Kit 1.2.3.0 released

The version 1.2.3.0 is now available for download.

Fixed:

  • Handling of single quotes as syntax delimiters in English

Added:

  • A segmentation mode more effectively handling languages that don't use white spaces (e.g. Chinese, Japanese, Korean, Thai). In this mode, different character classes are broken into tokens (e.g. Chinese, and then immediately English). The remaining unidentified part is run through unknown heuristic identifier.

  • Automatic conversion for Unicode clipboard data into the currently active encoding in tokens table

  • Better warning when attempting to overwrite the current token

  • A utility to rebuild semantic links cache

Improved:

  • In some systems, the table of tokens with every update was adding a new set of system icons (minimize, restore, maximize) to the MDI frame window. The maximize option now causes the window to be set roughly to the full client area, but not in maximize mode

Monday, September 8, 2008

Free source code section

We added a small source code section on our Download page, where we will post freebies for developers.

Carabao Language Kit 1.2.0.0 released

The version 1.2.0.0 is now available for download.

Fixed:

  • Unknown patterns were translated as hypernyms

  • Regression: certain category-based sequences were omitted on second execution because of a malfunctioning guess scan caching mechanism

  • In analytical mode (Carabao DeepAnalyzer), there was a mismatch between word index number and an idiom member index, in sentences with attached tokens such as 'em, 'm

  • When copying a token with 1 rule units or less, the text is always reset to the original

Added:

  • Capability to match numbers as patterns

  • When a translation is not found, the engine tries to fall back to a matching hypernym instead

  • New methods to Carabao DeepAnalyzer that enable accessing the members of the detected idioms

  • New methods to Carabao CDA that enable accessing the unknown heuristics table

  • New sequences

  • Russian morphological exceptions

Improved:

  • If an "unknown pattern" is forced to match a known word, it will not create a new guess if a guess with a same hypernym already exists. For example, if you force to check, whether a known word can be a city, a new record will not be created, if there is already a guess with a known city
    Automatic input language switching in locator fields
  • Locator fields are pre-filled with the list of all existing languages in the database, eliminating the need to jump to the next language