Friday, November 19, 2010

New iPhone dictionary release

We got this one out the door ahead of schedule for once, but it contains some long awaited features. This release has been about making the dictionary more friendly as an iOS application, making day-to-day usage faster and easier.

First up is support for rotation and landscape mode. This really has been an oversight on our part and is now finally done :D

Second is the support for iOS 4 features, primarily multitasking. Multitasking is a great boon for the dictionary. It is now easy to access while browsing, listening to podcasts, reading pdfs, etc.

We've also added a copy button on the detail page for quick copying of the Arabic and English word to the pasteboard.

There's now an overlay over the word table when there are nothing to display from the dictionary. We think this is a bit better than just having an empty list.

We also wanted to automatically switch to the Arabic keyboard for you when switching to the dictionary. This is currently not possible due to restrictions in the iPhone operating systems. Maybe some day in the future though ;)

Hope you enjoy this release! We're now back to planning some cool new features more concerned with the Arabic language.

Support mail outage

Regrettably our mail service went down two weeks ago, and since I was out traveling most of that time it took quite some time to get it back up again.

It should all be back in order now. But if you've tried to contact the support email address and not received a response please contact us again!

Thursday, April 29, 2010

Multivariate Newtons method in Mathemathica

Using the previously mentioned Jacobian function, here's a way to do Newton's method in multiple variables.

Here's a simple vector valued function:

In: f[{x_, y_}] := {x^2 y + 1, E^x + y}


The Jacobian:

In: jacobian[f, {x, y}]

Out: {{2 x y, x^2}, {E^x, 1}}


To construct a Jacobian function that we can evaluate we have to create a Mathematica. To evaluate the derivatives in place we use other vector component names and replace them after calculating the derivative:

In: df[{x_, y_}] := jacobian[f, {a, b}] /. {a -> x, b -> y}


With the Jacobian function it's easy to set up the iteration with FixedPointList and an anonymous function:

In: FixedPointList[(# - Inverse[df[#]].f[#]) &, {-0.7, -2.5}, 20]

Out: {{-0.7, -2.5}, ... , {0.703467, -2.02075}}


-a

Jacobian function for Mathematica

Following up on the vector valued functions, here's a way to compute Jacobian matrices for them:

In: jacobian[f_, c_] := Transpose[Map[D[f[c], #] &, c]]


You need to pass in a list of components for the vector argument along with the vector valued function:

In: f[{x_, y_}] := {2 x^2 y, x*y}


In: jacobian[f, {x, y}]


Out: {{4 x y, y}, {2 x^2, x}}


-a

Tuesday, April 27, 2010

One way to use vector valued functions in Mathematica

Struggling with some homework recently, I needed to do iteration on vector valued functions to find fix points. One way to do this is to pass a list/vector with the components as function arguments, and return the list/vector valued result.

For example:

f[{x_, y_}] := {1.01 x - 3*10^-5*x*y, 0.98 y + 10^-5*x*y}


The fix point iteration can then be handled by FixedPointList:


FixedPointList[f, {1000, 100}, 1000]


Plotting the result componentwise:


ListLinePlot[{%%[[All, 1]], %%[[All, 2]]}]


Sunday, April 18, 2010

Spurious corpus failures in IMS Corpus Workbench

At the moment I'm working with Open CWB, also known as the IMS Corpus Workbench. The last couple of days I was getting a lot of corpus errors seemingly for no reason:

[no corpus]> E
Warning:
Data access error (CL: can't load and/or create necessary data)
Perhaps the corpus E is not accessible from the machine you are using.
CQP Error:
Corpus ``E'' is undefined

Looking at the corpus registry, the cwb-encode command evidently had stored the corpus data and info locations as relative paths. Consequently the corpus would only work if cqp was invoked in the same directory as it was encoded from.

So if you give relative paths when running cwb-encode, make sure to fix up the HOME and INFO lines in the registry file afterwards!


-a