Monthly Archives: February 2012

Accumulating dictionaries in Python

I often have a need to count tokens in a corpus. In Python, there are many ways to do this, but currently I most often use defaultdicts: 123d = defaultdict(int) for x in sequence:   d[x] += 1 I would like to get rid of the for-loop and construct such a dictionary at once. I [...]

Posted in Programming, Software | Tagged , , | Leave a comment

Hulden and Bischoff, similar implementation

I just came across a paper for doing non-concatenative morphology with an implementation remarkably similar to my own. This paper by Mans Hulden and Shannon Bischoff uses unification of three different morphotactic constraints (unification, exclusion, coercion) in lexical rules to deal with co-occurrence restrictions and 4 different operators for modelling morpheme ordering (precedes, immediately precedes, [...]

Posted in phd-updates | Tagged | Leave a comment