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:
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?