 
 ###* @jsx React.DOM ###
 
-createTerm = ->
-  word:     ''
-  pos:      null
-  features: []
-  min:      null
-  max:      null
+createTerm = (overrides = {}) ->
+  term =
+    word:     ''
+    pos:      null
+    features: []
+    min:      null
+    max:      null
 
-  isLemma: false
-  isStart: false
-  isEnd:   false
+    isLemma: false
+    isStart: false
+    isEnd:   false
+
+  for k, v of overrides
+    term[k] = v
+
+  term
 
 
 window.CwbMultiwordInput = React.createClass

        isEnd   = /^\.\+/.test(word)
        word = word.replace(/^(?:\.\+)?(.+?)/, "$1").replace(/(.+?)(?:\.\+)?$/, "$1")

        dq.push
          word:     word
          features: []
          min:      min
          max:      max
          isStart:  isStart
          isEnd:    isEnd

        min = null
        max = null


  handleAttributes: (m, min, max) ->
    attributes = m[1].split(/\s*&\s*/)
    term = createTerm(min: min, max: max)

    for attr in attributes
      m2 = attr.match(/\(?(\S+)\s*=\s*"(\S+)"/)
