Author Archives: goodmami

Python One-Liner: Getting Only the First Match in a List Comprehension

Python’s list comprehensions are great, but I’ve found a new (to me) use of them: iterating over a list and returning the first match when there might be multiple possible matches. (To be more accurate, my solution uses a generator expression rather than a list comprehension) In other words, I’m emulating a break statement in [...]

Posted in Programming | Tagged , | 2 Comments

RTSP Stream Dumping with VLC

I’m taking a language class at my university, and there are sound files online that we use for our homework. The sound files are streamable through some embedded Quicktime player, without the option for a direct download. So I just need to install some Quicktime plugin for my browse–screw that, I’m gonna find a way [...]

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

Time/date conversion at the command line

When I didn’t trust my mental ability to convert dates and times, I relied on online tools like http://worldtimeserver.org/, but this task can easily be done from the command line (and without an internet connection). For instance, I am now in Taipei, and I want to know what time it will be here when it [...]

Posted in Linux | Leave a comment

Background section complete-ish.

I think the draft of the background section of my morphology paper is complete. One thing that is absent is a review of position class morphology, but it may not be necessary. I also have a comment in the .tex file to review the Paradigm Function Morphology section for explanation received in Paris two summers [...]

Posted in phd-updates | 2 Comments

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 , , | 3 Comments

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

Koskenniemi’s Two-Level Morphology

I just read what appears to be Koskenniemi’s most cited article on Two-Level Morphology, and now I am reviewing my understanding before writing a summary in my paper. When Kimmo Koskenniemi worked out two-level morphology, generative phonology via context-sensitive rewrite rules were the common way of describing morphological systems. These kinds of rules were fairly [...]

Posted in phd-updates | Tagged , | Leave a comment

Morphology paper: AVM problem fixed, no new text yet

I fixed the problem I was having with avm.sty. It turned out I had some avm environments using an older style of notation which no longer worked with the 1.02 version of avm.sty. The whole document now compiles with xelatex. I also found some articles by Koskenniemi (here and here) and Karttunen, Kaplan, Zaenen (here), [...]

Posted in phd-updates | Leave a comment

Morphology paper update

Getting back into the general’s paper on morphology, I found that xelatex failed to compile it with the avm environment (using the 2006 version of avm.sty). So my current goals for the paper are: to compile the whole thing (after uncommenting the avms) do some reading, then write the background/previous-work section Koskenniemi’s 2-level automata Beesly [...]

Posted in phd-updates | Leave a comment

Simple logging in Bash scripts

I couldn’t find much mention of logging utilities for Linux shell scripting (namely Bash), so I wrote my own fairly quickly. I wanted several functions for various levels of logging (info, debug, warning, errors, etc), and a way to adjust what levels can be displayed. I followed the fairly standard convention of using numeric values [...]

Posted in Linux, Software | Tagged , , | 6 Comments