Latest Posts

Word embeddings for aggression identification

The First Shared task on Aggression Identification was organised in conjunction with the First Workshop on Trolling, Aggression and Cyberbullying. The idea of the shared task was fairly simple. Classify a text in one of the following three categories: Overtly Aggressive (OAG), Covertly Aggressive (CAG) and Non-aggressive (NAG). This means that the task is essentially a standard text categorisation task and an approach based on bag-of-words is a good baseline to start with (neither me, nor the task organisers provided a baseline based on bag-of-words, so I don’t know what is the accuracy of the method). My approach for this task was to use word embeddings…
Read more

What happens if you set the position of an invisible div

The other day I wanted to allow users of the metadiscourse annotator to quickly locate in text the marker they tag. This is particularly important if the text contains many markers. When the user presses a button I wanted the following effect: It seemed quite simple to implement it: Create a hidden div which contains the pointer Place the div at the correct location (i.e. next to the marker) Show the div and animate using jquery. Hide it at the end of the animation. The implementation was quite simple and worked almost from the first attempt. I was very happy….
Read more

Ajax calls stopped working in my Symfony 2.8 application

Update: One day after I wrote this post, version 2.8.36 was released to fix this problem. It seem that other versions of Symfony were also affected. If you are interested in this problem, read on. If you are affected by it, you should upgrade, not use the fix from here. Last night I implemented a few improvements in the Metadiscourse annotator which I am developing in my spare time. (I rewrote several functions that cut the running time of two actions from minutes to seconds … but that’s for a different post, maybe …). I tested the new code on my development…
Read more

Overriding the location for cache and logs in Symfony

A while ago I decided to move the projects I am working on to Dropbox. There are several reasons, but the main one is that in this way I could easily work on them using different computers with similar setup. I even setup up git and everything works fine. Most of these projects are in PHP using Symfony. However, one of the annoying things with this setting is that Dropbox had to synchronise continuously the logs and cache. Once, I even run out of space when the log grew too big. The documentation for Symfony explains how to override the…
Read more

Dependencies not installable in SensioLabsInsight

I analyse my Symfony applications using SensioLabsInsight. The reports I receive are not always useful, but many point to various problems that should be considered. SensioLabInsight integrates with GitHub so you can get an analysis with each commit without doing anything. That’s definitely a nice feature. One of the errors I had from the beginning was a critical error “Dependencies not installable”. The problem is caused by a “Connection refused” error that had not much to do with my code.

Problems running NetBeans in Fedora

I am not quite sure when the problem began, but at some point I noticed that the tabs do not look good when I run Netbeans in Fedora. and they look like in this screenshot. This was happening for sure in Fedora 24 and I see it again in Fedora 25, with both NetBeans 8.1 and 8.2. Initially I dismissed it as a cosmetic annoyance, but at times it became a problem because it is not easy to select the tabs anymore. I tried to find the root of the problem and it seems to be linked to the GTK theme that comes…
Read more

Word2Vec made simple

I recently came across a GitHub repository which demonstrates how to train and use Word2Vec. Given the massive interest in deep learning and word embeddings, there are many similar tutorials out there. The nice thing about this particular one is the fact that it is prepared as Jupyter Notebooks which makes it easy to follow the tutorial and make changes to the code. I have to admit that it also gave me a very good excuse to play with technologies such as anaconda and Jupyter Notebooks. The same author published another GitHub repository which discusses the Word2Vec at a slower pace and provides slightly…
Read more

Burning an iso image onto a USB in Linux? Easy task …

… well, sadly it turns out that it’s not that easy. I recently bought an SSD in an attempt to revive a bit my old desktop which obviously suffers because of slow disk access. At the same time I also wanted to switch away from Ubuntu. I am not going to rant here why move away from Ubuntu after using it so many years, but one of the reasons can be seen below. I downloaded the ISO image of the latest Fedora and I wanted to burn it onto a USB stick, so I can install it from there. Being in…
Read more

Composer ‘out of memory’ error

I deal with several projects that are written in PHP using the Symfony framework. One of the regular tasks I have to do is to deploy the applications on the production servers. For more than one year I have been successfully using capifony, which after the initial tweaking worked without a problem till last night. The problem was not because of capifony, but it was caused by composer: I noticed that I was getting the same error on my development machine as well. This was completely independent from my attempts to deploy the project. On the development machine the fix was quite…
Read more