NLeSC/xtas — pull request #57 by vanatteveldt (2014-05-08 10:37:33+00:00)
Title: Add semafor

- Added semafor semantic tagger
- Added task in xtas.tasks.single
- Added test cases for semafor

Note: the task now assumes SAF style input/output. If desired, I could add a 'raw' mode that takes a conll (or even conll/penn) tree and outputs the raw semafor output. I would prefer to do this based on input type rather than a parameter, as SAF output is impossible from raw input (as token ids etc do not exist), so something like

```
from ._semafor import add_frames, to_conll, call_semafor
if isinstance(input, dict): # assume SAF
return add_frames(saf)
else:
if input.startswith("ROOT("): # assume Penn treebank-style tree
input = to_conll(input)
return call_semafor(input)
```

What do you think?