views:

12

answers:

1

I want to build an app for the Mac / iPad that allows to assign semantic roles to sub phrases of every sentence of a text. So basically I have a text with n sentences and for every sentence the user selects one or multiple words and assigns it a semantic role (e.g. agent or patient). Then, I want the according phrases to be highlighted in a different background color and a small label above or beneath it that indicates the semantic role that was assigned before.

I created a short mockup to show what this could look like: “(The dog) (Agent) bit (the man) (Patient) in his house.”

Editing the text itself is not required at the moment, just tagging the phrases. It would be favorable to have a solution that can be relatively easily be used both for the Mac and iOS on the iPad.

My ideas were the following: - Using a hack around UIWebView / NSWebView - Writing some own rendering code, either in conjunction with UITextView / NSTextView or completely without out.

What do you think? Are there any libraries maybe that either do that (I could not find any when searching) or that maybe help in accomplishing this, especially when going with solution 2?

A: 

It sounds like you are trying to do something similar to Joe Hewitt's TTTextPickerField in his ThreeTwenty library (see description here). He extends UITextField as opposed to UITextView and allows user editing, but perhaps you can adapt his code for rendering the highlights around completed names. The source for his library is on github.

Tim Isganitis